Huntress API MCP 服务器
项目简介
本项目是一个 Model Context Protocol (MCP) 服务器,旨在为 LLM 客户端提供访问 Huntress 安全平台功能的标准化接口。通过此服务器,LLM 可以安全、便捷地获取 Huntress 平台上的安全数据,并执行相关操作,例如检索账户信息、管理组织、监控 агента 和获取各类安全报告。
主要功能点
- 账户信息检索: 获取 Huntress 账户的详细信息。
- 组织管理: 列出和检索 Huntress 组织的信息。
- агента 管理: 列出和检索 Huntress агента 的信息。
- 事件报告访问: 列出和检索 Huntress 事件报告。
- 汇总报告访问: 列出和检索 Huntress 汇总报告。
- 账单报告访问: 列出和检索 Huntress 账单报告。
- 速率限制: 内置 Huntress API 的速率限制,防止请求超限。
- 错误处理: 完善的错误处理机制,提供清晰的错误反馈。
安装步骤
- 克隆仓库:
git clone https://github.com/MCP-Mirror/DynamicEndpoints_huntress-mcp-server.git cd DynamicEndpoints_huntress-mcp-server - 安装依赖:
npm install - 配置环境变量:
复制 '.env.example' 文件并重命名为 '.env',然后根据您的 Huntress API 凭据修改 '.env' 文件:
API 密钥和密钥可以在您的 Huntress 账户 '<your_account_subdomain>.huntress.io' 的 API 凭证部分获取。HUNTRESS_API_KEY=your_api_key_here HUNTRESS_API_SECRET=your_api_secret_here - 构建服务器:
npm run build
服务器配置
要将此 MCP 服务器与 MCP 客户端连接,您需要在 MCP 客户端的配置中添加以下服务器信息。请注意将 'path/to/huntress-server/build/index.js' 替换为 Huntress 服务器 'index.js' 文件的实际路径。
{ "serverName": "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 MCP 服务器已成功启动。
-
在您的 MCP 客户端配置中添加上述服务器配置。
-
在您的 LLM 应用中,可以使用以下工具名称来调用 Huntress API 的功能:
- 'get_account_info' (获取账户信息)
- 'list_organizations' (列出组织)
- 'get_organization' (获取组织详情,需要 'organization_id')
- 'list_agents' (列出 агента)
- 'get_agent' (获取 агента 详情,需要 'agent_id')
- 'list_incident_reports' (列出事件报告)
- 'get_incident_report' (获取事件报告详情,需要 'report_id')
- 'list_summary_reports' (列出汇总报告)
- 'get_summary_report' (获取汇总报告详情,需要 'report_id')
- 'list_billing_reports' (列出账单报告)
- 'get_billing_report' (获取账单报告详情,需要 'report_id')
例如,要获取账户信息,您可以在 LLM 中指示客户端调用 'get_account_info' 工具。具体的工具参数和使用方法请参考仓库 'README.md' 文件中 "Available Tools" 部分的详细描述。
信息
分类
商业系统