Sentry (Remote) MCP server

Retrieve error and performance data from Sentry.
Back to servers
Provider
Sentry
Release date
Mar 22, 2025
Language
Python
Stats
150 stars

This remote MCP server acts as a middleware between your application and the Sentry API, allowing you to leverage Sentry's capabilities through the Model Context Protocol (MCP). It enables AI assistants and other MCP clients to interact with your Sentry data and perform operations on your behalf.

Installation Options

Using the Public Server

The easiest way to start is by using the deployed service:

https://mcp.sentry.dev

Using the Stdio Transport

For self-hosted Sentry installations, you can use the stdio transport:

  1. Create a Personal API Token (PAT) in Sentry with these scopes:

    • org:read
    • project:read
    • project:write
    • team:read
    • team:write
    • event:read
  2. Launch the transport using npx:

npx @sentry/mcp-server@latest --access-token=sentry-pat --host=sentry.example.com

Alternatively, you can use environment variables:

SENTRY_AUTH_TOKEN=your-token SENTRY_HOST=sentry.example.com npx @sentry/mcp-server@latest

Usage

MCP Inspector

The MCP Inspector is a tool for testing the service:

pnpm inspector

Enter the MCP server URL (http://localhost:5173) and connect. This will trigger the authentication flow.

Note: If you have authentication issues with 127.0.0.1, try using localhost by visiting http://localhost:6274.

Running a Local Server

To run a local development server:

  1. Create an OAuth App in Sentry (Settings > API > Applications):

  2. Create a .dev.vars file with:

SENTRY_CLIENT_ID=your_development_sentry_client_id
SENTRY_CLIENT_SECRET=your_development_sentry_client_secret
  1. Start the server:
pnpm dev
  1. Test by entering http://localhost:8788/sse in the Inspector and connecting

Connecting with MCP Clients

Claude

When using Claude with your MCP server, you may see some error messages as Claude Desktop doesn't fully support remote MCP servers yet. To verify the connection, hover over the 🔨 icon in the bottom right corner of Claude's interface to see your available tools.

Cursor

To connect Cursor with your MCP server:

  1. Choose Type: "Command"
  2. In the Command field, combine the command and args fields:
    npx mcp-remote@latest https://your-worker-name.your-subdomain.workers.dev/sse
    

Cursor supports HTTP+SSE servers but not authentication, so you'll need to use mcp-remote.

Other MCP Clients

For clients like Windsurf, you can add the same JSON configuration used for Claude and restart the client.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later