Sentry MCP Server
Provides tools for searching and analyzing Sentry issues, events, and traces, including issue search, trace lookup, issue details, and pattern analysis.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sentry MCP Server Check for unresolved errors in the last 24 hours"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sentry MCP Server
Forked from elad12390/loki-mcp — retargeted from Grafana Loki to Sentry. Same "few sharp tools, no config" ergonomics, new backend. This repo keeps the original's git history.
An MCP server to easily search and analyze Sentry issues, events, and traces — without writing Sentry queries or clicking through the UI.
This is a focused, fast alternative to the official Sentry MCP: a small, predictable tool set modeled on a battle-tested log-search MCP, talking directly to the Sentry REST API.
Quick Start
You can run this server directly using npx:
export SENTRY_AUTH_TOKEN="sntryu_..." # Sentry auth token (see Configuration)
export SENTRY_URL="https://us.sentry.io" # your region/host (default: https://sentry.io)
export SENTRY_ORG="my-org" # optional; auto-detected if omitted
npx @elad12390/sentry-mcpRelated MCP server: Glitchtip MCP Server
Features
This MCP server provides 4 tools, 3 resources, and 3 prompts. AI assistants automatically understand when to use each based on natural language.
Tools
🔍 sentry_search_issues — Your primary search tool
Just say: "check sentry", "what's breaking", "show me errors", "unresolved issues", "top errors", "how many errors"
Searches grouped issues across ALL projects automatically (or filter by
project)Uses Sentry search syntax in
query(is:unresolved level:error,release:latest, free text)Set
count=truefor event counts + an ASCII trend chart instead of the issue list
🔗 sentry_trace_lookup — Distributed tracing
Just say: "follow this trace", "what happened in this request", "trace this id across services"
Returns every span and error in a trace, grouped by service, as a timeline
🔎 sentry_get_issue_details — Root cause analysis
Just say: "show the stack trace", "what happened before this error", "why did this fail"
Returns the exception + stack trace, the breadcrumbs (what happened right before), request context, tags, and the trace ID
🧩 sentry_pattern_analysis — Group & rank error patterns
Just say: "group similar errors", "what error types", "do we have one problem or many"
Ranks issue groups by event volume and merges near-duplicate titles into higher-level patterns
Resources (Read-only Data)
sentry://projects — List all projects in the org
Read this first to know what you can filter by
sentry://tags — List all tag keys (searchable metadata)
Shows what you can filter by (environment, release, browser, etc.)
sentry://tags/{key}/values — Get values for a specific tag
Example:
sentry://tags/environment/values
Prompts (Guided Workflows)
debug-error — Search the issue, pull stack trace + breadcrumbs, gauge blast radius
Arguments:
error_text(required),project,time_window
trace-request — Follow a trace ID across services
Arguments:
trace_id(required),time_window
health-check — List projects, count errors + trend, find dominant patterns
Arguments:
project,time_window
Usage Tips for AI Assistants
When the user says "check sentry" or "what's broken", you should:
Read
sentry://projectsif you don't know what projects existUse
sentry_search_issuesas your primary tool — it works across all projectsFollow up with
sentry_get_issue_detailson an interesting issue for the stack trace + breadcrumbsUse
sentry_search_issueswithcount=truewhen they ask "how many" / "is it getting worse"Use
sentry_pattern_analysisduring incidents to see if it's one problem or many
For complex debugging, use the prompts: debug-error, trace-request, health-check.
Example Conversations
User: "Check sentry for errors in the python-fastapi project"
AI: Uses sentry_search_issues with project="python-fastapi", query="is:unresolved"
User: "How many errors happened today?"
AI: Uses sentry_search_issues with count=true, time_window="24h"
User: "Why is PYTHON-FASTAPI-TK failing?"
AI: Uses sentry_get_issue_details with the issue id
User: "Follow trace ce8f0d3961214198a040517b3dfda0d4"
AI: Uses sentry_trace_lookup
Configuration
Set the following environment variables:
SENTRY_AUTH_TOKEN(required): A Sentry auth token. Create one at Settings → Auth Tokens (organization token) or User Settings → Personal Tokens. Required scopes:org:read,project:read,event:read.SENTRY_URL: Base URL of your Sentry instance. Defaulthttps://sentry.io. SaaS users on a specific region should usehttps://us.sentry.io,https://de.sentry.io, etc. Self-hosted: your own host.SENTRY_ORG: Organization slug. Optional — if omitted, the first org the token can access is auto-detected.SENTRY_PROJECT: Default project slug used for tag-value lookups. Optional — defaults to the first project in the org.
Development
bun install
bun run build
bun testSee AGENTS.md for code style and contribution notes.
Available Tools
4 toolssentry_get_issue_detailsA
🔎 ROOT CAUSE TOOL - Use when the user asks: 'what happened before this error', 'show the stack trace', 'get context', 'why did this fail', 'details of this issue', 'what led to this', or as a follow-up after finding an interesting issue with sentry_search_issues. Fetches the full picture of one issue: summary (level, counts, first/last seen), the exception + stack trace, the BREADCRUMBS (the chronological events leading UP TO the error - the equivalent of 'logs before'), request context, tags, and the trace ID for cross-service investigation.
Inputs: issue_id (required), reasoning (required), event, max_frames, +1 more.
sentry_pattern_analysisA
🧩 Use when the user asks: 'group similar errors', 'what error patterns', 'types of errors', 'categorize errors', 'what's the breakdown', 'do we have one problem or many', or during an incident. Sentry already groups events into issues; this tool ranks those issue groups by event volume and merges near-duplicate issue titles (stripping IDs/UUIDs/numbers) into higher-level patterns. ESSENTIAL for incident triage - instantly see whether you have 1 dominant problem or 50 different ones, and which patterns drive the most events.
Inputs: reasoning (required), limit, query, project, +3 more.
sentry_search_issuesA
🔍 THE PRIMARY SENTRY SEARCH TOOL - Use this when the user asks to: 'check sentry', 'look at errors', 'search sentry', 'what's breaking', 'show me errors', 'find this exception', 'any new crashes', 'unresolved issues', 'top errors', 'how many errors', 'error rate', or 'error trend'. Searches grouped issues across the whole org automatically (no project needed) or filtered by a specific project. Uses Sentry search syntax in query (e.g. 'is:unresolved level:error', 'is:unresolved release:latest', free text like a message or exception type). Set count=true to get error event COUNTS and a TREND chart over time instead of the issue list.
Inputs: reasoning (required), sort, count, limit, +5 more.
sentry_trace_lookupA
🔗 TRACE ID LOOKUP TOOL - Use when the user mentions a Sentry trace ID (a 32-char hex string like 'ce8f0d3961214198a040517b3dfda0d4') or asks: 'find this trace', 'what happened in this request', 'follow this trace across services', 'what services touched this request', 'show the trace timeline', or 'distributed trace'. CRITICAL: when a user pastes a trace ID and asks to find/follow it, use THIS tool - not search_issues. It returns every span and error across all projects/services that participated in the trace, grouped by service with a timeline.
Inputs: trace_id (required), reasoning (required), limit, time_window.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool serves a distinct purpose: searching issues, getting full details, analyzing patterns, and looking up traces. There is no overlap or confusion between tool functionalities.
All tools consistently use 'sentry_' prefix and snake_case. However, 'pattern_analysis' lacks a verb (unlike 'get', 'search', 'trace'), making it slightly inconsistent. Overall pattern is clear.
With 4 tools, the set covers the primary investigation and analysis actions for Sentry. It is well-scoped, though it might feel slightly minimal for a platform with many features.
The tools cover search, detail retrieval, pattern analysis, and trace lookup, which are core for investigation. Missing are issue management operations like update or resolve, which limits completeness for full lifecycle.
Maintenance
Related MCP Connectors
Observability for AI apps: investigate traces, logs, LLM usage, replays and crashes; manage alerts.
Investigate errors, track deployments, analyze performance, and manage application monitoring
Manage uptime monitors and incidents and search logs, metrics and traces from an AI assistant.
Query your AI agent traces, root-cause verdicts and issues, and run investigations, from your agent.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI-powered analytics for OpenReplay user sessions through natural language queries. Supports session search, user journey analysis, error tracking, performance metrics, and funnel analysis to understand user behavior patterns.112MIT
- AlicenseAqualityDmaintenanceEnables interaction with Glitchtip error tracking platform through natural language. Provides access to issues, events, projects, teams, and organization management for comprehensive error monitoring and debugging.717 npm3AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Sentry's error tracking and monitoring tools through a unified API, allowing natural language access to Sentry services.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to retrieve and analyze Sentry issues, including error reports, stacktraces, and debugging information from Sentry.io.1MIT