{
  "markdown": "# sentry-mcp\n\nSentry's MCP service is primarily designed for human-in-the-loop coding agents. Our tool selection and priorities are focused on developer workflows and debugging use cases, rather than providing a general-purpose MCP server for all Sentry functionality.\n\nThis remote MCP server acts as middleware to the upstream Sentry API, optimized for coding assistants like Cursor, Claude Code, and similar development tools. It's based on [Cloudflare's work towards remote MCPs](https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/).\n\n## Getting Started\n\nYou'll find everything you need to know by visiting the deployed service in production:\n\n<https://mcp.sentry.dev>\n\nIf you're looking to contribute, learn how it works, or to run this for self-hosted Sentry, continue below.\n\n### Claude Code Plugin\n\nInstall as a Claude Code plugin for automatic subagent delegation:\n\n```shell\nclaude plugin marketplace add getsentry/sentry-mcp\nclaude plugin install sentry-mcp@sentry-mcp\n```\n\nThis provides a `sentry-mcp` subagent that Claude automatically delegates to when you ask about Sentry errors, issues, traces, or performance.\n\nFor forward-looking tool variants and features:\n\n```shell\nclaude plugin install sentry-mcp@sentry-mcp-experimental\n```\n\n### Stdio vs Remote\n\nWhile this repository is focused on acting as an MCP service, we also support a `stdio` transport. This is still a work in progress, but is the easiest way to adapt run the MCP against a self-hosted Sentry install.\n\n**Note:** The AI-powered search tools (`search_events`, `search_issues`, etc.) require an LLM provider (OpenAI, Azure OpenAI, Anthropic, or OpenRouter). These tools use natural language processing to translate queries into Sentry's query syntax. Without a configured provider, these specific tools will be unavailable, but all other tools will function normally.\n\nTo utilize the `stdio` transport, you'll need to create an User Auth Token in Sentry with the necessary scopes. As of writing this is:\n\n```\norg:read\nproject:read\nproject:write\nteam:read\nteam:write\nevent:write\n```\n\nLaunch the transport:\n\n```shell\nnpx @sentry/mcp-server@latest --access-token=sentry-user-token\n```\n\nNeed to connect to a self-hosted deployment? Add <code>--host</code> (hostname\nonly, e.g. <code>--host=sentry.example.com</code>) when you run the command.\nFor isolated internal deployments that only expose plain HTTP, also add\n<code>--insecure-http</code>.\n\nSome features (like Seer) may not be available on self-hosted instances. You can\ndisable specific skills to prevent unsupported tools from being exposed:\n\n```shell\nnpx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.example.com --disable-skills=seer\n```\n\nFor self-hosted instances without TLS:\n\n```shell\nnpx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.internal:9000 --insecure-http\n```\n\n#### Remote with an Explicit Sentry Token\n\nRemote clients that support custom HTTP headers can pass an upstream Sentry API\ntoken directly to the Cloudflare transport:\n\n```json\n{\n  \"mcpServers\": {\n    \"sentry\": {\n      \"url\": \"https://mcp.sentry.dev/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Sentry-Bearer ${SENTRY_ACCESS_TOKEN}\"\n      }\n    }\n  }\n}\n```\n\n`Sentry-Bearer` is intentionally separate from `Bearer`: `Bearer` is reserved\nfor MCP OAuth access tokens. With `Sentry-Bearer`, the worker does not store,\nvalidate, exchange, or refresh the upstream token. It forwards the token through\nthe same Sentry API calls used by OAuth-backed sessions, and the client or\nupstream provider remains responsible for token lifetime and refresh.\n\nDirect remote auth defaults to all active MCP skills. You can narrow the exposed\ntools with `?skills=inspect,triage` or `?disable-skills=seer`.\n\n#### Environment Variables\n\n```shell\nSENTRY_ACCESS_TOKEN=         # Required: Your Sentry auth token\n\n# LLM Provider Configuration (required for AI-powered search tools)\nEMBEDDED_AGENT_PROVIDER=     # Required when multiple provider keys are set: 'openai', 'azure-openai', 'anthropic', or 'openrouter'\nOPENAI_API_KEY=              # Required if using OpenAI\nANTHROPIC_API_KEY=           # Required if using Anthropic\nOPENROUTER_API_KEY=          # Required if using OpenRouter\nOPENROUTER_MODEL=            # Optional OpenRouter model, defaults to 'openai/gpt-5.6-luna'\nOPENROUTER_REASONING_EFFORT= # Optional OpenRouter reasoning effort, defaults to 'high'\n\n# Optional overrides\nSENTRY_HOST=                 # For self-hosted deployments\nMCP_DISABLE_SKILLS=          # Disable specific skills (comma-separated, e.g. 'seer')\n```\n\n**Important:** Always set `EMBEDDED_AGENT_PROVIDER` to explicitly specify your LLM provider. Auto-detection based on API keys alone is deprecated and will be removed in a future release. See [docs/operations/embedded-agents.md](docs/operations/embedded-agents.md) for detailed configuration options.\n\n#### Example MCP Configuration\n\n```json\n{\n  \"mcpServers\": {\n    \"sentry\": {\n      \"command\": \"npx\",\n      \"args\": [\"@sentry/mcp-server\"],\n      \"env\": {\n        \"SENTRY_ACCESS_TOKEN\": \"your-token\",\n        \"EMBEDDED_AGENT_PROVIDER\": \"openai\",\n        \"OPENAI_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\nIf you leave the host variable unset, the CLI automatically targets the Sentry\nSaaS service. Only set the override when you operate self-hosted Sentry.\n\nFor self-hosted instances that don't support Seer:\n\n```json\n{\n  \"mcpServers\": {\n    \"sentry\": {\n      \"command\": \"npx\",\n      \"args\": [\"@sentry/mcp-server\"],\n      \"env\": {\n        \"SENTRY_ACCESS_TOKEN\": \"your-token\",\n        \"SENTRY_HOST\": \"sentry.example.com\",\n        \"MCP_DISABLE_SKILLS\": \"seer\"\n      }\n    }\n  }\n}\n```\n\n### MCP Inspector\n\nMCP includes an [Inspector](https://modelcontextprotocol.io/docs/tools/inspector), to easily test the service:\n\n```shell\npnpm inspector\n```\n\nEnter the MCP server URL (<http://localhost:5173>) and hit connect. This should trigger the authentication flow for you.\n\nNote: If you have issues with your OAuth flow when accessing the inspector on `127.0.0.1`, try using `localhost` instead by visiting `http://localhost:6274`.\n\n## Local Development\n\nTo contribute changes, you'll need to set up your local environment:\n\n1. **Set up environment and agent skills:**\n\n   ```shell\n   make setup-env  # Creates .env files and installs shared agent skills\n   ```\n\n   This also runs `npx @sentry/dotagents install` to install shared skills from [getsentry/skills](https://github.com/getsentry/skills) into `.agents/skills/` (symlinked into `.claude/skills` and `.cursor/skills`). If you need to update skills later, run it directly:\n\n   ```shell\n   npx @sentry/dotagents install\n   ```\n\n2. **Create an OAuth App in Sentry** (Settings => API => [Applications](https://sentry.io/settings/account/api/applications/)):\n\n   - Homepage URL: `http://localhost:5173`\n   - Authorized Redirect URIs: `http://localhost:5173/oauth/callback`\n   - Note your Client ID and generate a Client secret\n\n3. **Configure your credentials:**\n\n   - Edit `.env` in the root directory and add either `OPENAI_API_KEY` or `OPENROUTER_API_KEY`\n   - Edit `packages/mcp-cloudflare/.env` and add:\n     - `SENTRY_CLIENT_ID=your_development_sentry_client_id`\n     - `SENTRY_CLIENT_SECRET=your_development_sentry_client_secret`\n     - `COOKIE_SECRET=my-super-secret-cookie`\n\n4. **Start the development server:**\n\n   ```shell\n   pnpm dev\n   ```\n\n### Verify\n\nRun the server locally to make it available at `http://localhost:5173`\n\n```shell\npnpm dev\n```\n\nTo test the local server, enter `http://localhost:5173/mcp` into Inspector and hit connect. Once you follow the prompts, you'll be able to \"List Tools\".\n\n### Tests\n\nThere are three test suites included: unit tests, evaluations, and manual testing.\n\n**Unit tests** can be run using:\n\n```shell\npnpm test\n```\n\n**Evaluations** require a `.env` file in the project root with some config:\n\n```shell\n# .env (in project root)\nOPENAI_API_KEY=      # Use OpenAI-backed AI-powered tools\nOPENROUTER_API_KEY=  # Or use OpenRouter-backed AI-powered tools\n```\n\nNote: The root `.env` file provides defaults for all packages. Individual packages can have their own `.env` files to override these defaults during development.\n\nOnce that's done you can run them using:\n\n```shell\npnpm eval\n```\n\n**Manual testing** (preferred for testing MCP changes):\n\n```shell\n# Test with local dev server (default: http://localhost:5173)\npnpm -w run cli \"who am I?\"\n\n# Test against production\npnpm -w run cli --mcp-host=https://mcp.sentry.dev \"query\"\n\n# Test with local stdio mode (requires SENTRY_ACCESS_TOKEN)\npnpm -w run cli --access-token=TOKEN \"query\"\n```\n\nNote: The CLI defaults to `http://localhost:5173`. Override with `--mcp-host` or set `MCP_URL` environment variable.\n\n**Comprehensive testing playbooks:**\n- **Stdio testing:** See `docs/testing/stdio.md` for complete guide on building, running, and testing the stdio implementation (IDEs, MCP Inspector)\n- **Remote testing:** See `docs/testing/remote.md` for complete guide on testing the remote server (OAuth, web UI, CLI client)\n\n## Development Notes\n\n### Automated Code Review\n\nThis repository uses automated code review tools (like Cursor BugBot) to help identify potential issues in pull requests. These tools provide helpful feedback and suggestions, but **we do not recommend making these checks required** as the accuracy is still evolving and can produce false positives.\n\nThe automated reviews should be treated as:\n\n- ✅ **Helpful suggestions** to consider during code review\n- ✅ **Starting points** for discussion and improvement\n- ❌ **Not blocking requirements** for merging PRs\n- ❌ **Not replacements** for human code review\n\nWhen addressing automated feedback, focus on the underlying concerns rather than strictly following every suggestion.\n\n### Contributor Documentation\n\nLooking to contribute or explore the full documentation map? See `CLAUDE.md` (also available as `AGENTS.md`) for contributor workflows and the complete docs index. The `docs/` folder contains the per-topic guides and tool-integrated `.md` files.\n",
  "bytes": 10044,
  "sha": "93918e5ab05521fb422d3de3d76a63b63a1073c112d7bcd26153bf83d5a1c527",
  "repo_slug": "getsentry/sentry-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_getsentry_sentry_mcp_c20ddad0/readme"
}