/ Каталог / Песочница / Sentry
● Официальный getsentry 🔑 Нужен свой ключ

Sentry

автор getsentry · getsentry/sentry-mcp

Let your AI agent do the first 5 minutes of every Sentry investigation — find the issue, pull the stacktrace, identify the bad release.

Sentry's official MCP server. Pull issues by freshness/release/environment, get full stacktraces and breadcrumbs, cross-reference with releases. Turns a 'something's broken' Slack ping into a triaged incident in under a minute.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

sentry.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "sentry",
      "command": "npx",
      "args": [
        "-y",
        "@sentry/mcp-server"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "sentry": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@sentry/mcp-server"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add sentry -- npx -y @sentry/mcp-server

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: Sentry

Triage a fresh production incident in 5 minutes

👤 On-call engineers ⏱ ~5 min intermediate

Когда использовать: PagerDuty just woke you up. Sentry says errors are spiking. You need to know what, why, and whether to revert — fast.

Предварительные требования
  • Sentry org slug + project slug — Look at any Sentry URL: sentry.io/organizations/<ORG>/issues/?project=<ID>
  • Sentry user auth token with event:read and project:read — sentry.io/settings/account/api/auth-tokens/
Поток
  1. Find the top NEW issue in the last hour
    What's the top new issue in our web-prod project in the last hour, ranked by event count?✓ Скопировано
    → Single issue with title, event count, users affected, first seen timestamp
  2. Pull the latest event with full stacktrace + breadcrumbs
    Get the latest event for that issue. Show me the stacktrace, the release, and the last 5 breadcrumbs before the crash.✓ Скопировано
    → File:line of the throwing function + sequence of user actions before the error
  3. Identify the introducing release
    Was this issue first seen in the same release as it appeared, or did it carry over? Compare the release tag.✓ Скопировано
    → Yes/no with confidence — drives revert decision

Итог: A 3-line incident summary you can paste into Slack: what's broken, who's affected, which release caused it, recommended action.

Подводные камни
  • If your release tags aren't wired up, you can't tell which deploy introduced the bug — Set up sentry-cli releases in your CI before relying on this — without it, you're guessing
  • Stacktrace is in minified JS and unreadable — Verify sourcemaps are uploaded — sentry-cli sourcemaps upload should be in your build pipeline
Сочетать с: github · linear

Cross-reference Sentry errors with the GitHub commits that caused them

👤 Senior engineers debugging recurring issues ⏱ ~30 min advanced

Когда использовать: An error keeps coming back after each release. You suspect a specific code path but want to confirm.

Предварительные требования
  • Both Sentry MCP and GitHub MCP installed — See the github guide for setup
  • Releases tagged with git SHA in Sentry — Use sentry-cli releases new $SHA in CI
Поток
  1. List the issue's history across releases
    For Sentry issue WEB-3a91, list every release where it appeared and the event count per release.✓ Скопировано
    → Table showing the issue spiking after specific deploys
  2. For each spike, fetch the diff
    For the 3 releases with the highest event count, use the GitHub MCP to get the commit diff. What files did each release change?✓ Скопировано
    → Common files across the spikes — the smoking gun
  3. Form a root-cause hypothesis
    Based on those diffs, what's the most likely root cause? Be specific — point to the line(s).✓ Скопировано
    → Line-level theory you can validate by checking the code

Итог: A specific code-level hypothesis with evidence from both Sentry's events and GitHub's diffs.

Подводные камни
  • Multiple commits in a release — hard to isolate which one is responsible — Use git bisect style: deploy a build with only half the commits and check if the error rate drops
Сочетать с: github

Generate a weekly engineering quality report from Sentry data

👤 Engineering managers ⏱ ~20 min intermediate

Когда использовать: Friday afternoon, before next week's planning. You want to know if quality is trending up or down.

Предварительные требования
  • Read access to all your projects in Sentry — Token scoped to org:read + project:read + event:read
Поток
  1. Pull error and crash-free session counts for the week
    For our org, give me crash-free session % per project for this week vs last week. Flag any project where it dropped.✓ Скопировано
    → Per-project comparison with deltas
  2. Identify the top contributors to error volume
    What 5 issues are responsible for the most events this week, across all projects?✓ Скопировано
    → Concrete issue list with event counts and links
  3. Suggest focus for next week
    Based on this data, what should the team prioritize fixing next week? Consider both volume and user impact.✓ Скопировано
    → 3 prioritized recommendations with reasoning

Итог: A 1-page report you can share in your weekly engineering review with concrete priorities.

Подводные камни
  • Volume metrics are dominated by one noisy issue, masking everything else — Filter that issue out and re-rank — sometimes the noisiest isn't the most important
Сочетать с: linear · notion

Quantify the user impact of a known bug before deciding to fix

👤 Product managers, tech leads triaging the bug backlog ⏱ ~15 min beginner

Когда использовать: There's a known bug and the team is debating priority. You need data, not opinions.

Поток
  1. Pull the issue's user impact stats
    For Sentry issue WEB-3a91, how many unique users have hit it in the last 30 days, and what % of total active users is that?✓ Скопировано
    → Absolute count + percentage
  2. Segment the affected users
    Among affected users, what's the distribution by browser, OS, and account tier (paid vs free)?✓ Скопировано
    → Breakdown that reveals if it's an edge-case or core-flow issue
  3. Compare to other open issues
    Rank our top 10 open bugs by users-affected this month. Where does this one sit?✓ Скопировано
    → Context for prioritization

Итог: A data-driven priority recommendation: fix now, fix this sprint, or defer.

Комбинации

Сочетайте с другими MCP — эффект x10

sentry + github

Sentry → identify bad release → GitHub → find the commit that introduced it → draft revert PR

Issue WEB-3a91 spiked after release [email protected]. Find the commits in that release on GitHub, identify the most likely culprit, and draft a revert PR.✓ Скопировано
sentry + linear

Auto-create Linear issues from new Sentry issues exceeding an event threshold

Find any new Sentry issues from the last 24h with >100 events. For each, create a Linear bug ticket assigned to the on-call engineer.✓ Скопировано
sentry + notion

Weekly engineering quality report posted to Notion

Pull this week's Sentry stats and create a Notion page in the Engineering / Weekly Reports database.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
list_issues organization, project, query?, sort?, limit? Search the issue stream by status/release/environment/age 1 API call
get_issue issue_id Get full metadata for a specific issue including release range 1 API call
get_event issue_id, event_id? Pull the actual stacktrace and breadcrumbs for debugging 1 API call
list_releases organization, project See deploy timeline and which release introduced what 1 API call
list_projects organization Discover what projects exist in your org 1 API call

Стоимость и лимиты

Во что обходится

Квота API
Sentry: 40 req/sec per token (very generous). No daily cap on the API itself.
Токенов на вызов
200–1000 tokens per issue/event response; large stacktraces can hit 5k
Деньги
Free tier: 5k errors/month. Paid plans bill on event volume, not API usage.
Совет
API is free; what you're really paying for is event ingestion. Use sampling rules in Sentry itself to keep ingestion costs predictable.

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: org:read project:read event:read
Хранение учётных данных: Sentry user auth token in env var SENTRY_AUTH_TOKEN
Исходящий трафик: All calls to your Sentry instance (sentry.io or self-hosted)
Никогда не давайте: org:write project:admin member:write

Устранение неполадок

Частые ошибки и исправления

401 Invalid token

Token expired or doesn't have the requested scopes. Re-create at sentry.io/settings/account/api/auth-tokens/

Проверить: curl -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" https://sentry.io/api/0/organizations/
404 Project not found

The project slug is case-sensitive and must match the URL exactly. Check sentry.io/settings/projects/

Empty stacktrace

Sourcemaps not uploaded. Run sentry-cli sourcemaps upload as part of your build pipeline.

Альтернативы

Sentry в сравнении

АльтернативаКогда использоватьКомпромисс
Datadog APM MCPYou're already on Datadog and want unified APM + errorsMore expensive, less focused on errors specifically
Rollbar / Bugsnag MCPYou already pay for themSmaller community-built MCP ecosystem

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills