Sentry (Remote) MCP server

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

This project provides a remote Model Context Protocol (MCP) server that acts as middleware between AI models and the Sentry API. It allows AI assistants to access Sentry functionality through standardized tools while handling authentication and API interactions.

Installation Options

Using the Public Server

The easiest way to get started is by using the deployed service:

https://mcp.sentry.dev

Local Installation with stdio Transport

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

  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 server using npx:

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

Alternatively, use environment variables:

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

Using MCP Server

Testing with MCP Inspector

The MCP server includes an Inspector for testing:

pnpm inspector

Enter your server URL (https://[domain].workers.dev/sse) and connect. After authentication, you can test the available tools.

Connecting with Claude Desktop

  1. Open Claude Desktop and navigate to Settings (⌘ + ,)
  2. Go to Developer → Edit Config
  3. Replace the content with:
{
  "mcpServers": {
    "math": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp-github-oauth.<your-subdomain>.workers.dev/sse"
      ]
    }
  }
}
  1. Restart Claude Desktop
  2. Complete the authentication flow in the browser window
  3. The Sentry tools will appear under the 🔨 icon in Claude

Connecting with Other MCP Clients

For Cursor:

  • Choose Type: "Command"
  • In the Command field, use: npx mcp-remote https://<your-worker-name>.<your-subdomain>.workers.dev/sse

For other clients like Windsurf:

  • Add the same JSON configuration that was used for Claude
  • Restart the client

Local Development Setup

To develop the MCP server locally:

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

    • Homepage URL: http://localhost:8788
    • Authorized Redirect URIs: http://localhost:8788/callback
    • Note your Client ID and generate a Client secret
  2. Create a .dev.vars file with:

SENTRY_CLIENT_ID=your_development_sentry_client_id
SENTRY_CLIENT_SECRET=your_development_sentry_client_secret
  1. Run the local server:
pnpm dev
  1. Test using the Inspector at http://localhost:8788/sse

Troubleshooting

When using Claude with your MCP server, you might see error messages since Claude Desktop doesn't fully support remote MCP servers yet. To verify the connection, hover over the 🔨 icon in Claude's interface to see if your tools are available.

For any connectivity issues, ensure your OAuth credentials are correct and that you've completed the authentication flow successfully.

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