Sentry MCP is an MCP service in the official Sentry repository getsentry/sentry-mcp, primarily aimed at "human-in-the-loop" coding agents. Its tool selection and prioritization focus on developer workflows and debugging scenarios, rather than providing a general-purpose MCP server covering all Sentry functionality. This remote MCP server acts as middleware for the upstream Sentry API and is optimized for coding assistants such as Cursor and Claude Code, building on Cloudflare's work on remote MCP.
Main capabilities and uses:
- Provides coding assistants with access to Sentry errors, issues, traces, and performance-related information.
- Provides a Claude Code plugin that, once installed, automatically delegates to the sentry-mcp subagent when users ask about Sentry errors, issues, traces, or performance.
- Supports both remote MCP and stdio transports. The stdio transport is still under development, but it is the simplest way to adapt to self-hosted Sentry installations.
- Provides AI-powered search tools (search_errors, search_traces, search_logs, search_issues, etc.) that can convert natural language queries into Sentry query syntax. These tools require configuring an LLM provider (OpenAI, Azure OpenAI, Anthropic, or OpenRouter); when no provider is configured, these specific tools are unavailable, but other tools work normally.
Usage:
- The production deployment service address is https://mcp.sentry.dev,访问该地址可获取所需信息。
- Installing it as a Claude Code plugin enables automatic subagent delegation.
- When using the stdio transport, you need to create a User Auth Token in Sentry with the necessary permission scopes, then start the transport. When connecting to a self-hosted deployment, add --host when running the command (hostname only, for example --host=sentry.example.com); for isolated internal deployments that expose only plain HTTP, also add --insecure-http.
- Seer is not part of self-hosted Sentry, so when --host points to a non-sentry.io host, the seer skill is removed from the default skill set; if the self-hosted deployment does run Seer, it can be explicitly re-enabled. Other skills can also be disabled to avoid exposing unsupported tools.
- Remote clients that support custom HTTP headers can pass the upstream Sentry API token directly to the Cloudflare transport. Sentry-Bearer and Bearer are intentionally separate: Bearer is reserved for the MCP OAuth access token; when using Sentry-Bearer, the worker does not store, validate, exchange, or refresh the upstream token, but forwards it into the same Sentry API calls as the OAuth session, with token lifecycle and refresh handled by the client or upstream provider.
- Direct remote authentication enables all active MCP skills by default, and the exposed tool scope can be narrowed via ?skills=inspect,triage or ?disable-skills=seer.
- Important: EMBEDDED_AGENT_PROVIDER should always be explicitly set to specify the LLM provider; automatic detection based only on API keys is deprecated and will be removed in a future version.
- If the host variable is not set, the CLI automatically points to the Sentry SaaS service; only set the override when operating self-hosted Sentry. Setting SENTRY_HOST to a self-hosted host will also remove the seer skill from the default set, because self-hosted Sentry does not provide Seer; if the self-hosted deployment does run Seer, it can be opted in via MCP_SKILLS.
- MCP includes an Inspector to facilitate testing the service: enter the MCP server URL (http://localhost:5173)并点击连接,会触发认证流程。若在 If there are problems with the OAuth flow when accessing the inspector via 127.0.0.1, you can instead access it via localhost http://localhost:6274。
Local development:
- Run make setup-env to create the .env file and install shared agent skills, and also run npx @sentry/dotagents install to install shared skills from getsentry/skills into .agents/skills/ (symlinked to .claude/skills and .cursor/skills).
- Create an OAuth App in Sentry (Settings => API => Applications): Homepage URL is http://localhost:5173,Authorized Redirect URIs is http://localhost:5173/oauth/callback,记录 Client ID and generate Client secret.
- Configure credentials: edit the root .env and add OPENAI_API_KEY or OPENROUTER_API_KEY; edit packages/mcp-cloudflare/.env and add SENTRY_CLIENT_ID, SENTRY_CLIENT_SECRET, COOKIE_SECRET.
- Start the development server: pnpm dev, the local server address is http://localhost:5173。测试本地服务器时,在 In Inspector, enter http://localhost:5173/mcp and click connect. After following the prompts, you can "List Tools".
- Includes three test suites: unit tests, evaluations, and manual tests. Evaluations require configuration in the .env file at the project root. Manual testing is the preferred way to test MCP changes; the CLI defaults to using http://localhost:5173,可通过 --mcp-host to override or set the MCP_URL environment variable.
- Comprehensive testing manuals: for stdio testing see docs/testing/stdio.md; for remote testing see docs/testing/remote.md.
Development notes:
- The repository uses automated code review tools (such as Cursor BugBot) to help identify potential issues in pull requests. These tools provide feedback and suggestions, but it is not recommended to make their checks required, because accuracy is still evolving and false positives may occur. Automated review should be regarded as helpful suggestions and a starting point for discussion, not as a blocking requirement for merging PRs, nor as a replacement for human code review.
- Contributor documentation: start with the Toolkit documentation index to learn about the CLI, MCP, and shared guidelines; for repository rules see AGENTS.md, for CLI-specific rules see packages/cli/AGENTS.md.
Applicable scenarios and limitations:
- Applicable scenarios: for developers using coding assistants such as Cursor and Claude Code, for debugging workflows such as Sentry error tracking, issue investigation, tracing, and performance monitoring.
- Limitations: it is not a general-purpose MCP server covering all Sentry features; AI search tools depend on external LLM providers; the stdio transport is still under development; Seer is not available for self-hosted Sentry; automatic detection of EMBEDDED_AGENT_PROVIDER is deprecated.