Back to Codex
Dev Tools·
intermediate
·8 min read·Apr 4, 2026

How to Set Up the Sentry MCP Server for Error Monitoring

Connect Sentry to your AI agent for intelligent error analysis. Triage issues, analyze stack traces, and get fix suggestions through MCP.

Sentryerror monitoringdebuggingobservabilityissues

Set Up the Sentry MCP Server

The Sentry MCP server lets AI agents access your error monitoring data, enabling intelligent issue triage, stack trace analysis, and debugging assistance.

Prerequisites

  • Sentry account with project access
  • Sentry Auth Token
  • Node.js 18+

Getting a Sentry Auth Token

  1. Go to Sentry Settings → Auth Tokens
  2. Click Create New Token
  3. Grant scopes:
    code
    project:read
    ,
    code
    event:read
    ,
    code
    issue:read
  4. Copy the token

Configuration

json
{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": ["-y", "mcp-server-sentry"],
      "env": {
        "SENTRY_AUTH_TOKEN": "sntrys_your_token_here",
        "SENTRY_ORG": "your-organization"
      }
    }
  }
}

Available Tools

  • code
    list_projects
    — List Sentry projects
  • code
    list_issues
    — Get issues with filters (status, priority)
  • code
    get_issue_details
    — Detailed information about an issue
  • code
    get_issue_events
    — View individual error events
  • code
    resolve_issue
    — Mark issues as resolved
  • code
    search_issues
    — Full-text search across issues

Example Workflows

Morning Triage

code
"Show me all unresolved critical issues from the last 24 hours across all projects"

Root Cause Analysis

code
"Get the details and stack trace for issue PROJ-1234 and suggest potential fixes"

Trend Analysis

code
"What are the most frequently occurring errors in the frontend project this week?"

Release Verification

code
"Compare error rates before and after yesterday's deployment"

Tips

  • Combine with the GitHub server to have the AI analyze both errors and code
  • Use with the Slack server to post error summaries to channels
  • The AI can correlate errors with recent deployments for root cause analysis