Honeybadger MCP 服务器设置指南
该 MCP 服务器将 Honeybadger 错误跟踪与 Cursor IDE 集成,允许您直接从开发环境中获取和分析错误。
先决条件
- 已安装 Node.js 18+
- 具有 API 访问权限的 Honeybadger 帐户
- 带有 MCP 支持的 Cursor IDE
安装
1. 克隆 MCP 服务器
2. 构建项目
3. 使用 NPM 包(推荐)
全局安装:
然后在Cursor中进行配置:
基于项目的安装(替代):
如果您希望将 MCP 服务器作为项目依赖项进行管理:
在这种情况下,Cursor mcp_servers.json
中的命令将指向项目node_modules
中的本地安装:
4.配置环境变量
在项目根目录中创建一个.env
文件:
4. 获取您的 Honeybadger 凭证
- API密钥:
- 前往https://app.honeybadger.io/users/auth\_tokens
- 创建一个新的个人身份验证令牌
- 复制
.env
文件的令牌
- 项目编号:
- 前往 Honeybager 中的项目
- 项目 ID 在 URL 中:
https://app.honeybadger.io/projects/{PROJECT_ID}
- 或者在项目设置中找到它
游标配置
1. 在 Cursor 中配置 MCP
将 MCP 服务器添加到你的 Cursor 配置中。编辑你的~/.cursor/mcp_servers.json
(或等效文件):
2. 替代方案:全局安装
本节内容现已更新或移除,因为已在上文中介绍过。如果您更喜欢使用旧的方式从本地路径进行全局克隆和安装,您仍然可以这样做,但为了更方便地更新和管理,建议使用已发布的 npm 包。
如果从本地克隆安装:
用法
配置完成后,您可以在 Cursor 中使用这些工具:
1. 列出最近的故障
2. 获取具体故障详情
3.分析问题
4. 获取错误发生
可用工具
list_honeybadger_faults
列出最近的故障,并可选择按环境和解决状态进行过滤。
参数:
project_id
(可选):项目 IDlimit
(可选):故障数量(默认值:20,最大值:100)environment
(可选):按环境过滤resolved
(可选):按已解决状态过滤
get_honeybadger_fault
获取有关特定故障的详细信息。
参数:
fault_id
(必需):故障 IDproject_id
(可选):项目 ID
get_honeybadger_notices
获取特定故障的通知(错误发生)。
参数:
fault_id
(必需):故障 IDproject_id
(可选):项目 IDlimit
(可选):通知数量(默认值:10,最大值:100)
analyze_honeybadger_issue
提供全面的分析和修复建议。
参数:
fault_id
(必需):故障 IDproject_id
(可选):项目 IDinclude_context
(可选):包含请求上下文(默认值:true)
示例工作流程
- 列出最近的错误:“显示生产中最新未解决的错误”
- 分析具体错误:“分析 Honeybadger 故障 12345 并提出修复建议”
- 获取错误上下文:“获取故障 12345 的最新发生情况及其完整上下文”
- 审查和修复:通过分析来理解和修复代码中的问题
故障排除
常见问题
- 身份验证错误:验证您的 API 密钥是否正确且具有适当的权限
- 未找到项目:请检查您的项目 ID 是否正确
- 连接问题:验证 Honeybadger API 的网络访问
调试模式
直接运行服务器查看错误信息:
日志
检查 Cursor 日志中是否存在与 MCP 相关的问题:
- macOS:
~/Library/Logs/Cursor/
- Windows:
%APPDATA%\Cursor\logs\
- Linux:
~/.config/Cursor/logs/
安全说明
- 安全存储 API 密钥,切勿将其提交到版本控制
- 尽可能使用特定于环境的 API 密钥
- 考虑使用只读 API 令牌进行此集成
- 定期轮换您的 API 密钥
贡献
要扩展此 MCP 服务器:
- 在
setupToolHandlers()
方法中添加新工具 - 实现相应的处理方法
- 更新工具列表和文档
- 使用 Honeybadger 设置进行全面测试
支持
对于以下问题:
- 此 MCP 服务器:检查代码和配置
- Honeybadger API :请参阅Honeybadger API 文档
- Cursor MCP 集成:查看 Cursor 文档
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
将 Honeybadger 错误跟踪与 Cursor IDE 集成,允许开发人员直接从其开发环境中获取、分析和排除应用程序错误。
Related MCP Servers
- -securityAlicense-qualityFacilitates integration with the Cursor code editor by enabling real-time code indexing, analysis, and bi-directional communication with Claude, supporting concurrent sessions and automatic reconnection.Last updated -22131TypeScriptMIT License
- -securityAlicense-qualityAn AI-powered development toolkit for Cursor providing intelligent coding assistance through advanced reasoning, UI screenshot analysis, and code review tools.Last updated -839240TypeScriptMIT License
- -securityAlicense-qualityA Cursor-compatible toolkit that provides intelligent coding assistance through custom AI tools for code architecture planning, screenshot analysis, code review, and file reading capabilities.Last updated -8392TypeScriptMIT License
- -securityAlicense-qualityA collection of Laravel helper tools for integration with Cursor IDE, providing features like log viewing, error searching, artisan command execution, and model information display directly within the editor.Last updated -1PythonMIT License