Sentry'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. This remote MCP server acts as middleware to the upstream Sentry API, optimized for coding assistants like Cursor, Claude Code, and similar devel
Add this skill
npx mdskills install getsentry/sentry-mcpWell-structured MCP server with comprehensive Sentry integration, clear setup paths, and good documentation
1# sentry-mcp23Sentry'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.45This 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/).67## Getting Started89You'll find everything you need to know by visiting the deployed service in production:1011<https://mcp.sentry.dev>1213If you're looking to contribute, learn how it works, or to run this for self-hosted Sentry, continue below.1415### Claude Code Plugin1617Install as a Claude Code plugin for automatic subagent delegation:1819```shell20claude plugin marketplace add getsentry/sentry-mcp21claude plugin install sentry-mcp@sentry-mcp22```2324This provides a `sentry-mcp` subagent that Claude automatically delegates to when you ask about Sentry errors, issues, traces, or performance.2526For experimental features:2728```shell29claude plugin install sentry-mcp@sentry-mcp-experimental30```3132### Stdio vs Remote3334While 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.3536**Note:** The AI-powered search tools (`search_events`, `search_issues`, etc.) require an LLM provider (OpenAI or Anthropic). 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.3738To utilize the `stdio` transport, you'll need to create an User Auth Token in Sentry with the necessary scopes. As of writing this is:3940```41org:read42project:read43project:write44team:read45team:write46event:write47```4849Launch the transport:5051```shell52npx @sentry/mcp-server@latest --access-token=sentry-user-token53```5455Need to connect to a self-hosted deployment? Add <code>--host</code> (hostname56only, e.g. <code>--host=sentry.example.com</code>) when you run the command.5758Some features (like Seer) may not be available on self-hosted instances. You can59disable specific skills to prevent unsupported tools from being exposed:6061```shell62npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.example.com --disable-skills=seer63```6465#### Environment Variables6667```shell68SENTRY_ACCESS_TOKEN= # Required: Your Sentry auth token6970# LLM Provider Configuration (required for AI-powered search tools)71EMBEDDED_AGENT_PROVIDER= # Required: 'openai' or 'anthropic'72OPENAI_API_KEY= # Required if using OpenAI73ANTHROPIC_API_KEY= # Required if using Anthropic7475# Optional overrides76SENTRY_HOST= # For self-hosted deployments77MCP_DISABLE_SKILLS= # Disable specific skills (comma-separated, e.g. 'seer')78```7980**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/embedded-agents.md](docs/embedded-agents.md) for detailed configuration options.8182#### Example MCP Configuration8384```json85{86 "mcpServers": {87 "sentry": {88 "command": "npx",89 "args": ["@sentry/mcp-server"],90 "env": {91 "SENTRY_ACCESS_TOKEN": "your-token",92 "EMBEDDED_AGENT_PROVIDER": "openai",93 "OPENAI_API_KEY": "sk-..."94 }95 }96 }97}98```99100If you leave the host variable unset, the CLI automatically targets the Sentry101SaaS service. Only set the override when you operate self-hosted Sentry.102103For self-hosted instances that don't support Seer:104105```json106{107 "mcpServers": {108 "sentry": {109 "command": "npx",110 "args": ["@sentry/mcp-server"],111 "env": {112 "SENTRY_ACCESS_TOKEN": "your-token",113 "SENTRY_HOST": "sentry.example.com",114 "MCP_DISABLE_SKILLS": "seer"115 }116 }117 }118}119```120121### MCP Inspector122123MCP includes an [Inspector](https://modelcontextprotocol.io/docs/tools/inspector), to easily test the service:124125```shell126pnpm inspector127```128129Enter the MCP server URL (<http://localhost:5173>) and hit connect. This should trigger the authentication flow for you.130131Note: 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`.132133## Local Development134135To contribute changes, you'll need to set up your local environment:1361371. **Set up environment and agent skills:**138139 ```shell140 make setup-env # Creates .env files and installs shared agent skills141 ```142143 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:144145 ```shell146 npx @sentry/dotagents install147 ```1481492. **Create an OAuth App in Sentry** (Settings => API => [Applications](https://sentry.io/settings/account/api/applications/)):150151 - Homepage URL: `http://localhost:5173`152 - Authorized Redirect URIs: `http://localhost:5173/oauth/callback`153 - Note your Client ID and generate a Client secret1541553. **Configure your credentials:**156157 - Edit `.env` in the root directory and add your `OPENAI_API_KEY`158 - Edit `packages/mcp-cloudflare/.env` and add:159 - `SENTRY_CLIENT_ID=your_development_sentry_client_id`160 - `SENTRY_CLIENT_SECRET=your_development_sentry_client_secret`161 - `COOKIE_SECRET=my-super-secret-cookie`1621634. **Start the development server:**164165 ```shell166 pnpm dev167 ```168169### Verify170171Run the server locally to make it available at `http://localhost:5173`172173```shell174pnpm dev175```176177To 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".178179### Tests180181There are three test suites included: unit tests, evaluations, and manual testing.182183**Unit tests** can be run using:184185```shell186pnpm test187```188189**Evaluations** require a `.env` file in the project root with some config:190191```shell192# .env (in project root)193OPENAI_API_KEY= # Also required for AI-powered search tools in production194```195196Note: The root `.env` file provides defaults for all packages. Individual packages can have their own `.env` files to override these defaults during development.197198Once that's done you can run them using:199200```shell201pnpm eval202```203204**Manual testing** (preferred for testing MCP changes):205206```shell207# Test with local dev server (default: http://localhost:5173)208pnpm -w run cli "who am I?"209210# Test agent mode (use_sentry tool only)211pnpm -w run cli --agent "who am I?"212213# Test against production214pnpm -w run cli --mcp-host=https://mcp.sentry.dev "query"215216# Test with local stdio mode (requires SENTRY_ACCESS_TOKEN)217pnpm -w run cli --access-token=TOKEN "query"218```219220Note: The CLI defaults to `http://localhost:5173`. Override with `--mcp-host` or set `MCP_URL` environment variable.221222**Comprehensive testing playbooks:**223- **Stdio testing:** See `docs/testing-stdio.md` for complete guide on building, running, and testing the stdio implementation (IDEs, MCP Inspector)224- **Remote testing:** See `docs/testing-remote.md` for complete guide on testing the remote server (OAuth, web UI, CLI client)225226## Development Notes227228### Automated Code Review229230This 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.231232The automated reviews should be treated as:233234- ✅ **Helpful suggestions** to consider during code review235- ✅ **Starting points** for discussion and improvement236- ❌ **Not blocking requirements** for merging PRs237- ❌ **Not replacements** for human code review238239When addressing automated feedback, focus on the underlying concerns rather than strictly following every suggestion.240241### Contributor Documentation242243Looking 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.244
Full transparency — inspect the skill content before installing.