# Sentry MCP server

> Lets an AI coding agent query Sentry issues, errors, traces, and projects to debug and triage problems.

- Repository: https://github.com/getsentry/toolkit
- Page: https://hostedmcp.org/servers/getsentry/toolkit
- Official: yes
- Transport: stdio
- Stars: 963

## Install

### Claude Code

```sh
claude mcp add toolkit -- npx -y @sentry/mcp-server
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "toolkit": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"toolkit","type":"stdio","command":"npx","args":["-y","@sentry/mcp-server"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add toolkit -- npx -y @sentry/mcp-server
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.toolkit]
command = "npx"
args = ["-y", "@sentry/mcp-server"]
```

### Gemini CLI

```sh
gemini mcp add -s user toolkit npx -- -y @sentry/mcp-server
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `ANTHROPIC_API_KEY` | no | no |  |
| `EMBEDDED_AGENT_PROVIDER` | no | no |  |
| `MCP_DISABLE_SKILLS` | no | no |  |
| `MCP_SKILLS` | no | no |  |
| `OPENAI_API_KEY` | no | no |  |
| `OPENROUTER_API_KEY` | no | no |  |
| `OPENROUTER_MODEL` | no | no |  |
| `OPENROUTER_REASONING_EFFORT` | no | no |  |
| `SENTRY_AUTH_TOKEN` | no | no |  |
| `SENTRY_HOST` | no | no |  |
| `SENTRY_URL` | no | no |  |

## FAQ

### How do I connect the Sentry MCP server to Claude Code?

Install the Sentry CLI, log in with `sentry auth login`, then run `claude mcp add sentry -- sentry mcp`, or install it as a Claude Code plugin from the getsentry/sentry-mcp marketplace.

### What authentication does the Sentry MCP server use?

It supports OAuth for the remote service, or you can pass a Sentry user auth token via SENTRY_AUTH_TOKEN or the Sentry-Bearer header. The CLI login can also supply credentials without a token.

### Do the AI-powered search tools need an LLM provider?

Yes. Tools like search_errors and search_traces require an OpenAI, Azure OpenAI, Anthropic, or OpenRouter key; other tools work without one.

### How can I limit which Sentry tools an agent sees?

Pass a skills list or disable skills via the `?skills=` / `?disable-skills=` URL params for remote, or the MCP_SKILLS and MCP_DISABLE_SKILLS environment variables for stdio.
