The Sentry Issue MCP server allows you to access and analyze Sentry issues directly from your LLM interface. It provides tools for retrieving individual issues or lists of issues from your Sentry projects, enabling you to analyze error data and get recommendations for fixes.
To use the Sentry Issue MCP server, you'll need to configure it in your MCP-enabled LLM system. The server runs via Node.js using npx.
Add the following configuration to your MCP server setup:
"mcpServers": {
"sentry-issue-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"sentry-issues-mcp@latest"
],
"env": {
"SENTRY_HOST": "<your_sentry_host>",
"SENTRY_ORG": "<your_sentry_org>",
"SENTRY_PROJ": "<your_sentry_proj>",
"SENTRY_USER_TOKEN": "<your_sentry_user_token>"
}
}
}
Replace the placeholder values with your actual Sentry credentials:
<your_sentry_host>
: Your Sentry host URL<your_sentry_org>
: Your Sentry organization ID or slug<your_sentry_proj>
: Your Sentry project ID or slug<your_sentry_user_token>
: Your Sentry API tokenThe MCP server provides two main tools for interacting with Sentry:
This tool retrieves a single Sentry issue by URL or ID.
Inputs:
url_or_id
: Sentry issue URL or Sentry issue IDorganization_id_or_slug
: (Optional) Sentry organization ID or slugThis tool retrieves a list of issues from a specific Sentry project.
Inputs:
project_id_or_slug
: Sentry project ID or slugorganization_id_or_slug
: (Optional) Sentry organization ID or slugHere are some practical examples of how to use the Sentry Issue MCP with your LLM:
To analyze a specific Sentry issue, you can prompt your LLM with:
Analysis the issue, and give me the reason of it, and tell me how to fix it, {sentry_issue_url}
Replace {sentry_issue_url}
with the actual URL of the Sentry issue you want to analyze.
To find and analyze the most critical issues from the past 24 hours:
Find today most dangerous issue, and give me the reason of it, and tell me how to fix it
The LLM will use the get-issues tool to retrieve recent issues and then analyze the most severe one.
If the MCP server doesn't respond as expected:
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.