Sentry MCP Server

Connect your AI coding tools to Sentry using the Model Context Protocol (MCP) for direct access to issues, errors, and debugging data.

The Sentry MCP Server connects your AI coding tools to Sentry using the Model Context Protocol (MCP). It gives your agent direct access to issues, errors, projects, and Seer analysis.

Sentry hosts the MCP server at https://mcp.sentry.dev/mcp. Your client connects over Streamable HTTP with OAuth — there's nothing to install.

Add the server automatically:

Copied
npx add-mcp https://mcp.sentry.dev/mcp

Or add it manually to your client's MCP configuration:

Copied
{
  "mcpServers": {
    "Sentry": {
      "url": "https://mcp.sentry.dev/mcp"
    }
  }
}

When you first connect, you'll be prompted to log in with your Sentry organization and grant access. During authentication, you select which tool groups to expose — this keeps the context window focused on the tools you actually need.

See Client Instructions for setup steps specific to your editor or IDE.

Alternatively, you can run the MCP server locally via npx @sentry/mcp-server. Your IDE spawns the process and communicates over stdin/stdout. This is required for self-hosted Sentry.

For sentry.io users, the server uses device-code authentication. On first run it opens your browser to log in — no manual token creation needed. The token is cached at ~/.sentry/mcp.json for future sessions.

If you're in a non-interactive environment (CI, piped stdio), authenticate ahead of time:

Copied
npx @sentry/mcp-server@latest auth login

You can check or clear your auth state with auth status and auth logout.

Add the server to your client's MCP configuration:

Copied
{
  "mcpServers": {
    "Sentry": {
      "command": "npx",
      "args": ["@sentry/mcp-server@latest"]
    }
  }
}

Restrict the MCP session to a specific organization or project to keep context focused.

Cloud: Append the slug to the URL path:

  • https://mcp.sentry.dev/mcp/my-org — one organization
  • https://mcp.sentry.dev/mcp/my-org/my-project — one project

Stdio: Use CLI flags:

  • --organization-slug=my-org
  • --project-slug=my-project

When scoped, redundant discovery tools are hidden automatically.

Self-hosted instances use the stdio transport with an access token. The Cloud endpoint and device-code OAuth are only available for sentry.io.

Create a token in User Settings → Auth Tokens with these scopes:

  • org:read
  • project:read
  • project:write
  • team:read
  • team:write
  • event:write

Configure the server with your hostname:

Copied
npx @sentry/mcp-server@latest --access-token=YOUR_TOKEN --host=sentry.example.com

Or as environment variables:

Copied
SENTRY_ACCESS_TOKEN=YOUR_TOKEN
SENTRY_HOST=sentry.example.com

JSON config for clients that support it:

Copied
{
  "mcpServers": {
    "Sentry": {
      "command": "npx",
      "args": [
        "@sentry/mcp-server@latest",
        "--access-token=YOUR_TOKEN",
        "--host=sentry.example.com"
      ]
    }
  }
}

Some cloud-only features like Seer aren't available on self-hosted. Disable them:

Copied
npx @sentry/mcp-server@latest --access-token=YOUR_TOKEN --host=sentry.example.com --disable-skills=seer

Paste a Sentry issue URL into your agent. The MCP server pulls the stack trace, event details, and tags so the agent can investigate and propose a fix. Try prompts like:

  • "Fix this issue: https://sentry.io/issues/6811213890/"
  • "What's the root cause of https://my-org.sentry.io/issues/PROJECT-123/?"

Ask questions in plain English. The search_issues and search_events tools translate your queries into Sentry's search syntax:

  • "What are the top unresolved errors in production this week?"
  • "Show me errors that started after the last deploy."
  • "Compare error rates between v2.3 and v2.4 for my-project."

Setup steps for specific editors and IDEs. All instructions default to the Cloud transport — see Stdio Transport if you need the local server.

Setup Instructions
Copied
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp

Launch Claude Code with claude. You'll be prompted to authenticate via OAuth.

Setup Instructions

Go to CursorSettingsCursor SettingsMCP and add the Sentry MCP server. Cursor 1.0+ supports OAuth and Streamable HTTP natively.

You can also edit your mcp.json directly:

Copied
{
  "mcpServers": {
    "Sentry": {
      "url": "https://mcp.sentry.dev/mcp"
    }
  }
}

Setup Instructions

Open CMD + ,DeveloperEdit Config, then add to claude_desktop_config.json:

Copied
{
  "mcpServers": {
    "Sentry": {
      "url": "https://mcp.sentry.dev/mcp"
    }
  }
}

Restart Claude Desktop to pick up the changes.

Setup Instructions

Go to SettingsProfileIntegrationsAdd More, and add:

Copied
https://mcp.sentry.dev/mcp

Setup Instructions

Open the Command Palette (CMD+Shift+P) → MCP: Add Server and enter:

Copied
https://mcp.sentry.dev/mcp

Setup Instructions
Copied
codex mcp add sentry --url https://mcp.sentry.dev/mcp

Launch Codex with codex. You'll be prompted to authenticate via OAuth.

Setup Instructions

Open Cascade (CMD + L) → Configure MCP and add:

Copied
https://mcp.sentry.dev/mcp

Setup Instructions

Go to SettingsMCP Servers+ AddStreamable HTTP or SSE Server (URL):

Copied
{
  "Sentry": {
    "url": "https://mcp.sentry.dev/mcp"
  }
}

Setup Instructions

VS Code Extension — update settings.json:

Copied
"amp.mcpServers": {
    "sentry": {
        "url": "https://mcp.sentry.dev/mcp"
    }
}

CLI:

Copied
amp mcp add sentry --url https://mcp.sentry.dev/mcp

Setup Instructions

Open the MCP menu with /mcpAdd MCP Server from Registry → search for sentry.

Setup Instructions

In the v0.app UI: Prompt ToolsAdd MCP → select Sentry.

Setup Instructions

Add to your opencode.jsonc:

Copied
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "sentry": {
      "type": "remote",
      "url": "https://mcp.sentry.dev/mcp",
      "oauth": {}
    }
  }
}

Then authenticate:

Copied
opencode mcp auth sentry

Setup Instructions

The Sentry MCP Server works with any client that supports OAuth and Streamable HTTP (with SSE fallback). Use https://mcp.sentry.dev/mcp in your client's config.

If your client doesn't support OAuth or Streamable HTTP yet, use the mcp-remote bridge as a workaround.

The Sentry MCP page has a web interface where you can authenticate and test the server directly in your browser.

OAuth Authentication Problems

  • Ensure your client supports OAuth
  • Check that you have the right permissions in your Sentry organization
  • Try reauthenticating (see below)

Reauthenticating in Claude Code

  1. Type /mcp in the Claude Code prompt
  2. Select the Sentry server
  3. Choose "Clear authentication" or "Authenticate" to re-trigger OAuth

Reauthenticating in OpenCode

  1. opencode mcp auth list — check status
  2. opencode mcp logout sentry — log out
  3. opencode mcp auth sentry — log back in

Reauthenticating in Factory Droid

  1. Type /mcp → select Sentry"Reauthenticate"

Connection Issues

  • Verify the URL: https://mcp.sentry.dev/mcp
  • Check your client's MCP config syntax

Missing Tools

  • Verify authentication completed
  • Check your Sentry org access
  • Look for errors in your client's console

For additional help, visit the GitHub repository or contact Sentry support.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").