Provides tools for finding code owners through file blame annotations, retrieving pull request information by commit ID, and investigating error sources by identifying the last modifier of specific file lines.
Enables automated creation and assignment of Jira tickets based on error investigation results, including setting issue types, priorities, components, and labels for bug tracking workflows.
Error Tracker MCP Server
基于 Model Context Protocol (MCP) 的错误追踪服务器,自动化处理代码错误:查找代码责任人(Bitbucket)→ 获取 PR 信息 → 创建 JIRA 任务。
快速开始
1. 安装与编译
2. 配置环境变量
创建 .env 文件(参考 .env.example):
3. 选择运行模式
模式 | 适用场景 | 启动命令 |
stdio | 本地使用(Claude Desktop) |
|
HTTP | 远程部署(新客户端) |
|
兼容 | 远程部署(新旧客户端) |
|
核心功能
工具 | 功能说明 |
| 通过文件路径和行号查找代码最后修改者 |
| 根据 commit ID 查找相关 Pull Request |
| 自动调查错误(查找责任人 + PR 信息) |
| 基于调查结果创建并分配 JIRA 任务 |
| 完整流程:调查 → 分析 → 创建 JIRA(一键完成) |
客户端配置
方式一:stdio 模式(本地使用 - Claude Desktop)
编辑配置文件:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
💡 需在项目根目录创建
.env文件配置环境变量
方式二:HTTP 模式(远程服务器)
Streamable HTTP (推荐 - 新协议)
适用于支持 MCP 2025-03-26 协议的客户端:
SSE 模式(兼容 - 旧协议)
适用于仅支持 MCP 2024-11-05 协议的客户端:
端口说明:
HTTP 模式默认端口:
3000(通过.env中HTTP_PORT配置)兼容模式默认端口:
3001(通过.env中COMPATIBLE_PORT配置)启动命令:
npm run start:http(仅新协议)或npm run start:compatible(新旧协议都支持)
协议选择:
新客户端 → 使用
/mcp端点(Streamable HTTP)旧客户端 → 使用
/sse端点(传统 SSE)不确定 → 使用兼容模式服务器(
npm run start:compatible)同时支持两种
使用示例
场景1:查找代码责任人
场景2:完整错误追踪
远程部署
Docker 部署
PM2 部署
故障排除
问题 | 解决方案 |
认证失败 | 检查
文件中的用户名和密码 |
找不到文件 | 确保文件路径相对于仓库根目录,检查
配置 |
端口占用 | 修改
中的
或
|
技术架构
传输模式:stdio / Streamable HTTP / 兼容模式(详见 ARCHITECTURE.md)
开发调试:调试技巧和贡献指南见 DEVELOPMENT.md
技术栈:TypeScript + MCP SDK + Express + Axios
许可证
MIT