Sentry错误分析服务器

一个用于从Sentry.io或自托管Sentry实例检索和分析问题的MCP服务器,提供错误报告和堆栈跟踪的检查工具。

  • by javaDer
  • Python
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 javaDer/mcp-sentry-custom

使用说明

英语 中文

下面是README.md的修订和润色版本,用于 mcp-sentry-custom 项目,格式正确,清晰、正确和专业。它遵循标准的Markdown约定,并将内容组织成逻辑部分。


mcp哨兵定制:哨兵mcp服务器

概述

mcp-sentry-custom 是一个模型上下文协议(MCP)服务器,旨在从中检索和分析问题 Sentry.io 或自托管的Sentry实例。此服务器提供工具,可以直接从您的Sentry帐户检查错误报告、堆栈跟踪和其他调试信息。

特性

工具

  1. get_sentry_issue

    • 描述:通过ID或URL检索和分析特定的哨兵问题。
    • 输入:
      • issue_id_or_url (string):要分析的哨兵问题ID或完整URL。
    • 退货:详细的问题信息,包括:
      • 标题
      • 问题ID
      • 状态
      • 等级
      • 首次看到的时间戳
      • 上次看到的时间戳
      • 事件计数
      • 全栈跟踪
  2. get_list_issues

    • 描述:检索并分析特定项目的哨兵问题列表。
    • 输入:
      • project_slug (字符串):哨兵项目蛞蝓。
      • organization_slug (字符串):哨兵组织蛞蝓。
    • 退货:详细问题清单,包括:
      • 标题
      • 问题ID
      • 状态
      • 等级
      • 首次看到的时间戳
      • 上次看到的时间戳
      • 事件计数
      • 基本问题信息

鼓励

  1. sentry-issue
    • 描述:从Sentry检索格式化的问题详细信息,以便在对话环境中使用。
    • 输入:
      • issue_id_or_url (string):哨兵问题ID或URL。
    • 退货:格式化的问题详细信息。

安装

通过Smithery安装

安装 mcp-sentry-custom 克劳德桌面自动通过 史密瑟里:

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

使用 uv (推荐)

使用时 uv,不需要特定的安装。你可以跑 mcp-sentry-custom 直接与 uvx:

uvx mcp-sentry-custom --auth-token YOUR_SENTRY_TOKEN --project-slug YOUR_PROJECT_SLUG --organization-slug YOUR_ORGANIZATION_SLUG --sentry-url YOUR_SENTRY_URL

使用 pip

或者,安装 mcp-sentry-custom 通过 pip:

pip install mcp-sentry-custom

或者,与 uv:

uv pip install -e .

安装后,将其作为脚本运行:

python -m mcp_sentry

配置

使用Claude Desktop

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

使用 uvx

{
  "mcpServers": {
    "sentry": {
      "command": "uvx",
      "args": [
        "mcp-sentry-custom",
        "--auth-token", "YOUR_SENTRY_TOKEN",
        "--project-slug", "YOUR_PROJECT_SLUG",
        "--organization-slug", "YOUR_ORGANIZATION_SLUG",
        "--sentry-url", "YOUR_SENTRY_URL"
      ]
    }
  }
}

使用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",
        "--sentry-url", "YOUR_SENTRY_URL"
      ]
    }
  }
}

使用 pip 安装

{
  "mcpServers": {
    "sentry": {
      "command": "python",
      "args": [
        "-m", "mcp_sentry",
        "--auth-token", "YOUR_SENTRY_TOKEN",
        "--project-slug", "YOUR_PROJECT_SLUG",
        "--organization-slug", "YOUR_ORGANIZATION_SLUG",
        "--sentry-url", "YOUR_SENTRY_URL"
      ]
    }
  }
}

使用Zed

将以下内容添加到您的 settings.json 在Zed:

使用 uvx

{
  "context_servers": {
    "mcp-sentry-custom": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp-sentry-custom",
          "--auth-token", "YOUR_SENTRY_TOKEN",
          "--project-slug", "YOUR_PROJECT_SLUG",
          "--organization-slug", "YOUR_ORGANIZATION_SLUG",
          "--sentry-url", "YOUR_SENTRY_URL"
        ]
      }
    }
  }
}

使用 pip 安装

{
  "context_servers": {
    "mcp-sentry-custom": {
      "command": "python",
      "args": [
        "-m", "mcp_sentry",
        "--auth-token", "YOUR_SENTRY_TOKEN",
        "--project-slug", "YOUR_PROJECT_SLUG",
        "--organization-slug", "YOUR_ORGANIZATION_SLUG",
        "--sentry-url", "YOUR_SENTRY_URL"
      ]
    }
  }
}

使用 pip 使用自定义路径安装

{
  "context_servers": {
    "mcp-sentry-custom": {
      "command": "python",
      "args": [
        "-m", "mcp_sentry",
        "--auth-token", "YOUR_SENTRY_TOKEN",
        "--project-slug", "YOUR_PROJECT_SLUG",
        "--organization-slug", "YOUR_ORGANIZATION_SLUG",
        "--sentry-url", "YOUR_SENTRY_URL"
      ],
      "env": {
        "PYTHONPATH": "path/to/mcp-sentry-custom/src"
      }
    }
  }
}

调试

使用MCP检查器调试服务器。

对于 uvx 安装

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

促进地方发展

如果您已将软件包安装在特定目录中或正在开发它:

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

或者,使用自定义目录:

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-sentry-custom/src run mcp_sentry --auth-token YOUR_SENTRY_TOKEN --project-slug YOUR_PROJECT_SLUG --organization-slug YOUR_ORGANIZATION_SLUG --sentry-url YOUR_SENTRY_URL

分叉自

这个项目是从以下内容派生出来的:
https://github.com/modelcontextprotocol/servers/tree/main/src/sentry

许可证

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


变更说明

  1. 格式化:使用适当的Markdown标题、列表和代码块以提高可读性。
  2. 一致性:标准化术语(例如。, mcp_sentry vs。 mcp-sentry-custom)并删除冗余 <TEXT> 和 <JSON> 标签。
  3. 清晰度:重写“概述”和“功能”等部分,以保持简洁和精确。
  4. 完整性:修正了不完整的句子,并确保所有配置示例结构正确。
  5. 专业音调:调整措辞,使其听起来更正式、更精致。

如果你想进一步改进,请告诉我!