Menu

AI

How to Connect Claude Code to Sentry with MCP

Connect Claude Code to Sentry's hosted MCP server: the one-line command, OAuth sign-in with /mcp, project scoping, the plugin option and fixes when it fails.

By: Irina ShvayaOctober 28, 2026

How to Connect Claude Code to Sentry with MCP

This guide is part of our MCP connection guides, within The MCP Guide. Steps are copied from the vendor's own documentation. Need a custom connection? See MCP development.

Connecting Claude Code to Sentry lets you pull error details, traces and issues into the same session where you fix the code. Sentry's hosted MCP server is built for "human-in-the-loop coding agents," and Sentry names Claude Code as a target client. You add one URL and sign in through your browser.

Checked against: Sentry's MCP server page and Claude Code's MCP documentation on 28 October 2026. eSEOspace did not run these steps; menus can change, so follow the vendor's page if it differs.

Key Takeaways

  • Sentry gives a one-line claude mcp add command for its hosted server at https://mcp.sentry.dev/mcp.
  • Sentry says all hosted connections use OAuth; the first connection starts a Sentry sign-in.
  • You can scope the URL to one organization or one project, and Sentry recommends project scoping when possible.
  • A Claude Code plugin adds a sentry-mcp subagent that Claude delegates Sentry questions to.
  • Self-hosted Sentry uses a local stdio mode, which Sentry calls "still a work in progress."

Before you start

You need Claude Code installed and a Sentry account with access to the organization and project you want. Find your organization slug and project slug in Sentry. The project-scoped URL needs both.

Sentry's README says the service is tuned for developer workflows and debugging, not as a general server for all of Sentry. Expect tools for errors, traces, issues and docs rather than full account admin.

Tool calls count against Sentry API rate limits. That matters if you plan to run many lookups in parallel.

Steps

Option A: Add the hosted server

  1. In your terminal, run Sentry's command with your own slugs in place of the braces:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug}
  1. Start Claude Code and type /mcp.
  2. Select the sentry server and follow the steps in your browser to log in. Claude Code's docs use Sentry as their own sign-in example.

You can also sign in from your shell without opening a session:

claude mcp login sentry

If you want the whole organization rather than one project, use https://mcp.sentry.dev/mcp/{organizationSlug} instead. The unscoped base URL is https://mcp.sentry.dev/mcp. Sentry also offers ?experimental=1 for forward-looking tool variants.

Option B: Install the Claude Code plugin

Sentry's README gives two commands:

claude plugin marketplace add getsentry/sentry-mcp
claude plugin install sentry-mcp@sentry-mcp

Sentry says this "provides a sentry-mcp subagent that Claude automatically delegates to" for errors, issues, traces and performance. See Claude Code plugins and marketplaces for how plugins work.

Option C: Self-hosted Sentry

For a self-hosted install, Sentry documents the stdio transport with a user auth token and your hostname:

npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.example.com

To add that to Claude Code, use the launch-command form from Claude Code's docs. This is the generic form, not a Sentry-published command:

claude mcp add sentry -- npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.example.com

The AI-powered search tools need your own LLM provider key in this mode, set through EMBEDDED_AGENT_PROVIDER and the matching API key variable.

Check that it works

Run claude mcp list. Claude Code shows ✔ Connected, ! Needs authentication or ✘ Failed to connect next to each server. Inside a session, /mcp shows the same.

Example prompts:

  • "Using Sentry, search for unresolved issues in this project from the last 24 hours." (Sentry names search_issues among its AI-powered search tools.)
  • "Search Sentry for errors that mention TimeoutError and summarize the top three." (uses search_errors)
  • "Find slow traces for the checkout endpoint in Sentry." (uses search_traces)

Sentry doesn't publish a full tool list, so check /mcp for what your connection exposes.

Permissions and safety

  • Scope the URL. With an org or project in the path, Sentry says tools default to that scope and "unnecessary discovery tools are hidden."
  • Narrow the skills. Sentry groups tools into skills: inspect, triage, seer and project-management. On direct token connections you can add ?skills=inspect,triage or ?disable-skills=seer.
  • Token scopes for stdio. The README lists org:read, project:read, project:write, team:read, team:write and event:write. That is write access, so treat the token as a secret.
  • Approvals in Claude Code. Claude Code's permission rules let you allow all tools from one server with mcp__sentry__*, or keep prompts on. Leave prompts on until you know which tools change data.

Error events often carry user details and request bodies. Read data exfiltration through MCP and the MCP Security Center.

If it doesn't work

These issues come from Sentry's and Anthropic's docs:

  • "Rate Limited" message. Sentry says agents hit per-second limits most often by running many Sentry calls in parallel. Ask Claude to run them one at a time.
  • "Already exists" error. Running claude mcp add again with the same name and scope fails with MCP server sentry already exists in local config. Remove it first with claude mcp remove sentry.
  • Browser doesn't open. Copy the URL Claude Code prints and open it yourself. Over SSH, use claude mcp login sentry --no-browser.
  • Redirect fails after sign-in. Paste the full callback URL from your browser's address bar into Claude Code's prompt.
  • Search tools missing in stdio mode. No LLM provider is configured. The other tools still work.

Next step

Read the Sentry MCP server profile for the skills model and token scopes. More setups are in the connection guides hub, including Cursor with Sentry. Pair it with the GitHub connection so Claude can open a fix as a pull request.

Frequently asked questions

Do I need a Sentry auth token for Claude Code?

Not for the hosted server. Sentry says all hosted connections use OAuth, so you sign in through your browser. A user auth token is only needed for the self-hosted stdio mode or a direct Sentry-Bearer header.

Should I scope the server to one project?

Sentry recommends it when possible. Scoped tools default to that project and hide discovery tools, which keeps Claude focused and limits what it can reach.

What does the Sentry plugin add over the MCP server?

The plugin sets up the MCP connection and adds a sentry-mcp subagent. Sentry says Claude delegates Sentry questions about errors, issues, traces and performance to that subagent automatically.

Does the Sentry MCP server work with self-hosted Sentry?

Yes, through the local stdio transport with --host set to your hostname. Sentry calls this mode a work in progress, and the seer skill is left out because Seer isn't part of self-hosted Sentry.

You Might Also like to Read

Get a FREE Website Audit

Enter your website and get a 20–30 page SEO, GEO, AEO & CRO audit within 24 hours. Completely free.

Don't have a site yet? Get in touch →

Ready to speak with a marketing expert?
Give us a call! (916) 866-7893

Websites Launched
1407
Websites Launched
Marketing Experts
29
Marketing Experts
Hours of Dedicated Work
204533
Hours of Dedicated Work
Irina S.Benjamin G.Jeanette M.David G.