$git clone https://github.com/getsentry/sentry-mcpSentry's MCP service is primarily designed for human-in-the-loop coding agents. Our tool selection and priorities are focused on developer workflows and debugging use cases, rather than providing a general-purpose MCP server for all Sentry functionality.
| 1 | # sentry-mcp |
| 2 | |
| 3 | Sentry's MCP service is primarily designed for human-in-the-loop coding agents. Our tool selection and priorities are focused on developer workflows and debugging use cases, rather than providing a general-purpose MCP server for all Sentry functionality. |
| 4 | |
| 5 | This remote MCP server acts as middleware to the upstream Sentry API, optimized for coding assistants like Cursor, Claude Code, and similar development tools. It's based on [Cloudflare's work towards remote MCPs](https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/). |
| 6 | |
| 7 | ## Getting Started |
| 8 | |
| 9 | You'll find everything you need to know by visiting the deployed service in production: |
| 10 | |
| 11 | <https://mcp.sentry.dev> |
| 12 | |
| 13 | If you're looking to contribute, learn how it works, or to run this for self-hosted Sentry, continue below. |
| 14 | |
| 15 | ### Claude Code Plugin |
| 16 | |
| 17 | Install as a Claude Code plugin for automatic subagent delegation: |
| 18 | |
| 19 | ```shell |
| 20 | claude plugin marketplace add getsentry/sentry-mcp |
| 21 | claude plugin install sentry-mcp@sentry-mcp |
| 22 | ``` |
| 23 | |
| 24 | This provides a `sentry-mcp` subagent that Claude automatically delegates to when you ask about Sentry errors, issues, traces, or performance. |
| 25 | |
| 26 | For forward-looking tool variants and features: |
| 27 | |
| 28 | ```shell |
| 29 | claude plugin install sentry-mcp@sentry-mcp-experimental |
| 30 | ``` |
| 31 | |
| 32 | ### Stdio vs Remote |
| 33 | |
| 34 | While this repository is focused on acting as an MCP service, we also support a `stdio` transport. This is still a work in progress, but is the easiest way to adapt run the MCP against a self-hosted Sentry install. |
| 35 | |
| 36 | **Note:** The AI-powered search tools (`search_events`, `search_issues`, etc.) require an LLM provider (OpenAI, Azure OpenAI, Anthropic, or OpenRouter). These tools use natural language processing to translate queries into Sentry's query syntax. Without a configured provider, these specific tools will be unavailable, but all other tools will function normally. |
| 37 | |
| 38 | To utilize the `stdio` transport, you'll need to create an User Auth Token in Sentry with the necessary scopes. As of writing this is: |
| 39 | |
| 40 | ``` |
| 41 | org:read |
| 42 | project:read |
| 43 | project:write |
| 44 | team:read |
| 45 | team:write |
| 46 | event:write |
| 47 | ``` |
| 48 | |
| 49 | Launch the transport: |
| 50 | |
| 51 | ```shell |
| 52 | npx @sentry/mcp-server@latest --access-token=sentry-user-token |
| 53 | ``` |
| 54 | |
| 55 | Need to connect to a self-hosted deployment? Add <code>--host</code> (hostname |
| 56 | only, e.g. <code>--host=sentry.example.com</code>) when you run the command. |
| 57 | For isolated internal deployments that only expose plain HTTP, also add |
| 58 | <code>--insecure-http</code>. |
| 59 | |
| 60 | Some features (like Seer) may not be available on self-hosted instances. You can |
| 61 | disable specific skills to prevent unsupported tools from being exposed: |
| 62 | |
| 63 | ```shell |
| 64 | npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.example.com --disable-skills=seer |
| 65 | ``` |
| 66 | |
| 67 | For self-hosted instances without TLS: |
| 68 | |
| 69 | ```shell |
| 70 | npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.internal:9000 --insecure-http |
| 71 | ``` |
| 72 | |
| 73 | #### Remote with an Explicit Sentry Token |
| 74 | |
| 75 | Remote clients that support custom HTTP headers can pass an upstream Sentry API |
| 76 | token directly to the Cloudflare transport: |
| 77 | |
| 78 | ```json |
| 79 | { |
| 80 | "mcpServers": { |
| 81 | "sentry": { |
| 82 | "url": "https://mcp.sentry.dev/mcp", |
| 83 | "headers": { |
| 84 | "Authorization": "Sentry-Bearer ${SENTRY_ACCESS_TOKEN}" |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | ``` |
| 90 | |
| 91 | `Sentry-Bearer` is intentionally separate from `Bearer`: `Bearer` is reserved |
| 92 | for MCP OAuth access tokens. With `Sentry-Bearer`, the worker does not store, |
| 93 | validate, exchange, or refresh the upstream token. It forwards the token through |
| 94 | the same Sentry API calls used by OAuth-backed sessions, and the client or |
| 95 | upstream provider remains responsible for token lifetime and refresh. |
| 96 | |
| 97 | Direct remote auth defaults to all active MCP skills. You can narrow the exposed |
| 98 | tools with `?skills=inspect,triage` or `?disable-skills=seer`. |
| 99 | |
| 100 | #### Environment Variables |
| 101 | |
| 102 | ```shell |
| 103 | SENTRY_ACCESS_TOKEN= # Required: Your Sentry auth token |
| 104 | |
| 105 | # LLM Provider Configuration (required for AI-powered search tools) |
| 106 | EMBEDDED_AGENT_PROVIDER= # Required when multiple provider keys are set: 'open |