MCP.so
ログイン

Sentry MCP Server (Official)

@getsentry

基本情報

カテゴリ

開発者ツール

ライセンス

NOASSERTION

トランスポート

stdio

作者

getsentry

Sentry MCP Server について

LLM を介して Sentry とやり取りするための MCP サーバー。

#tag-production#mcp-server

Sentry MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "sentry-mcp": {
      "command": "npx",
      "args": [
        "@sentry/mcp-server@latest",
        "--access-token=sentry-user-token"
      ]
    }
  }
}

Sentry MCP Server のツール

9

Find organizations that the user has access to in Sentry. Use this tool when you need to: - View organizations in Sentry - Find an organization's slug to aid other tool requests - Search for specific organizations by name or slug Returns up to 25 results. If you hit this limit, use the query parameter to narrow down results.

Find projects in Sentry. Use this tool when you need to: - View projects in a Sentry organization - Find a project's slug to aid other tool requests - Search for specific projects by name or slug Returns up to 25 results. If you hit this limit, use the query parameter to narrow down results.

Update a Sentry issue's status or assignment. Use this to resolve, reopen, assign, or ignore an issue. <examples> ``` update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='resolved') update_issue(organizationSlug='my-org', issueId='PROJECT-123', assignedTo='user:123456') update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored') update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored', ignoreMode='forever') update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored', ignoreMode='untilOccurrenceCount', ignoreCount=100, ignoreWindowMinutes=60) update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored', reason='Ignoring because this is expected noise from the staging deploy') ``` </examples> <hints> - Provide `issueUrl` or `organizationSlug` + `issueId`. - At least one of `status` or `assignedTo` is required. - `assignedTo` format: `user:ID` or `team:ID_OR_SLUG`. - Use `execute_sentry_tool(name='whoami', arguments={})` to find your user ID for self-assignment. - Status values: `resolved`, `resolvedInNextRelease`, `unresolved`, `ignored`. - `status='ignored'` defaults to `ignoreMode='untilEscalating'`. - Ignore modes: `untilEscalating`, `forever`, `forDuration`, `untilOccurrenceCount`, `untilUserCount`. - Matching ignore inputs are `ignoreDurationMinutes`, `ignoreCount` + optional `ignoreWindowMinutes`, or `ignoreUserCount` + optional `ignoreUserWindowMinutes`. - To switch an already ignored issue between `untilEscalating`, `forever`, and condition-based ignore modes, first set `status='unresolved'`, then ignore it again with the new rule. - `reason` is optional. When provided, it will be posted as a comment on the issue's activity feed explaining why the action was taken. </hints>

Search Sentry events and replays. Use for event counts/statistics. `query` can be natural language or Sentry search syntax. With an agent configured, it fixes dataset, query, fields, and sort before running. Supports TWO query types: 1. AGGREGATIONS (counts, sums, averages): 'how many errors', 'total tokens' 2. Individual events with timestamps: 'error logs from last hour' Datasets: - errors: Exception/crash events with stack traces, usually grouped into issues - logs: Application log entries, including error-severity log messages - spans: Raw trace/span events for performance, AI/LLM calls, requests, and operations - metrics: Metric rows and aggregates: counters, gauges, distributions, values - profiles: Transaction/continuous profile results, profile IDs, profiled transactions - replays: Session replay results: rage clicks, dead clicks, visited pages, replay users If the user says logs, log messages, error logs, or warning logs, choose logs instead of errors. Replay searches return replay lists only; replay count()/avg()/sum() are not supported. NOT for grouped issue lists (use search_issues) or app screenshots/images (use get_latest_base_snapshot). <examples> search_events(organizationSlug='my-org', query='how many errors today') search_events(organizationSlug='my-org', dataset='errors', query='level:error') search_events(organizationSlug='my-org', dataset='errors', fields=['issue', 'count()'], sort='-count()') search_events(organizationSlug='my-org', dataset='spans', query='span.op:db', sort='-span.duration') search_events(organizationSlug='my-org', dataset='replays', query='count_errors:>0', sort='-count_errors') </examples> <hints> - If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>. - Parse org/project notation directly without calling find_organizations or find_projects. - Use fields with aggregate functions like count(), avg(), sum() for statistics - Sort by -count() for most common, -timestamp for newest </hints>

Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes. Use this tool when: - The user explicitly asks for root cause analysis, Seer analysis, or help fixing/debugging an issue - You are unable to accurately determine the root cause from the issue details alone Do NOT call this tool as an automatic follow-up to get_sentry_resource. What this tool provides: - Root cause analysis with code-level explanations - Specific file locations and line numbers where errors occur - Concrete code fixes you can apply - Step-by-step implementation guidance This tool automatically: 1. Checks if analysis already exists (instant results) 2. Starts new AI analysis if needed (~2-5 minutes) 3. Returns complete fix recommendations <examples> ### User: "Run Seer on this issue" ``` analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43') ``` ### User: "Analyze this issue and suggest a fix" ``` analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456') ``` </examples> <hints> - Only use when the user explicitly requests analysis or you cannot determine the root cause from issue details alone - Seer Autofix does not support metric alert issues (issueCategory: metric); use get_issue_details and search_events instead - If the user provides an issueUrl, extract it and use that parameter alone - The analysis includes actual code snippets and fixes, not just error descriptions - Results are cached - subsequent calls return instantly </hints>

Search for grouped issues/problems in Sentry - returns a LIST of issues, NOT counts or aggregations. Provide `query` as natural language or Sentry issue search syntax. When an embedded agent is configured, it fixes query and sort before running while preserving explicit Sentry search syntax. Returns grouped issues with metadata like title, status, and user count. Common Query Syntax: - is:unresolved / is:resolved / is:ignored / is:for_review / is:new / is:regressed / is:escalating - level:error / level:warning - firstSeen:-24h / lastSeen:-7d - assigned:me / assigned_or_suggested:me - release:latest - issue.category:feedback - issue.priority:high - environment:production - userCount:>100 DO NOT USE FOR COUNTS/AGGREGATIONS → use search_events DO NOT USE FOR individual events with timestamps → use search_events DO NOT USE FOR details about a specific issue → use get_sentry_resource <examples> search_issues(organizationSlug='my-org', query='critical bugs from last week') search_issues(organizationSlug='my-org', query='is:unresolved is:unassigned', sort='freq') search_issues(organizationSlug='my-org', query='level:error firstSeen:-24h', projectSlugOrId='my-project') </examples> <hints> - If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlugOrId>. - Parse org/project notation directly without calling find_organizations or find_projects. - The projectSlugOrId parameter accepts both project slugs (e.g., 'my-project') and numeric IDs (e.g., '123456'). </hints>

Fetch a Sentry resource by URL, or by resourceType plus resourceId. Pass a Sentry URL directly when possible; the resource type is auto-detected. Supports issues, events, traces, spans, AI conversations, breadcrumbs, replays, monitors, preprod snapshots, and snapshot images. Trace lookups return a condensed overview by default. AI Conversations: A conversation is a set of spans sharing the same gen_ai.conversation.id. Use resourceType='ai_conversation' with a conversation ID, or pass a Sentry conversation URL, to fetch the transcript/details. To discover or list conversations, use search_ai_conversations. Conversations are NOT issues — do not use search_issues for conversation queries. For preprod snapshot URLs (matching 'sentry.io/preprod/snapshots/'): - Without ?selectedSnapshot=: returns the snapshot diff summary (changed, added, removed images) - With ?selectedSnapshot=<image_file_name>: returns the image preview and metadata. Use the Sentry tool `get_snapshot_image` for full-resolution image bytes. Resource IDs: - span: <traceId>:<spanId> - monitor: <monitorSlug> - snapshot: <snapshotId> - snapshotImage: <snapshotId>:<image_file_name> <examples> get_sentry_resource(url='https://sentry.io/issues/PROJECT-123/') get_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123') get_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='<traceId>:<spanId>') get_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123') get_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/123/') get_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/123/?selectedSnapshot=login_screen.png') </examples>

Search the available Sentry MCP tool catalog by name and description. Many Sentry operations are intentionally not exposed as top-level tools. Use this for any Sentry-related task when you do not see an obvious direct tool, including long-tail inspection, project management, documentation lookup, preprod snapshots, attachments, DSNs, releases, teams, and issue-specific pivots. Use this tool when you need to: - Find the right Sentry operation for a task - Discover catalog tools and their schemas for a task - Inspect the executable JSON input schema for an available tool <examples> search_sentry_tools(query='list projects') search_sentry_tools(query='issue details') search_sentry_tools(query='find dsn', limit=5) search_sentry_tools(query='snapshot image') </examples> <hints> - Results only include tools available in the current session. - If a Sentry operation is not listed as a direct tool, search here before deciding it is unavailable. - Returned schemas already account for active organization, project, and region constraints. - Use the returned name and schema when executing a catalog result. - This tool returns structured JSON. Do not parse markdown from its text content. </hints>

Execute an available Sentry MCP tool discovered through search_sentry_tools. Use this tool when you need to: - Call a Sentry operation returned by search_sentry_tools - Execute a tool by name using arguments that match its returned schema <examples> execute_sentry_tool(name='find_projects', arguments={ organizationSlug: 'my-org' }) execute_sentry_tool(name='whoami', arguments={}) </examples> <hints> - Use search_sentry_tools first if you are not sure which name or arguments to pass. - Arguments are validated against the target tool's schema before execution. - Active organization, project, and region constraints are injected automatically. </hints>

概要

Sentry MCP Server (Official) とは?

Sentry MCP Server (Official) は Sentry 公式の Sentry MCP サーバーで、Model Context Protocol を通じて Claude Code、Cursor、VS Code などの AI コーディングアシスタントを Sentry のエラー、issue、トレース、パフォーマンスデータに接続します。

Sentry が getsentry/sentry-mcp リポジトリで管理しており、主に https://mcp.sentry.dev/mcp のホスト型リモートサービスとして OAuth サインインで動作します。Sentry によれば、ツールの選定は Sentry API をすべて公開することではなく、人が関与するデバッグワークフローに重点を置いています。npm で @sentry/mcp-server として公開されている stdio トランスポートもあり、セルフホスト版 Sentry で使う最も簡単な方法です。

Sentry MCP Server (Official) の使い方

Sentry アカウントが必要です。ホスト型サーバーではインストールは不要で、最初の接続時にブラウザで OAuth フローが開き、Sentry アカウントと連携します。

ベースエンドポイントは https://mcp.sentry.dev/mcp です。1 つの組織(https://mcp.sentry.dev/mcp/{organizationSlug})や 1 つのプロジェクト(https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug})にスコープを絞ることもできます。スコープを指定すると、ツールはその組織やプロジェクトを既定値として使い、不要な検出系ツールは非表示になります。Sentry は可能な限りプロジェクト単位のスコープを推奨しています。?experimental=1 を付けると実験的なツールが有効になります。

Claude Code

HTTP でリモートサーバーを追加します。

claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug}

または Claude Code プラグインをインストールします。sentry-mcp サブエージェントが追加され、Sentry のエラー、issue、トレース、パフォーマンスについて尋ねると Claude が自動的に委任します。

claude plugin marketplace add getsentry/sentry-mcp
claude plugin install sentry-mcp@sentry-mcp

Cursor

mcp.sentry.dev の "Install MCP Server" ボタンを使うか、MCP 設定に次を追加します。

{
  "mcpServers": {
    "sentry": {
      "url": "https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug}"
    }
  }
}

VS Code

コマンドパレットで "MCP: Add Server" を実行し、HTTP を選んで https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug} を入力します。

Claude Desktop とその他の stdio クライアント

ローカルサーバーを起動するクライアント(またはセルフホスト版 Sentry)では、org:read、project:read、project:write、team:read、team:write、event:write のスコープを持つ Sentry User Auth Token を作成し、stdio パッケージを使います。

{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": ["@sentry/mcp-server"],
      "env": {
        "SENTRY_ACCESS_TOKEN": "your-token",
        "EMBEDDED_AGENT_PROVIDER": "openai",
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

LLM プロバイダー関連の変数は AI 搭載の検索ツールを使う場合にのみ必要です。直接実行することもできます。

npx @sentry/mcp-server@latest --access-token=sentry-user-token

セルフホスト版 Sentry では --host=sentry.example.com(ホスト名のみ)を追加し、プレーン HTTP しか提供しない環境では --insecure-http も追加します。

明示的なトークンでリモート接続する

カスタムヘッダーに対応したクライアントは、OAuth を使わずに Sentry API トークンを直接渡せます。

{
  "mcpServers": {
    "sentry": {
      "url": "https://mcp.sentry.dev/mcp",
      "headers": {
        "Authorization": "Sentry-Bearer ${SENTRY_ACCESS_TOKEN}"
      }
    }
  }
}

Sentry MCP Server (Official) の主な機能

  • Sentry(getsentry)が開発・管理する公式サーバー。
  • OAuth 対応のホスト型リモートエンドポイントで、インストールや更新作業は不要。
  • 組織・プロジェクト単位のスコープ付き URL で slug を自動設定し、不要な検出系ツールを非表示に。
  • issue やイベント(errors、logs、spans、metrics、profiles、replays)を自然言語で検索。
  • Seer 連携による根本原因分析とコード修正の提案。
  • issue のトリアージ操作:解決、再オープン、無視、担当者の割り当て。
  • release、チーム、DSN、ドキュメント検索などのロングテール操作向けのツールカタログ(search_sentry_tools / execute_sentry_tool)。
  • セルフホスト版 Sentry 向けの stdio トランスポートと、有効・無効を切り替えられる skills(例:--skills=inspect,seer、--disable-skills=project-management)。

Sentry MCP Server (Official) のツール

mcp.so のページには 9 個のトップレベルツールが掲載されています。

  • 検出:find_organizations と find_projects は、他のツールが必要とする組織やプロジェクトの slug を調べます。URL がスコープ済みの場合は非表示になります。
  • 検索:search_issues はグループ化された issue の一覧(例:is:unresolved level:error)を返し、search_events は errors、logs、spans、metrics、profiles、replays にわたるカウント、集計、個別イベントを扱います。どちらも自然言語と Sentry の検索構文に対応しています。
  • 参照:get_sentry_resource は Sentry の URL や ID から issue、イベント、トレース、span、replay、モニター、AI 会話を取得します。
  • 修正とトリアージ:analyze_issue_with_seer は Seer による根本原因分析を実行し(新規分析には約 2〜5 分かかり、結果はキャッシュされます)、update_issue はステータスや担当者を変更します。
  • カタログ:search_sentry_tools はトップレベルで公開されていない操作を探し、execute_sentry_tool がそれを実行します(例:whoami)。

Sentry MCP Server (Official) のユースケース

  • エディターから本番環境のバグを修正:「https://my-org.sentry.io/issues/PROJECT-123/ を確認して、このリポジトリで根本原因を修正して」
  • 新しいエラーをトリアージ:「my-project で過去 24 時間に初めて発生した未解決のエラーを表示して」
  • 統計を確認:「今日のエラー数を issue ごとに集計して」
  • AI による修正案を取得:「この issue で Seer を実行して修正を提案して」
  • issue キューを整理:「PROJECT-123 を解決済みにして、PROJECT-456 を自分に割り当てて」
  • パフォーマンスを調査:「過去 1 時間で最も遅いデータベース span を探して」

Sentry MCP Server (Official) と代替ツールの比較

  • ホスト型リモート vs stdio:mcp.sentry.dev のリモートサーバーは OAuth を使い、検索に LLM キーは不要です。stdio パッケージはユーザー認証トークンが必要で、AI 搭載の検索ツールには LLM プロバイダーのキーも必要ですが、セルフホスト版 Sentry に接続できます。
  • Claude Code プラグイン vs 通常の MCP:プラグインは同じサーバーを専用サブエージェントとしてまとめたもので、claude mcp add はツールをメインエージェントに直接公開します。
  • コミュニティ版 Sentry サーバー:一部のディレクトリには小規模なコミュニティ製 Sentry MCP プロジェクトも掲載されています。公式の getsentry サーバーは Sentry が管理し、ドキュメントを提供しているものです。

Sentry MCP Server (Official) のトラブルシューティング

  • AI 検索ツールが表示されない(stdio):自然言語検索には LLM プロバイダー(OpenAI、Azure OpenAI、Anthropic、OpenRouter)が必要です。API キーを設定し、EMBEDDED_AGENT_PROVIDER を明示的に指定してください。それ以外のツールはなくても動作します。
  • セルフホスト環境で Seer ツールがない:Seer はセルフホスト版 Sentry に含まれないため、--host が sentry.io 以外を指すと seer skill は外されます。Seer を運用している場合は --skills=inspect,seer を追加してください。
  • プレーン HTTP のセルフホスト環境に接続できない:--insecure-http を追加し、--host にはホスト名のみを渡します。
  • トークン使用時に権限エラーが出る:ユーザー認証トークンに上記のスコープが含まれているか確認してください。
  • 127.0.0.1 上の MCP Inspector で OAuth が失敗する:代わりに localhost を使ってください。

よくある質問

1

Sentry MCP サーバーは公式ですか?

はい。Sentry が getsentry/sentry-mcp リポジトリで開発・管理しており、Sentry のドキュメントも mcp.sentry.dev のホスト型サービスを案内しています。

2

Sentry MCP サーバーの URL は何ですか?

リモートエンドポイントは `https://mcp.sentry.dev/mcp` です。`/{organizationSlug}` や `/{organizationSlug}/{projectSlug}` を付けてスコープを絞れます。

3

API キーは必要ですか?

ホスト型サーバーでは不要で、初回接続時に OAuth を使います。stdio パッケージには Sentry User Auth Token が必要で、AI 搭載の検索ツールを使う場合は LLM プロバイダーのキーも必要です。

4

Claude Code、Cursor、VS Code で使えますか?

はい。Sentry は Claude Code(`claude mcp add --transport http` またはプラグイン)、Cursor、VS Code の設定手順を公開しています。HTTP トランスポートに対応したクライアントならどれでも接続できます。

5

セルフホスト版 Sentry で使えますか?

はい、stdio トランスポートを使います。`npx @sentry/mcp-server@latest` を `--access-token` と `--host` 付きで実行してください。stdio トランスポートはまだ開発中とされています。

6

Sentry MCP サーバーは無料ですか?

mcp.so のページにも Sentry のドキュメントにも、MCP サーバー単独の料金は記載されていません。既存の Sentry アカウントで利用し、アクセスできる範囲はそのアカウントに依存します。

7

Sentry MCP サーバーはデータを変更できますか?

はい。`update_issue` で issue の解決、無視、割り当てができ、stdio トークンのスコープにも書き込み権限が含まれます。skills で公開するツールを絞れます。たとえば直接トークン認証ではリモート URL に `?disable-skills=seer` を付け、stdio では `--disable-skills` を使います。

コメント

「開発者ツール」の他のコンテンツ