What is Sentry MCP?
Sentry MCP is an open-source MCP server designed to provide secure, structured access to your Sentry data and actions through the standardized Model Context Protocol. It allows host applications, such as Claude Desktop or IDEs, to interact programmatically with Sentry via MCP-compliant tools and endpoints. It supports both remote and local (stdio) transports, making it flexible for both cloud and self-hosted Sentry installations.
How to Configure
-
Production Use:
Simply access the deployed service at https://mcp.sentry.dev. -
Self-Hosted Sentry (Stdio Transport):
- Create a Sentry User Auth Token with appropriate scopes:
org:read project:read project:write team:read team:write event:write
- Start the MCP server:
npx @sentry/mcp-server@latest --access-token=sentry-user-token --host=sentry.example.com
- Alternatively, configure with environment variables:
SENTRY_ACCESS_TOKEN= SENTRY_HOST=
- Create a Sentry User Auth Token with appropriate scopes:
-
Local Development:
- Create an OAuth App in Sentry with
http://localhost:5173
as the Homepage URL and Redirect URI. - Add your credentials to
.dev.vars
inpackages/mcp-cloudflare/
:SENTRY_CLIENT_ID=your_client_id SENTRY_CLIENT_SECRET=your_client_secret COOKIE_SECRET=my-super-secret-cookie
- Run the server locally:
pnpm dev
- Create an OAuth App in Sentry with
How to Use
- Visit https://mcp.sentry.dev for the hosted server, or run your local/stdio instance as described above.
- Use the MCP Inspector:
- Enter your server URL (e.g.,
http://localhost:5173
) and connect. - Authenticate as prompted (OAuth or access token).
- Discover available tools via the "List Tools" function.
- Invoke desired tool endpoints (e.g., fetch issues, list projects) directly from the Inspector or through an LLM-capable client.
- Enter your server URL (e.g.,
- For self-hosted Sentry, run with relevant tokens and connect with "stdio" mode.
- Run tests with
pnpm test
and LLM-backed evaluation withpnpm eval
(after settingOPENAI_API_KEY
).
Key Features
- Integration with Sentry via MCP-compliant protocol, enabling LLM/agent access to error data and operations
- Supports both remote HTTP(S) and local stdio transports for flexibility across deployment types
- OAuth and token-based authentication for secure access to Sentry resources
- Pre-built set of discoverable, executable tools (actions/endpoints) for automation and data retrieval
- Extensible and open for local development and contribution
- Includes built-in Inspector tool for interactive exploration and testing
Use Cases
- Allow LLM-based agents or copilots to monitor, fetch, or triage Sentry incidents within IDEs or unified desktop environments
- Automate routine Sentry actions such as issue assignment, status changes, or notifications, triggered by AI workflows
- Integrate Sentry observability data into custom dashboards or reporting tools powered by language models
- Enable zero-touch Sentry administration or triaging via secure, standardized API without manual scripting
FAQ
Q1: Can I use Sentry MCP with self-hosted Sentry instances?
Yes, Sentry MCP supports self-hosted instances via the stdio transport mode. You'll need to provide a user authentication token with the necessary permissions and configure the host accordingly.
Q2: Do I need to build an OAuth application to test Sentry MCP locally?
For local development and testing, you'll need to register an OAuth app in your Sentry account and provide its credentials in the project’s configuration files.
Q3: Can LLMs modify my Sentry data through MCP tools?
Yes, tools exposed via MCP can both read and modify data in Sentry, depending on the tool and your token’s permissions. Always restrict provided tokens to only the required scopes.
Q4: How can I test my MCP server integrations?
Use the built-in Inspector tool by connecting to your MCP server URL. This allows you to authenticate, discover, and invoke tools interactively for easy verification.
Q5: What authentication methods are supported?
Sentry MCP supports both OAuth (for remote server) and Access Token-based (for local/stdio) authentication flows.