home / mcp / sentry mcp server

Sentry MCP Server

Middleware MCP server enabling AI-powered access to Sentry data for coding assistants and development workflows.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "getsentry-sentry-mcp": {
      "url": "https://mcp.sentry.dev/mcp",
      "headers": {
        "SENTRY_HOST": "<SENTRY_HOST>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
        "SENTRY_ACCESS_TOKEN": "<SENTRY_ACCESS_TOKEN>",
        "EMBEDDED_AGENT_PROVIDER": "<EMBEDDED_AGENT_PROVIDER>"
      }
    }
  }
}

You can run and use the Sentry MCP Server to connect coding assistants to Sentry data, enabling AI-assisted queries and toolpowered workflows that focus on developer debugging and automation tasks.

How to use

You can access the MCP server through a remote HTTP endpoint or run a local, self-contained transport via stdio. Use the HTTP URL to connect your MCP client to the hosted service, or launch the stdio transport from your development environment to run the server locally and interact directly with your IDE or tooling. The available tools support natural language queries that translate into Sentry’s query language, enabling you to search events, issues, and other data with AI assistance.

How to install

Prerequisites: Node.js and npm or pnpm must be installed on your system. You will also need access to a Sentry account and, if using AI-powered search tools, an approved LLM provider key.

Additional sections

MCP access and configuration: The MCP server is available at the remote endpoint https://mcp.sentry.dev for hosted deployment. If you operate a self-hosted Sentry installation, you can run the local transport by invoking the stdio workflow shown below.

Configuration and security notes

To enable AI-powered search capabilities, you must specify a language model provider and supply the corresponding API keys. The following environment variables control access and provider configuration.

Examples and troubleshooting notes

If you encounter OAuth flow issues in local development, ensure you use localhost as the redirect host in your browser or inspector tool. When testing locally, you can test against the local server at http://localhost:5173 and connect from the MCP Inspector to verify the setup.

Tests and development tips

There are unit tests, evaluations, and manual testing workflows. Run tests with the provided commands in your development environment, and use the inspector tool to validate tool availability and authentication flows.

Available tools

search_events

AI-powered tool to search Sentry events using natural language queries, translating them into Sentry’s query syntax.

search_issues

AI-powered tool to search Sentry issues using natural language queries, translating them into Sentry’s query syntax.

Inspector

Local testing interface to connect to the MCP server URL and verify authentication and tool availability.