Sentry MCP Server

Sentry MCP Server

Enables searching and analyzing Sentry issues, events, and traces via natural language, providing tools for error investigation and distributed tracing.

Category
访问服务器

README

Sentry MCP Server

Forked from elad12390/loki-mcp — retargeted from Grafana Loki to Sentry. Same "few sharp tools, no config" ergonomics, new backend. This repo keeps the original's git history.

An MCP server to easily search and analyze Sentry issues, events, and traces — without writing Sentry queries or clicking through the UI.

This is a focused, fast alternative to the official Sentry MCP: a small, predictable tool set modeled on a battle-tested log-search MCP, talking directly to the Sentry REST API.

Quick Start

You can run this server directly using npx:

export SENTRY_AUTH_TOKEN="sntryu_..."      # Sentry auth token (see Configuration)
export SENTRY_URL="https://us.sentry.io"   # your region/host (default: https://sentry.io)
export SENTRY_ORG="my-org"                  # optional; auto-detected if omitted

npx @elad12390/sentry-mcp

Features

This MCP server provides 4 tools, 3 resources, and 3 prompts. AI assistants automatically understand when to use each based on natural language.

Tools

🔍 sentry_search_issues — Your primary search tool

  • Just say: "check sentry", "what's breaking", "show me errors", "unresolved issues", "top errors", "how many errors"
  • Searches grouped issues across ALL projects automatically (or filter by project)
  • Uses Sentry search syntax in query (is:unresolved level:error, release:latest, free text)
  • Set count=true for event counts + an ASCII trend chart instead of the issue list

🔗 sentry_trace_lookup — Distributed tracing

  • Just say: "follow this trace", "what happened in this request", "trace this id across services"
  • Returns every span and error in a trace, grouped by service, as a timeline

🔎 sentry_get_issue_details — Root cause analysis

  • Just say: "show the stack trace", "what happened before this error", "why did this fail"
  • Returns the exception + stack trace, the breadcrumbs (what happened right before), request context, tags, and the trace ID

🧩 sentry_pattern_analysis — Group & rank error patterns

  • Just say: "group similar errors", "what error types", "do we have one problem or many"
  • Ranks issue groups by event volume and merges near-duplicate titles into higher-level patterns

Resources (Read-only Data)

sentry://projects — List all projects in the org

  • Read this first to know what you can filter by

sentry://tags — List all tag keys (searchable metadata)

  • Shows what you can filter by (environment, release, browser, etc.)

sentry://tags/{key}/values — Get values for a specific tag

  • Example: sentry://tags/environment/values

Prompts (Guided Workflows)

debug-error — Search the issue, pull stack trace + breadcrumbs, gauge blast radius

  • Arguments: error_text (required), project, time_window

trace-request — Follow a trace ID across services

  • Arguments: trace_id (required), time_window

health-check — List projects, count errors + trend, find dominant patterns

  • Arguments: project, time_window

Usage Tips for AI Assistants

When the user says "check sentry" or "what's broken", you should:

  1. Read sentry://projects if you don't know what projects exist
  2. Use sentry_search_issues as your primary tool — it works across all projects
  3. Follow up with sentry_get_issue_details on an interesting issue for the stack trace + breadcrumbs
  4. Use sentry_search_issues with count=true when they ask "how many" / "is it getting worse"
  5. Use sentry_pattern_analysis during incidents to see if it's one problem or many

For complex debugging, use the prompts: debug-error, trace-request, health-check.

Example Conversations

User: "Check sentry for errors in the python-fastapi project" AI: Uses sentry_search_issues with project="python-fastapi", query="is:unresolved"

User: "How many errors happened today?" AI: Uses sentry_search_issues with count=true, time_window="24h"

User: "Why is PYTHON-FASTAPI-TK failing?" AI: Uses sentry_get_issue_details with the issue id

User: "Follow trace ce8f0d3961214198a040517b3dfda0d4" AI: Uses sentry_trace_lookup

Configuration

Set the following environment variables:

  • SENTRY_AUTH_TOKEN (required): A Sentry auth token. Create one at Settings → Auth Tokens (organization token) or User Settings → Personal Tokens. Required scopes: org:read, project:read, event:read.
  • SENTRY_URL: Base URL of your Sentry instance. Default https://sentry.io. SaaS users on a specific region should use https://us.sentry.io, https://de.sentry.io, etc. Self-hosted: your own host.
  • SENTRY_ORG: Organization slug. Optional — if omitted, the first org the token can access is auto-detected.
  • SENTRY_PROJECT: Default project slug used for tag-value lookups. Optional — defaults to the first project in the org.

Development

bun install
bun run build
bun test

See AGENTS.md for code style and contribution notes.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选