Sentry错误分析服务器

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

  • by MCP-100
  • Python
  • 本地部署
  • 21 星标
  • 更新于
在 GitHub 查看 qianniuspace/mcp-sentry

使用说明

mcp哨兵:哨兵mcp服务器

概述

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

工具

  1. get_sentry_issue
    • 通过ID或URL检索和分析哨兵问题
    • 输入:
      • issue_id_or_url (string):要分析的哨兵问题ID或URL
    • 退货:问题详细信息包括:
      • 标题
      • 问题ID
      • 状态
      • 等级
      • 首次看到的时间戳
      • 上次看到的时间戳
      • 事件计数
      • 完整堆栈跟踪
  2. get_list_issues
    • 按项目slug检索和分析哨兵问题
    • 输入:
      • project_slug (string):哨兵项目slug分析
      • organization_slug (string):哨兵组织蛞蝓分析
    • 退货:问题列表,详细信息包括:
      • 标题
      • 问题ID
      • 状态
      • 等级
      • 首次看到的时间戳
      • 上次看到的时间戳
      • 事件计数
      • 基本问题信息

提示

  1. sentry-issue
    • 从Sentry检索问题详细信息
    • 输入:
      • issue_id_or_url (string):哨兵问题ID或URL
    • 返回:格式化的问题详细信息作为对话上下文

安装

通过Smithery安装

通过以下方式自动安装Claude Desktop的mcp哨兵 史密瑟里:

npx -y @smithery/cli install @qianniuspace/mcp-sentry --client claude

使用紫外线(推荐)

使用时 uv 不需要特定的安装。我们将 使用 uvx 直接运行 mcp哨兵.

使用PIP

或者,您可以安装 mcp-sentry 通过pip:

pip install mcp-sentry

或使用紫外线

uv pip install -e .

安装后,您可以使用以下命令将其作为脚本运行:

python -m mcp_sentry

配置

使用Claude Desktop

将此添加到您的 claude_desktop_config.json:

Using uvx
"mcpServers": {
  "sentry": {
    "command": "uvx",
    "args": ["mcp-sentry", "--auth-token", "YOUR_SENTRY_TOKEN","--project-slug" ,"YOUR_PROJECT_SLUG", "--organization-slug","YOUR_ORGANIZATION_SLUG"]
  }
}
Using 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"]
  }
}
Using pip installation
"mcpServers": {
  "sentry": {
    "command": "python",
    "args": ["-m", "mcp_sentry", "--auth-token", "YOUR_SENTRY_TOKEN","--project-slug" ,"YOUR_PROJECT_SLUG", "--organization-slug","YOUR_ORGANIZATION_SLUG"]
  }
}

使用方法 泽德

添加到您的Zed settings.json:

Using uvx

例如,Curson

"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"]
    }
  }
],
Using pip installation
"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"]
  }
},
Using pip installation with custom path
"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检查器调试服务器。对于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

叉从

许可证

此MCP服务器根据MIT许可证获得许可。这意味着您可以根据MIT许可证的条款和条件自由使用、修改和分发软件。有关更多详细信息,请参阅项目存储库中的LICENSE文件。