Agentbrisk
developer-tools TypeScript Official

Sentry

Give AI agents live access to your production errors, stack traces, and performance data


Sentry's official MCP server connects AI agents to live production error data through the Model Context Protocol. Agents can list issues, fetch stack traces, query distributed traces, search events with natural language, and pull project-level analytics, all from within a coding session or automated workflow.

Production errors do not wait for business hours, and they do not explain themselves. A stack trace in Sentry points at the line that failed. What it does not do is tell you why the logic was wrong, what changed recently, or what a reasonable fix looks like. That last part is where AI agents enter the picture, and the Sentry MCP server is what makes that connection possible.

This review covers what the server actually does, how well the debugging workflow holds up in practice, where it genuinely saves time, and where the "AI fixes your prod bug" story gets complicated.

What the Sentry MCP server is

The Sentry MCP server is Sentry's official implementation of the Model Context Protocol for their error tracking and performance monitoring platform. It was released in 2025 and maintained by Sentry's own engineering team, not a community port.

The server ships in two forms. The hosted version runs at mcp.sentry.dev and authenticates via browser OAuth, which means no credentials in config files and no manual token rotation. The local version runs as a stdio process via npx @sentry/mcp-server@latest and authenticates with a user token you generate on the Sentry dashboard.

The tools the server exposes map directly to how developers actually use Sentry. You can list issues filtered by project, environment, or status. You can fetch the full event detail for a specific issue ID, including the complete stack trace, breadcrumbs, and request context. You can query distributed traces for performance investigations. The AI-powered search tools, search_events and search_issues, accept natural language queries and translate them into Sentry's query syntax automatically.

Sentry also integrates their internal Seer AI analysis into the MCP surface. When Seer has generated a root cause suggestion for an issue, that analysis is accessible to the agent alongside the raw event data. It's a useful signal, though it varies in quality depending on the error type and the amount of context Sentry has collected.

Authentication: hosted versus local

For sentry.io accounts, the hosted server is the right starting point. The setup command is a single line:

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

This configures the remote server in your MCP client config automatically. On first use, the client opens a browser for OAuth authentication and caches the result at ~/.sentry/mcp.json. From that point forward, reconnecting to a new organization requires re-authentication, which is a minor friction point if you work across multiple Sentry orgs.

For self-hosted Sentry instances, the OAuth path is not available. You generate a user auth token in your Sentry settings with the required scopes: org:read, project:read, project:write, team:read, team:write, event:write. The event:write scope may look odd for a read-heavy debugging workflow, but some tools require it even for operations that look like reads at the surface.

The local stdio transport is also the required path if you're running the server in CI or in environments where outbound browser-based auth is not practical. In that case, use auth login ahead of time to cache credentials, then reference the cached token in your automation setup.

The debugging workflow in practice

The core workflow the Sentry MCP server enables looks like this: a developer pastes a Sentry issue URL into Claude or another agent, the agent fetches the full event including the stack trace, reads the relevant source code, and proposes a fix. On paper this is a compelling loop. In practice it works, but with important qualifications.

The retrieval side is solid. The agent consistently pulls the right event, parses the stack trace correctly, and identifies the relevant file and line. Stack traces from Python, JavaScript, and TypeScript applications come through cleanly. The context Sentry attaches, breadcrumbs, request headers, environment variables, user data if configured, gives the agent more signal than a bare exception would.

The analysis quality depends heavily on codebase familiarity. If the agent has access to the source code (via Claude Code with the relevant files open, or a filesystem MCP server), the fix suggestions are often correct or close to correct for straightforward errors: null reference exceptions, type mismatches, missing error handling. For errors that reflect architectural decisions or require understanding of data flow across multiple services, the suggestions become more speculative. The agent produces something plausible-looking but not necessarily right.

This is not a criticism unique to Sentry MCP. It's the general constraint on any AI debugging workflow: the model reasons from the evidence it can see, and production bugs often hide in the evidence it cannot. The Sentry MCP server puts the best available evidence in front of the agent. What the agent does with it still depends on the quality of the reasoning model and the scope of its codebase access.

One capability that earns its place beyond the basic debugging loop is the natural language search. Rather than constructing Sentry query syntax manually, you can ask the agent to find all unhandled errors in the payments service in the last 24 hours, or to surface issues that regressed after the most recent deploy. The agent uses the search_issues or search_events tool, which translates the query into Sentry's filter syntax and returns the matching results.

This is useful even when you're not debugging a specific error. It turns Sentry into something you can interrogate conversationally, which changes how you monitor a service in a live situation. During an incident, asking an agent to find the first occurrence of this error type and trace it back to what changed is faster than navigating the Sentry UI under pressure.

The limitation is that the AI-powered search tools require an LLM provider on the backend. The hosted server at mcp.sentry.dev handles this transparently. If you're running the local stdio transport, you need either an OPENAI_API_KEY or an Anthropic API key configured for the server process. This is documented but easy to miss, and the failure mode when it's missing is a cryptic error rather than a clear message.

What agents can reasonably do autonomously

The cleaner side of the capability set, from a risk perspective, is read-only investigation. An agent that lists open issues, fetches the top ten by frequency, summarizes what they are and which services they affect, and surfaces that summary in a Slack message or a daily report is doing something genuinely useful with very low risk of causing harm.

More autonomous workflows require more care. An agent that detects a new error, fetches the stack trace, checks out a branch, writes a fix, and opens a pull request is doing something that Devin or similar autonomous coding agents are designed for. The Sentry MCP server gives any of those agents the production error signal they need to trigger that loop. Whether you trust the loop end-to-end depends on your test coverage, your code review process, and the severity of the service involved.

For teams evaluating which coding agent to pair with Sentry MCP for fully autonomous debugging, the best AI agent for coding guide covers how different tools handle tool-calling, code editing, and pull request workflows.

Seer analysis

Sentry has been building their own AI debugging layer called Seer, which analyzes issues and generates root cause hypotheses using Sentry's proprietary training data. When Seer has analyzed an issue, that analysis is included in what the MCP server returns to the agent.

The practical value of this depends on how often Seer produces useful analysis for your error types. For common error patterns, Seer's suggestions and the agent's independent analysis sometimes converge, which is mild confirmation. For more obscure errors, Seer often declines to produce a suggestion, and the agent is working from the raw event data alone.

Seer analysis is only available on sentry.io, not on self-hosted instances. If your organization runs Sentry internally, you get the raw event data but not the additional AI layer.

Limitations worth knowing

The MCP protocol itself is still evolving, and Sentry's documentation acknowledges that rough edges exist. A few worth noting specifically.

Client support for OAuth is not universal. Clients that support only the older stdio transport need a mcp-remote bridge to connect to the hosted server. The documentation covers this, but it adds a setup step that is not obvious if you hit it for the first time.

Re-authentication is required when you join a new Sentry organization. The token cached at ~/.sentry/mcp.json is organization-scoped, so if your work spans multiple orgs, you'll authenticate more than once. This is a minor friction, not a blocker.

The local stdio transport's dependency on an external LLM provider for AI search tools is a meaningful limitation for teams that want a fully self-contained local setup. If you're in an environment where data cannot leave your network, the natural language search capability may not be available to you.

Finally, some tools behave differently or are unavailable depending on your Sentry version. The documentation is oriented toward sentry.io. Self-hosted users should verify tool compatibility against their specific version before building workflows that depend on a specific tool being available.

Connecting Sentry MCP to your development setup

For most developers using Claude Code, the setup is one command and a browser login. The Sentry tools appear in the tool list immediately after restart and are available in any conversation. You can paste a Sentry issue URL into a conversation and ask Claude to investigate it, or you can start from a description of a symptom and ask Claude to search Sentry for matching events.

The more powerful setup is pairing Sentry MCP with a filesystem or code-reading MCP server so the agent has access to both the error context from Sentry and the source code it points at. Without source access, the agent can describe what went wrong and reason about likely causes. With source access, it can read the actual function that failed and produce a more grounded analysis.

If you're exploring the broader MCP server ecosystem for other tools that complement a debugging workflow, GitHub MCP and filesystem MCP are the most natural additions alongside Sentry. GitHub gives the agent access to recent commit history and pull requests, which is useful context for understanding what changed. Filesystem access gives it the source code. Together with Sentry's error data, those three inputs cover most of what a human developer looks at when investigating a production issue.

Honest assessment

The Sentry MCP server is one of the more immediately practical vendor MCP implementations available. Error data is exactly the kind of context that agents need but cannot generate on their own. Production stack traces, breadcrumbs, and event frequency are real-world signals that change what an agent can do in a debugging session.

The debugging workflow it enables is real, not theoretical. Fetch error, read code, suggest fix is a loop that produces useful output for a meaningful portion of production issues, particularly the ones that are straightforward to diagnose once you have the right context in front of you.

What it does not do is make AI debugging reliable enough to remove humans from the loop on consequential services. The agent will produce plausible suggestions on errors it cannot fully reason about. The fix will look reasonable. Whether it is correct requires the same code review it would get from any other contributor.

Used as an investigation accelerator rather than an autonomous repair system, Sentry MCP earns its place in a production engineering workflow. It shortens the time between "something is wrong in production" and "someone is looking at the right information," which is often the most expensive part of incident response.

Features

  • List and filter Sentry issues by project, environment, and status
  • Fetch full event details including stack traces and breadcrumbs
  • Query distributed traces for performance investigation
  • Natural language event and issue search via AI-powered search tools
  • Seer analysis integration for Sentry-side root cause suggestions
  • OAuth authentication for sentry.io with no manual token handling
  • Self-hosted Sentry support with scoped access tokens

How to set up the Sentry MCP server

  1. Run npx add-mcp https://mcp.sentry.dev/mcp to auto-configure the remote server in your MCP client
  2. Authenticate via browser OAuth when prompted (sentry.io accounts only)
  3. For self-hosted Sentry, create a user auth token with org:read, project:read, event:write scopes
  4. Add the local server with npx @sentry/mcp-server@latest --access-token=YOUR_TOKEN
  5. Restart your MCP client and the Sentry tools appear in the tool list

Frequently Asked Questions

What is the Sentry MCP server?
It is Sentry's official Model Context Protocol server that exposes Sentry's error tracking and performance data to AI agents. An agent connected to it can retrieve production issues, fetch stack traces, search events, and pull trace data without a developer navigating the Sentry dashboard manually.
Does the Sentry MCP server work with Claude Code?
Yes. Claude Code supports MCP natively and Sentry explicitly lists it as a supported client. Run npx add-mcp https://mcp.sentry.dev/mcp from your project root, authenticate with your Sentry account, and Claude Code gains access to all Sentry tools in the current session.
Can I use Sentry MCP with a self-hosted Sentry instance?
Yes, with some limitations. Self-hosted instances require a user auth token rather than OAuth, and some cloud-only features like Seer analysis are unavailable. The core tools for listing issues, fetching events, and querying traces work on self-hosted versions.
Is an OpenAI API key required?
Only if you run the local stdio transport and want to use the AI-powered search tools like search_events and search_issues. The remote hosted server at mcp.sentry.dev handles that dependency on Sentry's side. Most users on the hosted server do not need a separate LLM API key.
What permissions does the Sentry auth token need?
For self-hosted setups, the token needs org:read, project:read, project:write, team:read, team:write, and event:write scopes. For sentry.io, the OAuth flow handles permission scoping automatically.
Search