---
title: How to connect Sentry MCP to Claude Code
description: Run claude mcp add with https://mcp.sentry.dev/mcp/<org>/<project>, then /mcp to sign in. Skills, permission rules, tokens for CI and self-hosted Sentry.
canonical: https://mcp1.com/blog/sentry-mcp-claude-code
last-updated: 2026-11-24
---

# How to connect Sentry MCP to Claude Code

Run claude mcp add with https://mcp.sentry.dev/mcp/<org>/<project>, then /mcp to sign in. Skills, permission rules, tokens for CI and self-hosted Sentry.

![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite

 Terminal

$ claude mcp add --transport http sentry mcp.sentry.dev/mcp/acme/web

sentryAuthenticated

 Terminal

$ claude mcp add --transport http sentry mcp.sentry.dev/mcp/acme/web

sentryAuthenticated

To connect Sentry to Claude Code, run `claude mcp add --transport http sentry https://mcp.sentry.dev/mcp`, start Claude Code, run `/mcp` and sign in to Sentry. Claude Code can then search issues, read stack traces and traces, and fix the code they point to in the same session. Add your organization and project to the URL to keep it focused.

## How do I add the Sentry MCP server to Claude Code?

Sentry hosts the server and signs you in with OAuth, so there is nothing to install and no token to paste.

1. 1Add the server, scoped to one organization and project. Replace `acme` and `web` with your slugs, or drop them to reach every project you can see:  
Terminal  
```  
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/acme/web  
```
2. 2Start `claude`, run `/mcp`, select `sentry` and choose Authenticate. A browser window opens for Sentry’s sign-in.
3. 3Back in `/mcp`, `sentry` shows as connected with its tool count.

Then ask for something that starts in Sentry and ends in your code:

Prompt

```
Find the most frequent unresolved error in acme/web since the last release,
show me its stack trace, and point to the file in this repo where it starts.
Don't change any code yet.
```

This is where Claude Code beats Sentry in a chat app: it reads the stack trace, opens the file in your checkout, and can write the fix and run the tests once you let it.

Plugin or plain server

Sentry also ships a Claude Code plugin. It adds the same server plus a `sentry-mcp` subagent that Claude hands Sentry questions to, which keeps long issue and trace output out of your main context:

Terminal

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

## Which Sentry tools does Claude Code get?

Sentry groups its tools into skills. Signing in grants the default two, `inspect` (read issues, events, traces, releases) and `seer` (Sentry’s root-cause analysis). `triage` and `project-management` are off until you ask for them. The tools you’ll use most:

ToolWhat it does

`search_issues`

Finds issues from a plain-language description. Read.

`get_issue_details`

Reads one issue with its latest event. Read.

`get_event_stacktrace`

Returns an event’s stack trace. Read.

`search_events`

Counts and groups errors, spans and logs. Read.

`get_trace_details`

Reads a distributed trace across services. Read.

`find_releases`

Lists releases, to tie a spike to a deploy. Read.

`analyze_issue_with_seer`

Runs Seer’s root-cause analysis. Seer skill, depends on your plan.

`update_issue`

Resolves, ignores or assigns an issue. Triage skill, marked destructive.

`add_issue_note`

Comments on an issue. Triage skill, write.

To let Claude Code resolve and assign issues after a fix, add the skills to the URL:

Terminal

```
claude mcp add --transport http sentry \
  "https://mcp.sentry.dev/mcp/acme/web?skills=inspect,seer,triage"
```

Leave `project-management` off for coding work. It creates and deletes alert rules, monitors and DSNs, none of which a bug fix needs.

## How do I stop Claude Code changing issues in Sentry?

Allow the readers and make writes ask, in `.claude/settings.json`. Claude Code names the tools `mcp__sentry__<tool>`:

.claude/settings.json

```
{
  "permissions": {
    "allow": [
      "mcp__sentry__search_*",
      "mcp__sentry__find_*",
      "mcp__sentry__get_*"
    ],
    "ask": [
      "mcp__sentry__update_issue",
      "mcp__sentry__add_issue_note"
    ]
  }
}
```

With these rules Claude Code reads Sentry without prompting and stops to show you the arguments before it resolves or comments on anything. If you never granted `triage`, the write tools aren’t there at all. For other clients, see [how to stop agents from running destructive MCP tools](https://mcp1.com/blog/stop-destructive-mcp-tools).

## How do I share the Sentry server with my team?

Commit a `.mcp.json` at the repository root, or add the server with `--scope project`, which writes the same file. It holds only a URL, because each person signs in with their own Sentry account:

.mcp.json

```
{
  "mcpServers": {
    "sentry": {
      "type": "http",
      "url": "https://mcp.sentry.dev/mcp/acme/web"
    }
  }
}
```

Teammates approve the project server the first time Claude Code loads it, then authenticate in `/mcp`. Everyone sees what their Sentry role allows, nothing more. Commit the permission rules next to it.

## How do I use Sentry MCP in CI or without a browser?

Send a Sentry auth token in the header, with the `Sentry-Bearer` scheme. Plain `Bearer` is reserved for Sentry’s own OAuth tokens and won’t work:

Terminal

```
claude mcp add --transport http sentry \
  "https://mcp.sentry.dev/mcp/acme/web?skills=inspect" \
  --header "Authorization: Sentry-Bearer $SENTRY_ACCESS_TOKEN"
```

A token session gets every active skill unless the URL narrows it, so pass `?skills=inspect` for a job that only reads. Create the token in Sentry under your account’s auth tokens with the least scope the job needs. More in [how to use MCP servers in CI and headless agents](https://mcp1.com/blog/mcp-in-ci-and-headless-agents).

## Does Sentry MCP work with self-hosted Sentry?

Not the hosted server. Run Sentry’s CLI as a local stdio server instead and point it at your instance with `SENTRY_HOST`:

Terminal

```
curl https://cli.sentry.dev/install -fsS | bash
sentry auth login --url https://sentry.example.com
claude mcp add sentry -e SENTRY_HOST=sentry.example.com -- sentry mcp
```

On self-hosted, `seer` is dropped from the default skills. The AI-backed search tools, like `search_issues` and `search_events`, also need an LLM provider set with `EMBEDDED_AGENT_PROVIDER` and its API key, which the hosted server handles for you.

## What if Sentry MCP doesn’t connect?

- `sentry` isn’t listed. It was added at local scope in another directory. Add it again here or with `--scope user`.
- It shows Needs authentication. Run `/mcp`, select `sentry` and authenticate again.
- Searches return another project’s issues. The URL isn’t scoped. Add the organization and project slugs to the path.
- Calls fail with Rate Limited. Ask Claude Code to run Sentry calls one at a time instead of in parallel.

## Sentry for the whole team, with access you can see

The setup above gives each person their own Sentry sign-in in each client, and the skills each one granted live in their own config. MCP1 is a gateway that does it once. An admin installs [Sentry](https://mcp1.com/servers/sentry) in the workspace and shares it with a group, read-only for most people. Each person connects one URL and signs in with OAuth:

Terminal

```
claude mcp add --transport http mcp1 https://mcp1.com/mcp/<workspace>/<gateway>
```

Sentry’s tools appear as `sentry__<tool>` next to GitHub, Linear and the rest, a rule like `sentry__update_*` can hold writes to admins or ask first, and every call is in the audit log. If your team also uses ChatGPT, see [connecting Sentry MCP to ChatGPT](https://mcp1.com/blog/sentry-mcp-chatgpt). The [docs](https://mcp1.com/docs) cover gateways and groups, and you can [start free](https://mcp1.com/signup).

## Common questions

### Is the Sentry MCP server free?

The server itself has no separate charge and works with your existing Sentry account. Seer root-cause analysis depends on your Sentry plan.

### Can Claude Code fix a Sentry error by itself?

It can read the issue and stack trace through MCP, find the code in your checkout and propose or write a fix. Resolving the issue in Sentry needs the triage skill, which is off by default.

### Should I use the Sentry plugin or claude mcp add?

Both connect the same hosted server. The plugin adds a sentry-mcp subagent that handles Sentry questions in its own context; claude mcp add is simpler to share through a committed .mcp.json.

### Why does my Sentry token fail as a Bearer header?

Sentry reserves Bearer for its own OAuth tokens. Send a Sentry auth token as Authorization: Sentry-Bearer <token> instead.

Give your team one URL

Create a workspace, install your servers and share a gateway with a group. Free for individuals.

[Start with MCP1](https://mcp1.com/signup)[Read the docs](https://mcp1.com/docs)

## More from the blog

[ POST /mcpHTTP/1.1 401 Unauthorized WWW-Authenticate: Bearer   resource_metadata=".../oauth-protected-resource/mcp"aud = https://mcp.example.com/mcpValidHow to add OAuth to a remote MCP serverPublish protected resource metadata, return 401 with WWW-Authenticate, and accept only tokens whose audience is your server. What the auth server needs.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/add-oauth-to-mcp-server)[ \~/.codex/config.toml[mcp_servers.github] url = "https://api.githubcopilot.com/mcp/" bearer_token_env_var = "GITHUB_PAT"githubEnabledHow to connect GitHub MCP to CodexRun codex mcp add with https://api.githubcopilot.com/mcp/ and --bearer-token-env-var. Read-only mode, toolsets, approvals and a project config.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/github-mcp-codex)

---

This is the markdown copy of https://mcp1.com/blog/sentry-mcp-claude-code. Site index for agents: https://mcp1.com/llms.txt
