The Sentry MCP server lets Claude Code read your Sentry issues, stack traces, and events, so you can say "fix the top error from yesterday" without copying anything out of the Sentry UI. For sentry.io, adding Sentry MCP to Claude Code takes one command plus a browser login.
Quick command
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
The alias is sentry. Sentry hosts this MCP server, so nothing runs on your machine. The command needs --transport http because Claude Code would otherwise treat the URL as a local command to start over stdio.
This exact command is also the example in claude mcp add --help.
Log in with OAuth
The server needs your Sentry login before any tool works. Inside Claude Code, run:
/mcp
Select sentry and choose to authenticate. Claude Code opens Sentry in your browser. Sign in, approve the access, and pick which tool groups to allow when Sentry asks.
Claude Code stores the OAuth token itself. No API token goes into your config.
Verify it works
claude mcp list
After the login, sentry should show as connected. Then ask about something you know exists:
What are the top unresolved issues in Sentry from the last 24 hours?
If you get real issue titles back, you're done. An empty answer usually means your Sentry user can't see that organization or project, not that the setup failed.
Scope it to one organization or project
Append slugs to the URL to limit what Claude sees:
# one organization
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/my-org
# one project
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/my-org/my-project
With a scoped URL, Sentry hides the tools for listing organizations and projects, since there's nothing to discover. If you run claude mcp add per repository, the project-scoped URL fits well: each repo's Claude Code session only sees the Sentry project for that code.
Use a token instead of OAuth
Some setups can't do a browser login, like a remote box or a shared config. Sentry's hosted server also accepts a Sentry auth token in a header:
export SENTRY_ACCESS_TOKEN=your_sentry_token
claude mcp add-json sentry '{"type":"http","url":"https://mcp.sentry.dev/mcp","headers":{"Authorization":"Sentry-Bearer ${SENTRY_ACCESS_TOKEN}"}}'
The prefix is Sentry-Bearer. Sentry reserves plain Bearer for its own MCP OAuth tokens, so a Sentry auth token needs the separate prefix.
The single quotes keep ${SENTRY_ACCESS_TOKEN} as a placeholder in the config, and Claude Code fills it in from your environment when the server starts.
With a token, Sentry turns on every tool group by default. Add ?skills=inspect,triage to the URL to allow only some of them, or ?disable-skills=seer to drop one.
Self-hosted Sentry
The hosted endpoint only works with sentry.io. For self-hosted Sentry, run the MCP server locally over stdio and point it at your host:
claude mcp add --transport stdio \
--env SENTRY_ACCESS_TOKEN=your_sentry_token \
--env SENTRY_HOST=sentry.example.com \
sentry -- npx @sentry/mcp-server@latest
SENTRY_HOST takes the hostname only, without https://. Create a user auth token in Sentry with these scopes, which the Sentry MCP README lists:
org:read
project:read
project:write
team:read
team:write
event:write
There are two differences from the hosted server.
Seer, Sentry's AI debugger, doesn't exist on self-hosted Sentry, so the local server leaves that tool group out when SENTRY_HOST points somewhere other than sentry.io.
The AI-powered search tools, like search_issues and search_errors, need their own LLM key, because they turn plain English into Sentry query syntax. Without one, those tools are missing and the rest still work. To enable them, add --env EMBEDDED_AGENT_PROVIDER=anthropic --env ANTHROPIC_API_KEY=... (OpenAI and OpenRouter work too).
Or install the Claude Code plugin
Sentry also ships the MCP server as a Claude Code plugin:
claude plugin marketplace add getsentry/sentry-mcp
claude plugin install sentry-mcp@sentry-mcp
The plugin adds a sentry-mcp subagent, and Claude hands Sentry questions to it. The subagent does the Sentry lookups in its own context, so long stack traces don't fill up your main conversation. If you install the plugin, remove the server you added with claude mcp add so Claude doesn't load the same Sentry tools twice.
Troubleshooting
If sentry shows "needs authentication" in /mcp, the OAuth step hasn't finished. Run /mcp, select the server, and log in again.
If a tool call fails with an auth error when you use a token, check the Sentry-Bearer prefix first, then check that SENTRY_ACCESS_TOKEN is set in the shell that started Claude Code.
If the self-hosted server connects but every call fails, check SENTRY_HOST. A value with https:// or a path won't work. For internal deployments that only serve plain HTTP, the README documents an --insecure-http flag.
References
Other on-call MCP setups on this blog: Datadog and PagerDuty. With all three, Claude can check the page, the metrics, and the stack trace in one session.
Final check
For sentry.io, run claude mcp add --transport http sentry https://mcp.sentry.dev/mcp, then log in through /mcp. Add /my-org/my-project to the URL to keep Claude on one project. Self-hosted Sentry needs the local npx @sentry/mcp-server with a token and SENTRY_HOST.