Setting up the Sentry MCP Server
Connect the Sentry MCP Server as a hosted remote service via OAuth or as a local stdio server via user token, limited to the organization you need.
- Skill Road
- Setting up the Sentry MCP Server
Published on 09.09.2026
The Sentry MCP Server can be connected in two ways: as a Sentry-hosted remote service with OAuth sign-in, or as a server run locally over stdio with a Sentry user token. Sentry recommends the hosted option.
Which option fits
The hosted option is the quickest to set up, needs no local process, and includes natural-language error search without your own language model key. The local option makes sense when you need to connect a self-hosted Sentry installation or when MCP traffic must not leave your own network — but then natural-language search requires your own access to OpenAI, Azure OpenAI, Anthropic, or OpenRouter.
Connecting the hosted option
Register the remote server in your MCP client. In Claude Code:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
In Cursor or VS Code, create a server entry with the URL https://mcp.sentry.dev/mcp instead (in VS Code with "type": "http"). On the first call the client opens a browser window for OAuth sign-in to the Sentry account. To keep access narrow from the start, append the organization or project to the URL: https://mcp.sentry.dev/mcp/my-org or https://mcp.sentry.dev/mcp/my-org/my-project.
Connecting the local option
In the Sentry account settings under "User Auth Tokens", create a token with the scopes org:read, project:read, project:write, team:read, team:write, and event:write. Then start the server via npx:
npx @sentry/mcp-server@latest --access-token=<token>
For the natural-language search tools, additionally set a language model provider's credentials as environment variables. Connect a self-hosted Sentry installation via --host=sentry.example.com, adding --insecure-http for plain HTTP; turn off unavailable features such as Seer with --disable-skills=seer.
Keeping access tight
The agent sees everything the signed-in account or the token sees in Sentry. For automated workflows, use a dedicated token with as few scopes as possible, treat it like a password, and scope the path to the organization or project you need. Stack traces and events can contain secrets or personal data — when in doubt, check in advance which projects the agent can reach.
Verifying the setup
After connecting, test with a harmless task such as "Show me the most recent unresolved errors in project X." Check that only the expected organization and projects appear, and tighten access if needed.
Common connection issues
If no browser window opens for OAuth sign-in on the first call, it may be a blocked pop-up in the client or an environment without a graphical interface — in such cases the client usually displays a URL that can be opened manually in a browser. With the local option, an expired or incorrectly copied token causes authentication errors; a freshly generated token from the account settings usually fixes this.
Switching between the hosted and local options
Anyone starting with the hosted option and later wanting to switch to the local option, for example due to network policy, should fully replace the existing client entry rather than running both in parallel. Two Sentry servers configured simultaneously under different names can otherwise lead to conflicting results if the agent doesn't clearly know which one to address.
Source: the hosted service mcp.sentry.dev and the repository github.com/getsentry/sentry-mcp (README.md, LICENSE.md), plus the npm package @sentry/mcp-server, checked on 2026-09-06.
Frequently asked questions
Does the Sentry MCP Server run locally or in the cloud?
Both are possible. Sentry runs a hosted remote option at mcp.sentry.dev with OAuth sign-in and recommends it. There is also the @sentry/mcp-server package, which runs locally over stdio via npx and uses a Sentry user token.
What does the Sentry MCP Server cost?
The server itself is free, and the source code is publicly readable (FSL-1.1-Apache-2.0). You need a Sentry account; its plan (free developer tier or paid) is billed independently of the MCP server. Using the natural-language search locally adds costs at your chosen language model provider.
Why does the local option need a language model provider?
The tools search_events and search_issues translate natural-language queries into Sentry search syntax and need a language model for that. The hosted option provides one itself; locally you must configure access to OpenAI, Azure OpenAI, Anthropic, or OpenRouter. The other tools work without it.
Can I limit access to a single organization or project?
Yes. With the hosted option, the organization or project is appended to the URL (`/mcp/{organization}` or `/mcp/{organization}/{project}`). In addition, the scopes of the signed-in account or the user token determine what the agent can see and change.
Does the server work with self-hosted Sentry?
Yes, via the local option with the flag `--host=sentry.example.com` (plus `--insecure-http` for plain HTTP). Some features such as Seer are unavailable on self-hosted instances and can be turned off with `--disable-skills=seer`.
Which scopes does the user token need?
Per the repository: org:read, project:read, project:write, team:read, team:write, and event:write. Read-only use needs fewer in practice; the write scopes are only required for actions such as issue assignment or creating projects, teams, and DSNs.