Home / MCP / Sentry MCP Server

Sentry MCP Server

Provides access to Sentry MCP features via HTTP or local stdio, enabling tool testing and AI-powered queries.

javascript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "sentry": {
            "url": "https://mcp.sentry.dev"
        }
    }
}

You run this MCP server as middleware to access Sentry’s API through development-focused tooling. It supports a remote HTTP connection to a live MCP endpoint and a local stdio setup for quick, self-contained experiments with a dev Sentry install. Use it to test AI-powered search tools, run commands from a CLI, or explore tool availability in an interactive inspector.

How to use

You can connect to the remote MCP server at the production endpoint by using its HTTP configuration, or run a local stdio instance to develop and test against a self-hosted setup.

- HTTP connection: your MCP client talks to https://mcp.sentry.dev to access the remote service. This is the default path for using the live MCP service.

- Local stdio connection: you run the MCP server on your machine and connect via the MCP Inspector or a CLI. This is useful for self-hosted development when you want to iterate quickly.

How to install

Prerequisites: you need Node.js and a compatible package manager installed.

1. Install dependencies and set up your environment for development.

2. Start the development server using the stdio command shown in the official examples.

MCP server connections and setup

Two primary methods are described for connecting to the MCP server:

- HTTP remote server: connect to the live MCP endpoint at https://mcp.sentry.dev.

- Local stdio server: run the MCP server locally with the provided CLI command and pass the required access token.

Security and credentials

You must provide authentication tokens with the appropriate scopes to enable access to Sentry’s MCP features. For the stdio transport, supply an access token that includes read/write scopes for org, project, team, and event resources. When testing AI-powered search tools, also provide an OpenAI API key.

Common environment variables you will use include the following placeholders:

Inspector and testing

Use the MCP Inspector to test the service quickly. Run pnpm inspector, then enter the MCP server URL and connect. If you encounter issues with the OAuth flow on localhost, try using localhost (e.g., http://localhost:6274).

Available tools

Inspector

MCP Inspector to easily test the service by connecting to an MCP URL and triggering the authentication flow.

List Tools

Interactively list available MCP tools after authentication via the inspector.

OpenAI-powered search

AI-assisted search tools (search_events and search_issues) that translate natural language queries into Sentry's query syntax; require an OpenAI API key.