Back to MCP directory
publicPublicdnsLocal runtime

sentry-mcp-server-21w

Sentry MCP服务器是一个将Sentry错误追踪集成到开发工作流的工具,提供版本监控、健康统计和问题调查功能,支持云端和自托管Sentry实例。

article

README

🚀 Sentry MCP 服务器指南

本指南将帮助您快速搭建和使用 Sentry MCP 服务器,为您的项目提供高效的监控和管理服务。

🚀 快速开始

启动服务器

运行以下命令启动服务:

npm start

默认情况下,服务器将在 http://localhost:3000 上运行。

访问 API 文档

打开浏览器访问 http://localhost:3000/docs 查看 Swagger UI 文档。

📦 安装指南

克隆仓库

使用 Git 克隆项目仓库:

git clone https://github.com/srcgrp/sentry-mcp-server.git
cd sentry-mcp-server

安装依赖项

进入项目目录后,安装所需的依赖项:

npm install

配置环境变量

创建并编辑 .env 文件:

PORT=3000
SENTRY_PUBLIC_KEY=your_sentry_public_key
SENTRY_PRIVATE_KEY=your_sentry_private_key
SENTRY_PROJECT_slug=your_project_slug

✨ 主要特性

安装

npm install sentry-mcp-server --save

初始化

在项目中初始化模块:

const SentryMCP = require('sentry-mcp-server');
SentryMCP.init({
    public: 'your_sentry_public_key',
    private: 'your_sentry_private_key',
    project: 'your_project_slug'
});

📚 详细文档

修改配置文件

编辑 config.json 文件:

{
    "port": 3000,
    "sentry": {
        "publicKey": "your_sentry_public_key",
        "privateKey": "your_sentry_private_key",
        "projectSlug": "your_project_slug"
    }
}

设置代理

nginx.conf 中添加反向代理配置:

server {
    listen 80;
    server_name your_domain;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

💻 使用示例

基础用法

获取帮助

访问文档页面:

npm run docs

提交代码

提交代码到仓库时,请确保遵循 CONTRIBUTING.md 文件中的指南。

🤝 贡献者

欢迎所有贡献者参与项目!请参考 CONTRIBUTING.md 文件了解如何贡献代码。

🛠️ 支持

如需支持或遇到问题,请访问我们的 Discussions 页面进行反馈。


感谢您对 Sentry MCP 服务器的支持!希望这个工具能为您的项目带来便利。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client