Gene Library Courses Download Pricing Contact Sign in
sentry logo
developer-tools Official Website

Sentry MCP Server – Error Analysis and Debugging

Sentry's official MCP server gives AI coding agents structured access to supported Sentry data and debugging tools. Use it to investigate production issues, analyze events and traces, inspect projects and organizations, and support human-in-the-loop debugging and remediation workflows.

#error-tracking#debugging#observability

Overview

Sentry's official MCP server connects compatible AI coding agents to Sentry.
It is designed primarily for human-in-the-loop debugging workflows rather than
as a general-purpose interface to every Sentry API. The server gives an agent
structured access to current Sentry context so it can investigate production
failures without relying only on copied stack traces or static model knowledge.

What the MCP server enables

Depending on the authenticated account, granted scopes, enabled skills, and
available Sentry features, an AI agent can:

  • Identify the authenticated user, organizations, teams, and projects.
  • Search issues and supported event datasets using natural-language queries.
  • Retrieve issue details, events, stack traces, tags, and related resources.
  • Investigate traces, performance context, releases, and debugging metadata.
  • Search Sentry documentation for implementation and troubleshooting guidance.
  • Use supported write tools for selected project, team, issue, or event actions.
  • Use Seer-backed functionality where it is available for the deployment.

When to use it

Use Sentry MCP when a coding agent needs live production context to debug an
application. Typical workflows include finding recent regressions, summarizing
an unresolved issue, inspecting an event and its stack trace, correlating errors
with releases, reviewing trace data, identifying affected projects, and preparing
a proposed code fix for human review.

Connection and authentication

Sentry hosts a remote Streamable HTTP endpoint at
https://mcp.sentry.dev/mcp. The hosted service uses an interactive OAuth flow
and does not use a static API-token header in the standard configuration.

Sentry also publishes the official @sentry/mcp-server npm package for stdio.
The local server reads a user authentication token from SENTRY_ACCESS_TOKEN.
For self-hosted Sentry, SENTRY_HOST can override the default SaaS host.
AI-powered natural-language search tools additionally require an embedded-agent
provider and either an OpenAI or Anthropic API key.

Key considerations

Token scopes and Sentry permissions determine which tools can operate. Sentry's
documented stdio scopes include organization and project read access plus
selected project, team, and event write access. Use the minimum necessary
scopes and require human approval before write operations. Some capabilities,
including Seer, may not exist on self-hosted deployments and can be disabled.
Without an external LLM provider, AI-powered search tools are unavailable in
stdio mode, although other tools continue to work. Treat production error data
as sensitive and store all credentials in a secret manager or environment.

Supported Transports

streamable_http

URL: https://mcp.sentry.dev/mcp

stdio

Command: npx

Args:

  • -y
  • @sentry/mcp-server@latest

Frequently Asked Questions

When should an AI coding agent use the Sentry MCP server?
Use it when debugging requires live Sentry context, such as investigating unresolved issues, reviewing stack traces and events, analyzing traces, checking releases, finding affected projects, or preparing a proposed fix for human review.
What does the Sentry MCP server add to an AI agent's capabilities?
It gives the agent structured access to current Sentry organizations, projects, issues, events, traces, releases, documentation, and supported actions instead of relying only on pasted error messages or static model knowledge.
What can an AI agent access or manage through Sentry MCP?
Depending on permissions and enabled skills, the agent can inspect users, organizations, teams, projects, issues, events, stack traces, tags, traces, releases, and documentation, and use selected write tools exposed by the server.
How is authentication configured for the Sentry MCP server?
The hosted server uses an interactive OAuth flow. The local stdio server reads a Sentry user authentication token from SENTRY_ACCESS_TOKEN. Use the minimum required scopes and keep the token in a secret manager or protected environment variable.
Which transport should be used for the Sentry MCP server?
Use Streamable HTTP with https://mcp.sentry.dev/mcp for Sentry's managed hosted service and OAuth authentication. Use stdio with the official @sentry/mcp-server package when a local process or self-hosted Sentry connection is required.