Huntress MCP 服务器
用于Huntress API集成的MCP服务器
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"huntress": {
"args": [
"path/to/huntress-server/build/index.js"
],
"command": "node",
"env": {
"HUNTRESS_API_KEY": "your_api_key_here",
"HUNTRESS_API_SECRET": "your_api_secret_here"
}
}
}
}
该服务需要配置环境变量:HUNTRESS_API_KEY、HUNTRESS_API_SECRET
可用工具 (11 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
get_account_info
Get information about the current account
该工具无需必填参数,直接调用即可
list_organizations 2 个参数
List organizations in the account
该工具无需必填参数,直接调用即可
get_organization 1 个参数 需填 1 项
Get details of a specific organization
必填参数:organization_id
list_agents 4 个参数
List agents in the account
该工具无需必填参数,直接调用即可
get_agent 1 个参数 需填 1 项
Get details of a specific agent
必填参数:agent_id
list_incident_reports 5 个参数
List incident reports
该工具无需必填参数,直接调用即可
get_incident_report 1 个参数 需填 1 项
Get details of a specific incident report
必填参数:report_id
list_summary_reports 4 个参数
List summary reports
该工具无需必填参数,直接调用即可
get_summary_report 1 个参数 需填 1 项
Get details of a specific summary report
必填参数:report_id
list_billing_reports 3 个参数
List billing reports
该工具无需必填参数,直接调用即可
get_billing_report 1 个参数 需填 1 项
Get details of a specific billing report
必填参数:report_id
服务介绍
Huntress API MCP 服务器
这是一个提供与 Huntress API 交互工具的模型上下文协议 (MCP) 服务器。此服务器支持以编程方式访问 Huntress 的功能,包括账户管理、组织管理、代理管理、事件报告等。
功能
- 账户信息检索
- 组织管理
- 代理管理和监控
- 事件报告访问
- 摘要报告生成
- 账单报告访问
- 内置速率限制(每分钟60次请求)
- 错误处理和响应格式化
安装
通过 Smithery 安装
要通过 Smithery 自动为 Claude Desktop 安装 Huntress API MCP 服务器:
npx -y @smithery/cli install huntress-mcp-server --client claude
手动安装
- 克隆仓库
- 安装依赖项:
npm install
- 根据
.env.example创建一个.env文件:
HUNTRESS_API_KEY=your_api_key_here
HUNTRESS_API_SECRET=your_api_secret_here
- 构建服务器:
npm run build
可用工具
账户管理
get_account_info: 获取当前账户的信息
组织管理
list_organizations: 列出账户中的组织get_organization: 获取特定组织的详细信息
代理管理
list_agents: 列出账户中的代理get_agent: 获取特定代理的详细信息
事件报告
list_incident_reports: 列出事件报告get_incident_report: 获取特定事件报告的详细信息
摘要报告
list_summary_reports: 列出摘要报告get_summary_report: 获取特定摘要报告的详细信息
账单报告
list_billing_reports: 列出账单报告get_billing_report: 获取特定账单报告的详细信息
配置
服务器需要以下环境变量:
HUNTRESS_API_KEY: 您的 Huntress API 密钥HUNTRESS_API_SECRET: 您的 Huntress API 密钥
这些可以在您的 Huntress 账户下的 <your_account_subdomain>.huntress.io 中的 API 凭证部分获得。
使用 MCP
在您的 MCP 设置中添加以下配置:
{
"mcpServers": {
"huntress": {
"command": "node",
"args": ["path/to/huntress-server/build/index.js"],
"env": {
"HUNTRESS_API_KEY": "your_api_key_here",
"HUNTRESS_API_SECRET": "your_api_secret_here"
}
}
}
}
速率限制
该服务器实现了 Huntress API 的每分钟60次请求的滑动窗口速率限制。这意味着:
- 在任何60秒的时间段内不能超过60次请求
- 窗口是滑动的,因此如果在 T0 时发出请求1,在 T30 时发出请求60,则必须等到 T60 才能发出请求61
错误处理
该服务器处理各种错误场景:
- 无效的 API 凭证
- 超过速率限制
- 无效的请求参数
- API 响应错误
许可证
MIT 许可证 - 详情请参阅 LICENSE 文件