# Sentry MCP server

> Enables AI assistants to monitor errors, track issues, and perform debugging using Sentry data.

- Repository: https://github.com/getsentry/toolkit
- Page: https://hostedmcp.org/servers/getsentry/sentry-mcp
- Official: yes
- Transport: stdio, remote
- Stars: 963
- Latest version: 0.49.0

## Install

### Claude Code

```sh
claude mcp add --env 'SENTRY_AUTH_TOKEN=<YOUR_SENTRY_AUTH_TOKEN>' sentry-mcp -- npx -y @sentry/mcp-server
```

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

```json
{
  "mcpServers": {
    "sentry-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ],
      "env": {
        "SENTRY_AUTH_TOKEN": "<YOUR_SENTRY_AUTH_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "sentry-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ],
      "env": {
        "SENTRY_AUTH_TOKEN": "<YOUR_SENTRY_AUTH_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

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

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

```json
{
  "mcpServers": {
    "sentry-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ],
      "env": {
        "SENTRY_AUTH_TOKEN": "<YOUR_SENTRY_AUTH_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add sentry-mcp --env 'SENTRY_AUTH_TOKEN=<YOUR_SENTRY_AUTH_TOKEN>' -- npx -y @sentry/mcp-server
```

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

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

[mcp_servers.sentry-mcp.env]
SENTRY_AUTH_TOKEN = "<YOUR_SENTRY_AUTH_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'SENTRY_AUTH_TOKEN=<YOUR_SENTRY_AUTH_TOKEN>' sentry-mcp npx -- -y @sentry/mcp-server
```

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

```json
{
  "mcpServers": {
    "sentry-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ],
      "env": {
        "SENTRY_AUTH_TOKEN": "<YOUR_SENTRY_AUTH_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SENTRY_AUTH_TOKEN` | no | yes | Sentry auth token. Optional after `npx -y @sentry/mcp-server auth login`. |
| `SENTRY_HOST` | no | no | Self-hosted Sentry hostname or URL. Takes precedence over SENTRY_URL. Defaults to sentry.io. |
| `SENTRY_URL` | no | no | Self-hosted Sentry URL, such as https://sentry.example.com. Defaults to sentry.io. |

## FAQ

### What are the Node.js requirements?

The server requires Node.js version 22.15 or later.
