Skip to content

Sentry MCP server with Atomic Agent

Sentry maintains an official MCP server built for coding agents: look up issues and events, read stack traces, search errors and traces. It runs as a hosted service at https://mcp.sentry.dev/mcp and as a local stdio process for self-hosted Sentry. Source: getsentry/sentry-mcp.

Config (sentry.io)

{
"name": "sentry",
"description": "Sentry issues, events and traces",
"transport": {
"kind": "streamable_http",
"url": "https://mcp.sentry.dev/mcp",
"headers": { "Authorization": "Sentry-Bearer YOUR_SENTRY_TOKEN" }
}
}

The scheme is Sentry-Bearer, not Bearer. Sentry reserves plain Bearer for its OAuth tokens; Sentry-Bearer tells the hosted server to forward your own Sentry API token. Create a User Auth Token in your Sentry account settings. Sentry’s README lists these scopes for the server: org:read, project:read, project:write, team:read, team:write, event:write.

To expose fewer tools, add Sentry’s skills filter to the URL, for example https://mcp.sentry.dev/mcp?skills=inspect,triage.

Where to add it:

  • Desktop app: Settings › Connections › MCP servers › Add server, paste the object, press ⌘Enter (Ctrl+Enter on Windows and Linux), then Restart on the new row.
  • Terminal UI: /mcp add, paste the object. It connects right away.
  • By hand: add the object to mcp.servers in ~/.atomic-agent/config.json and restart the agent.

Config (self-hosted Sentry)

For a self-hosted install, run Sentry’s server locally over stdio and point it at your host:

{
"name": "sentry",
"transport": {
"kind": "stdio",
"command": "npx",
"args": ["-y", "@sentry/mcp-server@latest", "--host=sentry.example.com"]
},
"env": { "SENTRY_ACCESS_TOKEN": "YOUR_SENTRY_TOKEN" }
}

With stdio you can keep the token out of config.json: put SENTRY_ACCESS_TOKEN=... in ~/.atomic-agent/.env and drop the env block. A stdio server inherits the agent’s environment, including that file.

One difference to know: in the local server, Sentry’s AI-powered search tools (search_errors, search_issues and similar) need an LLM key of their own (EMBEDDED_AGENT_PROVIDER plus an OpenAI, Anthropic or OpenRouter key). Without one those tools are not offered and the rest work normally. That key is Sentry’s requirement, separate from the model Atomic Agent uses.

What to ask the agent

Tools arrive as mcp.sentry.<tool>. Some prompts that work well:

  • “Show the five Sentry issues with the most events in the last 24 hours for the web project, with first-seen dates.”
  • “Open Sentry issue WEB-1423, read the latest stack trace, find the file and line in this repo, and explain the bug.”
  • “That crash started after yesterday’s deploy. Compare the stack trace with git log for the files it touches and tell me which commit is the likely cause.”
  • “Draft a fix for the null check in that trace and show me the diff. Don’t change the Sentry issue.”

The value of a local agent here is the second half of each prompt: Sentry tells it what broke, and the agent’s own file, search and git tools find the code.

Tokens and approvals

  • Where the token lives. For the hosted server, in the header in ~/.atomic-agent/config.json, in plain text, written with owner-only permissions (0600) on macOS and Linux. For stdio, preferably in ~/.atomic-agent/.env.
  • Why a token, not OAuth. Sentry’s default sign-in for the hosted server is OAuth, which Atomic Agent does not run. The Sentry-Bearer header is Sentry’s documented path for clients that send custom headers. Sentry does not refresh that token for you.
  • What asks for approval. Every Sentry tool that the server does not mark read-only asks before it runs. Keep the default trust (do not set pure_read): the scopes above include write access, and tools can change issue state. At approval level 5 (full trust) nothing asks.
  • Stdio servers see your whole environment. The local server can read every variable the agent holds, including other API keys in .env. Sentry’s package is official, but keep that in mind for any stdio server.

Troubleshooting

401 or “invalid token”. Check the scheme is Sentry-Bearer and the value is the literal token, not ${SENTRY_ACCESS_TOKEN}. Atomic Agent does not expand variables in headers.

Stdio server shows failed with connect timeout after 15000ms. The first npx -y @sentry/mcp-server@latest run downloads the package. Run that command once in a terminal, stop it, then press Restart.

spawn npx ENOENT in the desktop app. On macOS a Finder or Dock launch does not inherit your shell’s PATH. Use the full path from which npx as command.

Search tools are missing (stdio). Set EMBEDDED_AGENT_PROVIDER and the matching provider key for the Sentry server, as described above.

Long stack traces look cut off. Tool results reach the model capped at about 8,000 characters. Ask for the top frames or a single event.

FAQ

Is this the official Sentry MCP server?

Yes. It is developed by Sentry in the getsentry/sentry-mcp repository and hosted at mcp.sentry.dev.

Hosted or local: which should I use?

Hosted for sentry.io: nothing to install. Local stdio for self-hosted Sentry, or if you prefer the server process on your own machine.

Does Sentry data go to my model?

Yes. Whatever the tools return (issue titles, stack traces, event context) goes into the prompt of the model you use. With a local model it is not sent to any model provider; with a cloud provider it goes to that provider.


Checked on 22 Oct 2026 against Atomic Agent v0.6.10 and Desktop v0.0.4, and the sentry-mcp README.

Get updates by email

One email when a new version comes out.