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.
The easiest way to start is by using the deployed service:
https://mcp.sentry.dev
For self-hosted Sentry installations, you can use the stdio transport:
Create a Personal API Token (PAT) in Sentry with these scopes:
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
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.
To run a local development server:
Create an OAuth App in Sentry (Settings > API > Applications):
Create a .dev.vars
file with:
SENTRY_CLIENT_ID=your_development_sentry_client_id
SENTRY_CLIENT_SECRET=your_development_sentry_client_secret
pnpm dev
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.
To connect Cursor with your MCP server:
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
.
For clients like Windsurf, you can add the same JSON configuration used for Claude and restart the client.
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.
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"
]
}
}
}
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.
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.