How to set up the Sentry MCP server in Claude Code, Cursor, VS Code and Codex
Checked against the official docs:
Sentry's official MCP server lets an AI coding assistant look up your Sentry errors, issues, traces and performance data, read Sentry's docs and help with triage, so it can fix bugs from real error reports. Sentry hosts it at https://mcp.sentry.dev/mcp and you sign in with your Sentry account, so there is nothing to install. If you use self-hosted Sentry, you run it on your own machine with the Sentry CLI instead. This guide covers both, for Claude Code, Cursor, VS Code and Codex, plus the problems people hit most. It is based on Sentry's MCP page, the Sentry Toolkit README and the Sentry CLI docs (checked 25 November 2026).
Get new guides by email
New MCP servers and agent tools, checked by hand. Free, unsubscribe anytime.
Paid prompt and rules packs are on the packs page.
Quick answer
- Hosted URL:
https://mcp.sentry.dev/mcp. The first connection opens a Sentry sign-in (OAuth) in your browser. - Limit it to one project (recommended by Sentry): add your organization and project to the end, like
https://mcp.sentry.dev/mcp/my-org/my-project. Use only the organization (https://mcp.sentry.dev/mcp/my-org) to cover all of its projects. - Claude Code:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/my-org/my-project, then run/mcpinside Claude Code to sign in. - Self-hosted Sentry: install the Sentry CLI, log in to your server with it, and add
sentry mcpas a local server (see Option 2).
Free: MCP Starter Checklist
One page: Inspector smoke-test, Claude Code + Cursor connect steps, and the stdout gotcha. Join the list and download it free.
Before you start
- You need a Sentry account with access to the organization you want the assistant to see.
- Find your organization and project names (slugs). These are the short names Sentry uses for them, such as
my-organdmy-project. Swap them into the examples below. - It is built for coding work, not all of Sentry. Sentry says the server is designed for coding assistants working with a person in the loop, and focuses on debugging: searching errors, looking at performance, triaging issues, reading docs and managing projects.
- It can make changes in Sentry, since triaging issues and managing projects are part of what it does. Keep your app set to ask before it runs a tool, and read what it is about to do.
Option 1: the hosted server (most people)
Claude Code
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/my-org/my-projectStart Claude Code, run /mcp, pick sentry and choose Authenticate to sign in through your browser. You can leave the organization and project off the URL, but Sentry recommends limiting it to a project when you can. Stuck on a needs-authentication message? See how to fix Claude Code MCP needs authentication.
Claude Code plugin (optional)
Sentry also ships a Claude Code plugin. It adds a sentry-mcp helper agent (a subagent) that Claude hands Sentry questions to automatically, such as questions about errors, issues, traces or performance:
claude plugin marketplace add getsentry/sentry-mcp
claude plugin install sentry-mcp@sentry-mcpMore on plugins: how to install Claude Code plugins.
Cursor
Sentry's MCP page has an Install MCP Server button for Cursor. To add it by hand, put this in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"sentry": {
"url": "https://mcp.sentry.dev/mcp/my-org/my-project"
}
}
}Save, turn the server on in Cursor, and finish the Sentry sign-in. More Cursor help: how to add an MCP server to Cursor.
VS Code
Open the Command Palette, run MCP: Add Server, choose HTTP, and enter https://mcp.sentry.dev/mcp/my-org/my-project. Or add it to .vscode/mcp.json in your project:
{
"servers": {
"sentry": {
"type": "http",
"url": "https://mcp.sentry.dev/mcp/my-org/my-project"
}
}
}More VS Code help: how to add an MCP server to VS Code.
Codex
codex mcp add sentry --url https://mcp.sentry.dev/mcp/my-org/my-project
codex mcp login sentryThe second command starts the Sentry sign-in. More Codex help: how to add an MCP server to Codex.
Other apps
Any app that supports remote MCP servers over HTTP can use the same URL.
Experimental tools
To try tool versions Sentry is still working on, add ?experimental=1 to the end of the URL, for example https://mcp.sentry.dev/mcp/my-org/my-project?experimental=1.
Option 2: run it locally with the Sentry CLI
Use this for self-hosted Sentry, or if you'd rather run the server on your own machine. The local server uses your Sentry CLI login, so the config needs no token. Install the CLI and log in (macOS or Linux):
curl https://cli.sentry.dev/install -fsS | bash
sentry auth loginThe CLI also installs with brew install getsentry/tools/sentry or npm install -g sentry. On Windows, in PowerShell:
irm https://cli.sentry.dev/install.ps1 | iexThen add it to Claude Code:
claude mcp add sentry -- sentry mcpOther apps take the same command in their config file:
{
"mcpServers": {
"sentry": {
"command": "sentry",
"args": ["mcp"]
}
}
}To limit it to one organization or project, add a target after mcp: my-org/ for an organization (keep the slash at the end) or my-org/my-project for a project. In a config file that looks like "args": ["mcp", "my-org/my-project"].
Self-hosted Sentry
Log the CLI in to your own server, then set SENTRY_HOST in the server's environment:
sentry auth login --url https://sentry.example.com{
"mcpServers": {
"sentry": {
"command": "sentry",
"args": ["mcp"],
"env": {
"SENTRY_HOST": "sentry.example.com"
}
}
}
}If your server only uses plain HTTP, set SENTRY_URL to its http:// address instead. Seer isn't part of self-hosted Sentry, so the Seer tools are left out on self-hosted unless you turn them back on. The full list of options: the sentry mcp command docs.
Search tools need an AI provider when run locally
When you run the server yourself, its AI-powered search tools (such as search_errors, search_issues, search_traces and search_logs) turn your plain-English question into a Sentry search, and that needs an API key from OpenAI, Azure OpenAI, Anthropic or OpenRouter. Without one, those tools are missing but everything else works. Set the provider and key in the environment (put in your own key, and don't commit this file):
{
"mcpServers": {
"sentry": {
"command": "sentry",
"args": ["mcp"],
"env": {
"EMBEDDED_AGENT_PROVIDER": "openai",
"OPENAI_API_KEY": "<your-openai-api-key>"
}
}
}
}Sentry says to always set EMBEDDED_AGENT_PROVIDER rather than relying on it guessing from which key is present.
Common problems and fixes
The sign-in never finished
In Claude Code, run /mcp, pick sentry and authenticate again. In other apps, remove the server and add it again so the sign-in window opens. See also the needs-authentication fix.
The assistant looks in the wrong organization or project
Put your organization and project in the URL (or after sentry mcp). When it's limited this way, tools use that organization and project by default and the tools for finding them are hidden.
The search tools are missing
This happens with the local server when no AI provider is set. Add EMBEDDED_AGENT_PROVIDER and the matching API key as shown above.
"sentry mcp my-org" is refused
For an organization, add a slash at the end: sentry mcp my-org/. A name without the slash is read as a project search.
A tool says Rate Limited
Tool calls count against Sentry's API limits. The server retries short limits by itself. If you see this message, it says when to try again; ask the assistant to run its Sentry calls one at a time instead of many at once.
A warning about --access-token
Older setups used --access-token or SENTRY_ACCESS_TOKEN with npx @sentry/mcp-server. They still work but are deprecated. Log in with sentry auth login instead, or set SENTRY_AUTH_TOKEN.
FAQ
Do I need a Sentry token?
Not for the hosted server: you sign in with OAuth. The local server uses your Sentry CLI login. If you set SENTRY_AUTH_TOKEN, it is used instead of the stored login. Sentry's README lists the token permissions it needs.
Should I use the plugin or just the URL?
In Claude Code, the plugin gives you the same server plus a helper agent that takes Sentry questions automatically. In other apps, add the URL.
Is npx @sentry/mcp-server still supported?
Yes. Sentry calls it the legacy package: it's the same server without the rest of the CLI, for apps that start servers through npx. New setups should use the Sentry CLI's sentry mcp.
Looking for more servers like this? See the best MCP servers for Claude Code.
Sources
Commands and config above come from these official docs. Tools change often, so check them for the latest steps.
- Sentry MCP (mcp.sentry.dev): setup instructions
- Sentry Toolkit README (Sentry MCP section)
- Sentry CLI docs: sentry mcp
PluginStack is independent and not affiliated with or endorsed by the companies mentioned. Spotted something out of date? Email pluginstackai@gmail.com.
Related guides
Tools in this guide
Get new guides by email
New MCP servers and agent tools, checked by hand. Free, unsubscribe anytime.
Paid prompt and rules packs are on the packs page.