mcpField
M
mcp-sentry: A Sentry MCP server

mcp-sentry: A Sentry MCP server

本地服务
mcpdirs.com开发工具2267 周前更新

关于 mcp-sentry: A Sentry MCP server

mcp-sentry 是一个用于从 Sentry.io 获取并分析问题(issue)的 MCP 服务,面向需要排查错误报告的开发者。它可以通过 ID 或 URL 查询单个问题,也可以按项目列出问题。

主要功能

  1. 01通过 ID 或 URL 获取问题详情
  2. 02查看完整堆栈跟踪
  3. 03按组织和项目 slug 列出问题
  4. 04提供 sentry-issue 提示词以加载问题上下文

适用场景

  1. 01在 AI 助手中查看某个 Sentry 错误的详细信息
  2. 02按项目汇总并检查当前的问题列表
  3. 03将问题详情作为对话上下文用于调试

MCP 相关

该项目是一个 MCP 服务,向 MCP 客户端暴露 get_sentry_issue 和 get_list_issues 两个工具,以及 sentry-issue 提示词。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": [
"-y",
"@smithery/cli"
]
}
}
}
启动命令npx -y @smithery/cli

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@smithery/cli

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

mcp-sentry:Sentry MCP 服务

smithery badge

概述

用于从 Sentry.io 检索和分析问题的模型上下文协议服务。此服务提供工具,用于检查 Sentry 账户中的错误报告、堆栈跟踪和其他调试信息。

工具
  1. get_sentry_issue
    • 按 ID 或 URL 检索并分析 Sentry 问题
    • 输入:
      • issue_id_or_url(string):要分析的 Sentry 问题 ID 或 URL
    • 返回:问题详情,包括:
      • 标题
      • 问题 ID
      • 状态
      • 级别
      • 首次出现时间戳
      • 最近出现时间戳
      • 事件数
      • 完整堆栈跟踪
  2. get_list_issues
    • 按项目别名检索并分析 Sentry 问题
    • 输入:
      • project_slug(string):要分析的 Sentry 项目别名
      • organization_slug(string):要分析的 Sentry 组织别名
    • 返回:问题列表及详情,包括:
      • 标题
      • 问题 ID
      • 状态
      • 级别
      • 首次出现时间戳
      • 最近出现时间戳
      • 事件数
      • 问题基本信息
提示词
  1. sentry-issue
    • 从 Sentry 检索问题详情
    • 输入:
      • issue_id_or_url(string):Sentry 问题 ID 或 URL
    • 返回:格式化的问题详情,作为对话上下文

安装

通过 Smithery 安装

通过 Smithery 自动为 Claude Desktop 安装 mcp-sentry:

npx -y @smithery/cli install @qianniuspace/mcp-sentry --client claude
使用 uv(推荐)

使用 uv 时无需特别安装。我们将使用 uvx 直接运行 mcp-sentry。

使用 PIP

也可以通过 pip 安装 mcp-sentry:

pip install mcp-sentry

或使用 uv

uv pip install -e .

安装后,可以通过以下命令将其作为脚本运行:

python -m mcp_sentry

配置

与 Claude Desktop 搭配使用

将以下内容添加到 claude_desktop_config.json:

使用 uvx
"mcpServers": {
  "sentry": {
    "command": "uvx",
    "args": ["mcp-sentry", "--auth-token", "YOUR_SENTRY_TOKEN","--project-slug" ,"YOUR_PROJECT_SLUG", "--organization-slug","YOUR_ORGANIZATION_SLUG"]
  }
}
使用 docker
"mcpServers": {
  "sentry": {
    "command": "docker",
    "args": ["run", "-i", "--rm", "mcp/sentry", "--auth-token", "YOUR_SENTRY_TOKEN","--project-slug" ,"YOUR_PROJECT_SLUG", "--organization-slug","YOUR_ORGANIZATION_SLUG"]
  }
}
使用 pip 安装
"mcpServers": {
  "sentry": {
    "command": "python",
    "args": ["-m", "mcp_sentry", "--auth-token", "YOUR_SENTRY_TOKEN","--project-slug" ,"YOUR_PROJECT_SLUG", "--organization-slug","YOUR_ORGANIZATION_SLUG"]
  }
}
与 Zed 搭配使用

添加到 Zed 的 settings.json:

使用 uvx

例如 Curson!mcp.json

"context_servers": [
  "mcp-sentry": {
    "command": {
      "path": "uvx",
      "args": ["mcp-sentry", "--auth-token", "YOUR_SENTRY_TOKEN","--project-slug" ,"YOUR_PROJECT_SLUG", "--organization-slug","YOUR_ORGANIZATION_SLUG"]
    }
  }
],
使用 pip 安装
"context_servers": {
  "mcp-sentry": {
    "command": "python",
    "args": ["-m", "mcp_sentry", "--auth-token", "YOUR_SENTRY_TOKEN","--project-slug" ,"YOUR_PROJECT_SLUG", "--organization-slug","YOUR_ORGANIZATION_SLUG"]
  }
},
使用带自定义路径的 pip 安装
"context_servers": {
  "sentry": {
      "command": "python",
      "args": [
        "-m",
        "mcp_sentry",
        "--auth-token",
        "YOUR_SENTRY_TOKEN",
        "--project-slug",
        "YOUR_PROJECT_SLUG",
        "--organization-slug",
        "YOUR_ORGANIZATION_SLUG"
      ],
      "env": {
        "PYTHONPATH": "path/to/mcp-sentry/src"
      }
    }
},

调试

可以使用 MCP inspector 调试服务。对于 uvx 安装:

npx @modelcontextprotocol/inspector uvx mcp-sentry --auth-token YOUR_SENTRY_TOKEN --project-slug YOUR_PROJECT_SLUG --organization-slug YOUR_ORGANIZATION_SLUG

或者,如果你已将软件包安装到特定目录,或正在开发此项目:

cd path/to/servers/src/sentry
npx @modelcontextprotocol/inspector uv run mcp-sentry --auth-token YOUR_SENTRY_TOKEN --project-slug YOUR_PROJECT_SLUG --organization-slug YOUR_ORGANIZATION_SLUG  

或在终端中

npx @modelcontextprotocol/inspector uv --directory /Volumes/ExtremeSSD/MCP/mcp-sentry/src run mcp_sentry --auth-token YOUR_SENTRY_TOKEN
--project-slug YOUR_PROJECT_SLUG --organization-slug YOUR_ORGANIZATION_SLUG

Inspector-tools

Fork 来源

许可证

此 MCP 服务采用 MIT License 授权。这意味着你可以自由使用、修改和分发该软件,但须遵守 MIT License 的条款和条件。更多详情请参阅项目仓库中的 LICENSE 文件。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。