How to Set Up the Sentry MCP Server (2026)
Connect Sentry to Claude, Cursor, and VS Code with MCP. Pull error details, stack traces, and issue context into your AI assistant so it can triage and help fix bugs — full setup with the hosted remote server, OAuth, and troubleshooting.
When a production error fires, the fix lives in two places: the stack trace in Sentry and the code in your editor. The Sentry MCP server closes that gap. It lets Claude, Cursor, or VS Code pull the full error context — stack trace, breadcrumbs, affected releases, and event frequency — directly into your AI assistant so it can triage the issue and write a patch without you copy-pasting from a browser tab. This guide covers the complete setup using Sentry's official hosted server.
What This Integration Enables
With the Sentry MCP server connected, your AI assistant can:
- List and search unresolved issues across your projects
- Read full error details, stack traces, and breadcrumbs for any issue
- See how often an error fires and which releases it affects
- Pull issue context into the editor so the AI can propose a fix
- Trigger Sentry's Seer root-cause analysis on supported plans
Prerequisites
- A Sentry account with at least one project receiving errors
- An MCP client that supports remote servers: Claude Desktop, Cursor, or VS Code
- Node.js 18+ only if you choose the local server option
- Your Sentry organization slug handy (visible in your Sentry URL)
Step 1: Add the Hosted Server (Recommended)
Sentry hosts an official remote MCP server at https://mcp.sentry.dev/mcp. It uses OAuth, so there is no token to copy — you sign in through the browser. Add it to Claude Desktop's claude_desktop_config.json:
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.sentry.dev/mcp"]
}
}
}The mcp-remote bridge connects a stdio client to the remote server and handles the OAuth handshake. Clients with native remote support (such as Cursor and VS Code) can point at the URL directly instead.
Step 2: Complete the OAuth Flow
- Fully quit and reopen your MCP client after saving the config.
- A browser window opens asking you to sign in to Sentry and authorize access.
- Choose the correct organization if you belong to more than one, and approve the requested read scopes.
- Return to your client — the Sentry tools should now be available.
Step 3 (Alternative): Run the Local Server
If your client cannot reach a remote server, run Sentry's MCP locally with an auth token. First create a token in Sentry under Settings → Account → API → Auth Tokens with project:read and event:read scopes. Then:
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "@sentry/mcp-server@latest"],
"env": {
"SENTRY_AUTH_TOKEN": "your_sentry_auth_token",
"SENTRY_HOST": "https://sentry.io"
}
}
}
}Self-hosted Sentry users should set SENTRY_HOST to their own instance URL instead of sentry.io.
Step 4: Verify the Connection
With your client restarted, test it:
Show me the 5 most frequent unresolved errors in my Sentry project and their stack tracesA real list of issues with stack traces confirms the integration is live and ready for triage.
Real-World Use Cases
- "What's causing this TypeError? Pull the Sentry issue and propose a fix in the code"
- "Which errors spiked after the latest release?"
- "Summarize this issue's stack trace and tell me which function to look at"
- "Group today's new errors by file and rank them by frequency"
Troubleshooting
OAuth window never opens
Make sure Node 18+ is installed so mcp-remote can run, and fully restart the client. If a stale auth state is cached, clear the ~/.mcp-auth directory and retry.
Authenticated but no issues returned
You likely authorized the wrong organization, or the project has no recent events. Re-run the OAuth flow and pick the correct org, and confirm the project is actually receiving errors in the Sentry UI.
Local server: 401 with auth token
The token is expired or under-scoped. Regenerate it with project:read and event:read, and verify SENTRY_HOST matches your instance.
Security
- Prefer the OAuth hosted server so no long-lived token sits in your config
- If using a local token, scope it to read-only and store it outside any repo
- Revoke tokens you no longer use from Sentry's Auth Tokens page
- Be mindful that stack traces can contain sensitive data — keep them in trusted clients
Frequently Asked Questions
Is there an official Sentry MCP server?
Yes. Sentry maintains an official, hosted remote MCP server at https://mcp.sentry.dev/mcp. It authenticates with OAuth, so you sign in with your Sentry account rather than pasting a token. It exposes tools for listing issues, reading error details and stack traces, searching events, and inspecting projects. A local stdio option is also available for clients that do not support remote servers.
Do I need an auth token or does it use OAuth?
The recommended hosted server at mcp.sentry.dev uses OAuth — you approve access in the browser and never handle a raw token. If you run the local server instead, you authenticate with a Sentry user auth token created under Settings → Account → API → Auth Tokens, scoped to read your projects and issues.
Can the Sentry MCP server help fix bugs, not just read them?
It reads issues, stack traces, and event context, which is exactly what an AI coding assistant needs to propose a fix. The MCP server itself does not edit your code, but once your assistant has the full error context, it can write the patch in your editor. Sentry also exposes its Seer agent tools through MCP for automated root-cause analysis on supported plans.
Can I use the Sentry MCP server with Cursor and VS Code?
Yes. The same hosted remote server works with any MCP client that supports remote servers, including Cursor, VS Code, and Claude Desktop. You add the mcp.sentry.dev URL to the client config; the OAuth flow and available tools are identical across clients.
Why does my Sentry MCP connection fail to authenticate?
For the remote server, an auth failure usually means the OAuth flow did not complete — re-trigger it and make sure you select the correct Sentry organization. For the local server, confirm your auth token is valid, has not expired, and includes project:read and event:read scopes. Self-hosted Sentry users must also point the server at their own instance URL.
More MCP Integrations
Browse the full MCP server directory to connect Stripe, the local filesystem, and 50+ more tools to your AI workflow.