Sentry MCP — a server that connects the error and performance data Sentry already collects to AI coding tools like Claude Code. Here MCP (Model Context Protocol) is the standard that lets AI tools talk to outside services in a consistent way — plain-language version: a shared connection format so an AI doesn't need to learn a different method for every service. This guide walks through connecting the Sentry MCP server to Claude Code so you can query issues, read stack traces, and analyze root causes without ever leaving the terminal.
🟢 Model references match the current lineup · model notice · Fable subscription
Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (
What you'll be able to do
Following this guide lets you list Sentry issues, read stack traces (the recorded path of code calls leading up to an error), and start root-cause analysis — all inside the Claude Code terminal, with no window switching. If you're already logged into Sentry and belong to the relevant organization, expect it to take about 10-15 minutes.
Before you start
- A Sentry account with membership in the organization you want to connect (admin rights aren't required, but you must belong to the org)
- Claude Code CLI installed and already logged in
- A terminal on macOS, Linux, or Windows (WSL)
- A browser that can open the OAuth authorization screen (disable popup blockers if needed)
- If you run self-hosted Sentry, see the "Local / self-hosted setup" section below instead
Quick term glossary
| Term | Plain-language meaning |
|---|---|
| MCP (Model Context Protocol) | A standard connection format that lets AI tools talk to outside services consistently |
| OAuth | An authentication flow where you log in and approve access, instead of handing over a password directly |
| Transport | The actual communication method used to reach an MCP server (HTTP, in this guide) |
| Token / scope | A token is the key that grants API access; a scope defines what that key is allowed to do |
| Stack trace | A recorded path of code calls leading up to an error |
| DSN | A unique address Sentry uses to identify each project |
| Seer | Sentry's AI-powered root-cause analysis feature |
Step-by-step setup
If you use Sentry.io's cloud service, you can connect over the remote (OAuth) method with no local install. Follow these steps in order.
- Register the server from your terminal. Run the following command exactly as written.
Success signal: you see a confirmation message and return to the prompt without errors.claude mcp add --transport http sentry https://mcp.sentry.dev/mcp - Launch Claude Code and run /mcp. Open Claude Code with
claude, then type/mcp. The sentry server you just registered should appear in the list, along with a prompt that authentication is needed. - Log in and authorize in your browser. In the browser window that opens automatically, log into your Sentry account, select the organization you want to connect, and click the authorize button. Confirm the exact button label on screen, since it may vary.
- Confirm the connection. Back in Claude Code, check the
/mcpscreen — the sentry server should show as connected. Then try a natural-language request like "show me recent Sentry issues" to confirm you get a real response.
What tools are available
The Sentry MCP server offers a range of tools spanning issue search, event and stack trace lookup, project and team management, and documentation search. The exact count and names of tools can change with service updates, so the most reliable way to check is to ask Claude "what can I do with Sentry MCP?" after connecting, or view the list directly on the /mcp screen.
- Issue search and lookup, including natural-language search
- Detailed event and stack trace inspection for a given issue
- Triggering Seer's AI-powered root-cause analysis
- Project, team, and DSN management (when write access is granted)
- Searching official Sentry documentation
Local / self-hosted setup
If you run self-hosted Sentry, use the local execution method instead of the remote URL. Run the local MCP server with the command below, then point it at your self-hosted instance with additional flags.
npx @sentry/mcp-server
Use the --host flag to point at your self-hosted instance, and --insecure-http if your development environment lacks an HTTPS certificate. Confirm the exact flag names and values with the command's help output (--help) or the official documentation, since these can change. This method requires an auth token issued directly from your Sentry organization settings, and that token needs the following scopes.
| Scope | What it allows |
|---|---|
| org:read | Read organization info |
| project:read | Read project info and issues |
| project:write | Create projects and change settings |
| team:read | Read team info |
| team:write | Create teams and manage members |
| event:write | Change issue status, assignment, and related event data |
Security — scoping your organization and tokens tightly
The remote OAuth method is safer to manage than a token you issue yourself. Sentry states that in remote mode, the MCP server does not store, validate, or refresh the upstream token — token lifecycle management is the client's (Claude Code's) responsibility. Keep these principles in mind.
- When issuing a token yourself for local or self-hosted use, grant only the scopes you actually plan to use. If you only need to read data, skip write scopes like
event:write,project:write, andteam:write. - If you use
--scope projectto save configuration into.mcp.jsonfor sharing with a team, reference the token via an environment variable rather than writing it into the file directly — remember this file can end up committed to your git repository. - Revoke tokens you're no longer using from the Sentry side, and rotate them periodically.
Common issues and fixes
Most connection problems trace back to authentication or permissions. Check these first.
- The OAuth login window doesn't appear — disable your browser's popup blocker and run
/mcpagain. - An "organization not found" style error — confirm the Sentry account you're logged into actually belongs to the organization you're trying to connect; you may be signed into a different account.
- Self-hosted Sentry won't connect via the remote URL — the remote
mcp.sentry.devaddress is for Sentry.io cloud only. Use the local execution method above for self-hosted instances. - Tool calls work but return permission errors — your token or account lacks the necessary scope. Reissue the token with the scopes you need.
Next steps
Once connected, fold it into your actual debugging workflow. For example, ask "find any new error issues since yesterday's deploy and show me the related code" — Claude Code will use the Sentry MCP tools to pull the issues and cross-reference them with your repository. If you've also connected another MCP server that exposes similarly named tools, such as a GitHub MCP server, tool names can collide — it's worth checking the /mcp screen to confirm each server's tools are clearly distinguished.
Frequently asked questions
Q. Do I need to install anything to use the Sentry MCP server?
No — if you use Sentry.io cloud, the remote (OAuth) method connects to a server Sentry already hosts, so nothing needs to be installed locally. Just register it with claude mcp add and complete the OAuth login in your browser. For self-hosted Sentry, use npx @sentry/mcp-server to run a local server instead.
Q. Should I use the local method or the remote method?
If you're on Sentry.io cloud, the remote OAuth method is simpler to set up and puts less burden on you for token management. If you run a self-hosted Sentry instance, use the local execution method instead.
Q. How do I ask Claude Code to look up issues once it's connected?
You don't need to know any tool names — just ask in plain language, like "show me error issues from the last 24 hours in Sentry." Claude will pick the right Sentry MCP tool to call on its own.
Q. Is there a risk of tokens or credentials leaking?
In remote OAuth mode, Sentry states that the MCP server does not store, validate, or refresh the upstream token, which means the client is responsible for managing the token's lifecycle. For tokens you issue yourself in local mode, keep scopes minimal and never leave them in plaintext inside a shared file like .mcp.json.
Related articles
- Claude Code MCP Setup: claude mcp add, Scopes, and Transports
- Adding a Custom Connector to Claude Code — Complete MCP Setup Guide
- Claude Code MCP Connectors — How to Link GitHub, Sentry, and Databases
- Claude Code MCP Server Recommendations: What to Connect and How
- Connect Claude to Figma: Figma MCP (Dev Mode) Setup for Claude Code (2026)