Skip to content

Sentry (MCP)

Overview

OpenSRE connects to Sentry's hosted Model Context Protocol (MCP) server. That exposes Sentry products — issues, events, traces, replays, releases, monitors, and Seer AI root-cause analysis — as tools the agent can call.

This is distinct from the Sentry issue integration, which is a narrower REST client for issue and event lookup. Use MCP when you want the agent to explore Sentry data directly, including Seer-assisted debugging.

"Hosted MCP" here means Sentry's mcp.sentry.dev endpoint — not OpenSRE Cloud.

Prerequisites

  • A Sentry account (hosted SaaS, or self-hosted via the SENTRY_MCP_HOST override)
  • A Sentry user auth token. Required scopes depend on the skills you use:
    • org:read — read-only inspection of issues, events, traces, releases, monitors (default)
    • event:write, team:write, project:write — for triage and project-management skills

Setup

Option 1: Interactive CLI

opensre integrations setup sentry_mcp

Select Sentry (MCP) when prompted, then paste your user auth token. Setup uses the hosted Streamable HTTP transport; keep the default URL unless you run self-hosted Sentry. To run a local server instead, set SENTRY_MCP_MODE=stdio via environment variables.

Option 2: Environment variables

SENTRY_MCP_MODE=streamable-http
SENTRY_MCP_URL=https://mcp.sentry.dev/mcp
SENTRY_MCP_AUTH_TOKEN=your_sentry_user_auth_token
SENTRY_MCP_HOST=                       # optional, self-hosted Sentry host
SENTRY_MCP_ORGANIZATION_SLUG=          # optional, scope to one organization
SENTRY_MCP_PROJECT_SLUG=               # optional, scope to one project
SENTRY_MCP_SKILLS=                     # optional, comma-separated skill filter
Variable Default Description
SENTRY_MCP_AUTH_TOKEN — Required (hosted). Sentry user auth token
SENTRY_MCP_URL https://mcp.sentry.dev/mcp MCP server URL
SENTRY_MCP_MODE streamable-http Transport: streamable-http, sse, or stdio
SENTRY_MCP_HOST — Self-hosted Sentry hostname (for example sentry.example.com)
SENTRY_MCP_ORGANIZATION_SLUG — Scope tools to a specific organization
SENTRY_MCP_PROJECT_SLUG — Scope tools to a specific project
SENTRY_MCP_SKILLS — Comma-separated skill filter (inspect, seer, triage, project-management)
SENTRY_MCP_COMMAND — Command to launch a local MCP server (stdio mode only)
SENTRY_MCP_ARGS — Arguments for the local MCP command (stdio mode only)

To run a local Sentry MCP server instead of the hosted endpoint:

SENTRY_MCP_MODE=stdio
SENTRY_MCP_COMMAND=npx
SENTRY_MCP_ARGS=@sentry/mcp-server@latest
SENTRY_MCP_AUTH_TOKEN=your_sentry_user_auth_token

Info

The search_events and search_issues tools translate natural-language queries and require an OPENAI_API_KEY in the MCP server's environment. The rest of the MCP server works without it.

Option 3: Persistent store

{
  "version": 1,
  "integrations": [
    {
      "id": "sentry-mcp-prod",
      "service": "sentry_mcp",
      "status": "active",
      "credentials": {
        "url": "https://mcp.sentry.dev/mcp",
        "mode": "streamable-http",
        "auth_token": "your_sentry_user_auth_token",
        "organization_slug": "my-org"
      }
    }
  ]
}

Credentials

Create a Sentry user auth token in account settings with at least org:read for read-only investigation. Add write scopes only if you enable triage or project-management skills.

Tools

Tool What it does
list_sentry_tools List tools the connected Sentry MCP server exposes
call_sentry_tool Call a named Sentry MCP tool (issue lookup, trace fetch, Seer analysis, and more)

Typical flow: call list_sentry_tools first, then call_sentry_tool with the chosen name and arguments.

The same connection also gives the agent each Sentry MCP tool as its own typed tool, named mcp__sentry__<tool> (for example mcp__sentry__search_issues), with the server's own description and argument schema. Tools the server marks read-only run like any read; every other one asks for approval the same way call_sentry_tool does. No extra setup is needed. If you also configured a custom MCP server named sentry, that server keeps the name and these typed tools are not added.

Verify

opensre integrations verify sentry_mcp

A successful check connects to the MCP server and reports how many tools it discovered (detail shape: Sentry MCP connected via {mode} ({endpoint}); discovered N tool(s).).

Troubleshooting

Symptom Fix
Missing or invalid token Confirm the user auth token has at least org:read
Cannot reach hosted MCP Allow outbound HTTPS to mcp.sentry.dev
Self-hosted tools missing Set SENTRY_MCP_HOST (and URL/mode as needed)
search_events / search_issues fail Set OPENAI_API_KEY in the MCP server environment

Security

  • Prefer org:read only unless you need write skills.
  • Store SENTRY_MCP_AUTH_TOKEN in .env or your secret manager — not in source control.
  • Scope with SENTRY_MCP_ORGANIZATION_SLUG / SENTRY_MCP_PROJECT_SLUG when possible.

Markdown source: View on AtomGit·Content from the open-source project op/opensre