Triage issues, read stack frames, trace breadcrumbs and check debug symbols in your self-hosted Sentry. 28 tools, built so agents stay inside their context window: compact by default, with filters, grep and pagination to narrow further, and a 50k-token budget on list and detail tools.
| Issue | Events | Users | First Seen |
|---|---|---|---|
| TypeError: Cannot read property 'x' | 3,432 | 122 | 2d ago |
| DBConnectionError: timeout | 1,987 | 98 | 3d ago |
| ChunkLoadError: Loading chunk 23 failed | 1,102 | 76 | 5d ago |
Sentry is powerful, but its API is hostile to an agent's context window.
A single Sentry event endpoint can return 100K+ tokens — more than most models can hold.
Copy-paste, clicking around, exporting data — slow and error-prone.
The server talks only to your Sentry instance. Tool results go to whichever LLM client you connect, and on to its model provider.
Stack frames, breadcrumbs and missing dSYMs sit deep inside payloads full of noise.
An MCP server that exposes your Sentry data to AI assistants, sized for their context window.
List, search and inspect issues and events with Sentry query syntax.
Structured frames pulled out of the event, with an in-app-only filter.
The trail of events leading up to an error, filterable by type.
Spot missing iOS/macOS debug symbols and Android ProGuard mappings.
Fingerprint hashes, per-event grouping breakdowns, release health and distributed traces.
Field filters, grep patterns, stack truncation and cursor pagination. List and detail tools apply a 50k-token budget.
Configure your AI client to use the MCP server.
Settings → Auth Tokens. Grant org:read, project:read, team:read, event:read and project:releases.
Pick your client below. Each tab shows where the file lives.
Ask “list unresolved issues in my-project” to confirm the server loaded.
Use 1.2.0 or later. Earlier versions are deprecated: they can send your Sentry token to arbitrary hosts through raw_sentry_api and ignore SENTRY_READ_ONLY. If you ran one with an agent, rotate the token. See the changelog.
Project scope → .mcp.json in your repo root — gitignore it, it holds a token. User scope → claude mcp add --scope user, which keeps it out of the repo entirely.
{
"mcpServers": {
"sentry": {
"type": "stdio",
"command": "npx",
"args": ["-y", "selfhosted-sentry-mcp@latest"],
"env": {
"SENTRY_URL": "https://sentry.yourcompany.com",
"SENTRY_AUTH_TOKEN": "<your-token>",
"SENTRY_ORG_SLUG": "your-org",
"SENTRY_READ_ONLY": "true"
}
}
}
}
Project scope → .cursor/mcp.json. Global → ~/.cursor/mcp.json.
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "selfhosted-sentry-mcp@latest"],
"env": {
"SENTRY_URL": "https://sentry.yourcompany.com",
"SENTRY_AUTH_TOKEN": "<your-token>",
"SENTRY_ORG_SLUG": "your-org",
"SENTRY_READ_ONLY": "true"
}
}
}
}
macOS → ~/Library/Application Support/Claude/claude_desktop_config.json. Windows → %APPDATA%\Claude\claude_desktop_config.json. Restart the app after editing.
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "selfhosted-sentry-mcp@latest"],
"env": {
"SENTRY_URL": "https://sentry.yourcompany.com",
"SENTRY_AUTH_TOKEN": "<your-token>",
"SENTRY_ORG_SLUG": "your-org",
"SENTRY_READ_ONLY": "true"
}
}
}
}
Windsurf → ~/.codeium/windsurf/mcp_config.json. Check your Windsurf version's docs if that path has moved.
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "selfhosted-sentry-mcp@latest"],
"env": {
"SENTRY_URL": "https://sentry.yourcompany.com",
"SENTRY_AUTH_TOKEN": "<your-token>",
"SENTRY_ORG_SLUG": "your-org",
"SENTRY_READ_ONLY": "true"
}
}
}
}
WRITE marks tools that can modify Sentry. raw_sentry_api accepts GET, POST, PUT and DELETE,
so it can reach any endpoint your token permits. SENTRY_READ_ONLY=true hides and refuses the four mutating tools
and restricts raw_sentry_api to GET — it is opt-in, and off by default.
Know where your data goes.
Runs on your machine and talks only to your Sentry instance. Results are sent to whatever LLM client you connect.
Uses your Sentry auth token, read from the environment. No password, no storage.
Five tools can write to Sentry. SENTRY_READ_ONLY=true blocks them; it is opt-in, not the default. Bulk updates refuse to run without a query or an explicit ID list.
MIT licensed and auditable. See SECURITY.md for token scoping guidance.
Install selfhosted-sentry-mcp from npm and point it at your Sentry instance.