PlugWiki
sentry-mcp logo

Add the Sentry MCP server to Claude Code

Add Sentry to Claude Code with one command, then sign in through /mcp. Claude can then read your errors and help fix them.

Run one command in your terminal to add Sentry to Claude Code, then sign in to Sentry from inside Claude Code. After that you can ask Claude to list your top issues, pull the latest event and look for a shared root cause.

The command alone does not sign you in. Start claude, run /mcp, pick sentry and choose Authenticate before you ask for data, or the calls fail.

Good for

  • Developers who fix bugs from the terminal in Claude Code
  • On-call engineers who triage Sentry issues without leaving the editor
  • Teams who want a daily error digest from a Claude routine
  • Self-hosted Sentry users who run the local server

Add sentry to Claude Code

Claude Code

  1. 1

    Copy this prompt.

    Add the sentry MCP server to Claude Code. Run this command:
    
    claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Sentry account.

Read-only mode: Leave Triage and Manage Projects & Teams unticked when you sign in to Sentry, and do not pre-approve Sentry write tools in Claude Code.

Pick the first method unless you run self-hosted Sentry. It adds the server for the current project only; add --scope user after claude mcp add to use it in every project.

The command only registers the server. Start claude, run /mcp, pick sentry, choose Authenticate and approve in the browser. Until then claude mcp list shows "Needs authentication". Finish this before asking for Sentry data, or the calls fail.

The official plugin adds Sentry's skills too, but its server address carries a tracking parameter that an open report says breaks sign-in. If that happens, use the first method instead.

The local method needs Node.js 22.13 or newer: that is the engines field in @sentry/mcp-server's package.json, even though Sentry's cookbook lists Node.js 18+. The hosted methods need no Node.js. Without a token it signs you in with a device code, which only works in an interactive terminal, so run sentry-mcp auth login there first. The cached login lasts 30 days in ~/.sentry/mcp.json.

From the vendor's docs. Source.

Common errors and fixes

  • claude mcp list shows "Needs authentication" for sentry

    Cause: The command registers the server but does not sign you in.

    Fix: Start claude, run /mcp, select sentry, choose Authenticate and approve in the browser. Do this before asking for Sentry data.

    claude-code Source

  • Sign-in fails with invalid_target after installing Sentry's plugin

    Cause: The plugin's server address carries a tracking parameter that Sentry's sign-in rejects.

    Fix: Remove the plugin's server and add Sentry yourself with claude mcp add and the plain https://mcp.sentry.dev/mcp address.

    claude-code Source

  • "Invalid redirect URI" after you approve access in the browser

    Cause: The browser sign-in returns to Claude Code with a redirect address Sentry does not accept.

    Fix: This is an open report with no known fix yet. Retry the sign-in from /mcp, and follow the linked report for updates.

    claude-code Source

  • "Authentication Failed, internal error" for a new EU-region organization

    Cause: Sign-in breaks for some new organizations in the EU region.

    Fix: This is an open report with no known fix yet. Retry the sign-in from /mcp, and follow the linked report for updates.

    claude-code Source

  • Local Sentry server hangs on startup in Claude Code

    Cause: Sentry does not support internal integration tokens.

    Fix: Use a personal user auth token, or leave the token out and run sentry-mcp auth login in a terminal first.

    claude-code Source

  • Sentry replies "Rate Limited"

    Cause: Claude Code ran many Sentry calls in parallel and hit the per-second limit.

    Fix: Ask Claude Code to run the Sentry calls one at a time.

    claude-code Source

  • A large Sentry result is cut off or Claude Code warns about size

    Cause: Claude Code caps MCP output at 25,000 tokens by default.

    Fix: Start Claude Code with MAX_MCP_OUTPUT_TOKENS=50000 claude, or ask for one event at a time.

    claude-code Source

Permissions

Medium risk

Claude Code can read your error data and, if you allow it, change issues and projects, and a fake error can try to steer it. Leave the opt-in groups off, keep Sentry write tools on the ask-first setting and read any command before it runs.

What it can do

Watch out for

  • Error text can steer Claude Code into commands

    Anyone with your public DSN can send a fake error holding a "fix". If you ask Claude Code to fix Sentry issues, it may run it with your rights, so read proposed commands and diffs first. thehackernews.com

  • Auto-approving Sentry tools skips your check

    Claude Code asks before the first call to an MCP tool. Approving all Sentry tools, or running with permissions bypassed, lets write tools change data without a prompt. code.claude.com

  • Opt-in groups can change and delete things

    Triage resolves and assigns issues. Manage Projects & Teams edits projects and DSNs and can delete alert rules and monitors. Leave both off unless you need them. github.com

  • A project .mcp.json is shared with the repo

    Adding Sentry with --scope project writes .mcp.json for everyone who clones it. Keep tokens out of it; the hosted sign-in needs none. code.claude.com

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyAt Sentry sign-in leave Triage and Manage Projects & Teams unticked. With a Sentry-Bearer token, add ?skills=inspect to the URL. Locally, start the server with --skills=inspect. Do not pre-approve Sentry write tools in Claude Code.
Talks tomcp.sentry.dev. Your Sentry host (sentry.io or self-hosted)
Sign-in and keysThe hosted server signs you in through Claude Code. The local server caches its token in ~/.sentry/mcp.json with owner-only permissions for 30 days.

Works in

Sentry documents Claude Code setup, and a few sign-in problems are still open.

Tap an app to see how to set it up and any known problems.

Questions

Why does Sentry say "Needs authentication" in Claude Code?

Adding the server only registers it. Run /mcp inside Claude Code, select sentry, choose Authenticate and approve in the browser. If the browser does not open, copy the link shown in the terminal.

Why does sign-in fail with an invalid target or redirect error?

If you installed Sentry's plugin, its server address carries a tracking parameter that breaks sign-in. Add the server yourself with the plain address in the install box. "Invalid redirect URI" after approving in the browser is a separate open report.

How do I make Sentry read-only in Claude Code?

When you sign in to Sentry, leave Triage and Manage Projects & Teams unticked. Do not pre-approve Sentry write tools in Claude Code, so it still asks first.

Can I limit Sentry to one project in Claude Code?

Yes. Add your organization and project slugs to the end of the server address, as in the second method in the install box. Sentry recommends this.

Should I use the Sentry plugin or the one-line command?

Use the one-line command first. The plugin adds Sentry's skills but its server address can break sign-in. The sentry-mcp plugin adds a subagent that Claude hands Sentry questions to.

Can I use a token instead of signing in?

Yes, with the local server, which asks for a Sentry user auth token. Integration tokens do not work and make it hang. Without a token it uses a device code, which only works in an interactive terminal.

Why does the local server not sign me in?

Device-code sign-in only starts in an interactive terminal. Inside Claude Code the server uses a cached login or exits. Run sentry-mcp auth login in your terminal first, or pass a token. The login lasts 30 days.

Why do I get Rate Limited errors?

Sentry limits calls per second, and running many in parallel hits that fast. Ask Claude Code to run Sentry calls one at a time.

Claude Code cuts off a large Sentry result. What can I do?

Claude Code warns above 10,000 tokens and caps MCP output at 25,000 by default. Start it with MAX_MCP_OUTPUT_TOKENS=50000 claude, or ask for one event at a time.

How do I use Sentry in every Claude Code project?

Add --scope user to the claude mcp add command. The default adds it for the current project only. --scope project shares it with your team through .mcp.json.

Information

updated Nov 1, 2026

WebsiteGitHubnpmOfficial MCP RegistrySentry cookbook: Claude CodeChangelogPricingIssuesPrivacy policySupportSentry plugin for Claude Code

More on this

Sources

Docs, issue trackers and discussions this page is built from.

Show all 17
  1. Debug with Sentry MCP in Claude Code · sentry.io
  2. Claude Code MCP quickstart · code.claude.com
  3. Sentry MCP · mcp.sentry.dev
  4. Claude Code instructions (mcp.sentry.dev source) · github.com
  5. getsentry/plugin-claude · github.com
  6. Sentry Toolkit README · github.com
  7. Stdio Authentication · github.com
  8. @sentry/mcp-server package.json · github.com
  9. Claude Code plugin: ?utm_source=plugin in MCP URL breaks OAuth · github.com
  10. Invalid redirect URI · github.com
  11. EU-region sign-in failure · github.com
  12. stdio + Internal Integration token hangs on init in Claude Code · github.com
  13. Connect Claude Code to tools via MCP · code.claude.com
  14. Agentjacking attack tricks AI coding agents · thehackernews.com
  15. Sentry MCP skills · github.com
  16. Untrusted-data wrapper PR · github.com
  17. API Error 400 naming a Sentry search tool · github.com

Updated Nov 1, 2026.