这是一个基于 Model Context Protocol (MCP) 的服务器,提供了与 Huntress API 交互的工具。借助该服务器,你可以进行程序化访问,实现账户管理、组织管理、代理管理、事件报告、摘要报告等诸多功能。
本服务器可让你轻松与 Huntress API 进行交互,实现各类管理和报告功能。你可以通过 Smithery 自动安装,也能手动进行安装配置。
通过 Smithery 自动安装 Huntress API MCP 服务器以用于 Claude 桌面版:
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
工具获取账户信息的示例:
# 调用 get_account_info 工具获取账户信息
# 假设已经配置好环境变量
node path/to/huntress-server/build/index.js get_account_info
以下是使用 list_organizations
工具列出账户中所有组织的示例:
# 调用 list_organizations 工具列出所有组织
# 假设已经配置好环境变量
node path/to/huntress-server/build/index.js list_organizations
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 Key |
HUNTRESS_API_SECRET |
你的 Huntress API Secret Key |
这些可以在你的 Huntress 账户
下的“API 凭证”部分获取。
将以下配置添加到你的 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次请求(基于滑动窗口)。这意味着:
服务器处理了多种错误场景:
本项目采用 MIT License,详情请参见 LICENSE 文件。