@vineethnkrishnan/sentry-mcp
v0.1.6
Published
An MCP server for Sentry API, enabling AI assistants to investigate errors and debug issues. Supports self-hosted instances.
Downloads
748
Maintainers
Readme
Sentry MCP Server
A Model Context Protocol (MCP) server that provides AI assistants (Claude, Cursor, etc.) with a comprehensive interface to the Sentry API. Supports both Sentry SaaS and self-hosted instances.
Overview
sentry-mcp allows your AI assistant to directly investigate errors and debug issues from your Sentry account. It enables powerful natural language queries like:
- "What are the top unresolved issues in the
my-frontendproject?" - "Show me the stack trace for issue
12345." - "Search across all projects for
TypeErrorerrors." - "List all organizations and projects I have access to."
Features
- Self-Hosted Support: Works with Sentry SaaS (
sentry.io) and any self-hosted Sentry instance out of the box. - Modular Architecture: Built with clean layered design for high maintainability.
- Type-Safe: Fully implemented in TypeScript with Zod schema validation.
- Comprehensive Coverage: Full access to Organizations, Projects, Issues, and Events.
- LLM-Optimized: Responses are automatically transformed to reduce token usage.
Installation
Using npx (Recommended)
No installation required. Run directly:
npx -y @vineethnkrishnan/sentry-mcpGlobal Install
npm install -g @vineethnkrishnan/sentry-mcp
sentry-mcpFrom Source
git clone https://github.com/vineethkrishnan/mcp-pool.git
cd mcp-pool
npm install
npm run buildConfiguration
Add to your MCP client configuration file:
| Platform | Config file path |
|----------|-----------------|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Sentry SaaS
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "@vineethnkrishnan/sentry-mcp"],
"env": {
"SENTRY_AUTH_TOKEN": "sntrys_...",
"SENTRY_ORG": "my-org"
}
}
}
}Self-Hosted Sentry
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "@vineethnkrishnan/sentry-mcp"],
"env": {
"SENTRY_AUTH_TOKEN": "sntrys_...",
"SENTRY_BASE_URL": "https://sentry.mycompany.com",
"SENTRY_ORG": "my-org"
}
}
}
}Local Build
{
"mcpServers": {
"sentry": {
"command": "node",
"args": ["/absolute/path/to/sentry-mcp/build/index.js"],
"env": {
"SENTRY_AUTH_TOKEN": "sntrys_..."
}
}
}
}Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| SENTRY_AUTH_TOKEN | Yes | - | Sentry authentication token (org-level or user token). |
| SENTRY_BASE_URL | No | https://sentry.io | Base URL for self-hosted Sentry instances. |
| SENTRY_ORG | No | - | Default organization slug. Avoids passing org on every tool call. |
Getting Your Credentials
- Log in to Sentry (or your self-hosted instance)
- Go to Settings > Auth Tokens
- Click Create New Token with
org:read,project:read, andevent:readscopes - Copy the token (starts with
sntrys_)
To find your organization slug, look at your Sentry URL: https://sentry.io/organizations/YOUR-ORG-SLUG/
Response Optimization
All responses are automatically optimized for LLM context windows:
- Internal keys stripped:
pluginActions,pluginContexts,pluginIssues,seenBy,activity,participants, anddistare removed from Sentry responses. - Stack frames truncated: Exception stack traces are capped at the 15 most recent frames per exception, with a
_truncatedmetadata field indicating the original count. - Breadcrumbs truncated: Breadcrumb entries are capped at the 20 most recent entries, with a
_truncatedmetadata field indicating the original count.
This reduces token usage and improves readability for AI assistants.
Documentation
For a full list of available tools, detailed examples, and architectural details, visit the documentation site or refer to the local documentation guide.
Uninstallation
# If installed globally
npm uninstall -g @vineethnkrishnan/sentry-mcpTesting
npm testLicense
This project is licensed under the MIT License.
