dfir虹膜mcp
MCP(模型上下文协议)服务器 DFIR-IRIS --公开88个工具,让LLM客户端(Claude Desktop、Cursor、Claude Code等)通过stdio与DFIR-IRIS事件响应案例、警报、资产、IOC、时间表等进行交互。
先决条件
安装
从源代码构建
git clone https://github.com/refractionPOINT/dfir-iris-mcp.git
cd dfir-iris-mcp
go build -o dfir-iris-mcp ./cmd/dfir-iris-mcp安装方法: go install
go install github.com/refractionPOINT/dfir-iris-mcp/cmd/dfir-iris-mcp@latest配置
设置所需的环境变量:
export DFIR_IRIS_URL="https://your-iris-instance.example.com"
export DFIR_IRIS_API_KEY="your-api-key-here"| 变量 | 必填 | 描述 |
|---|---|---|
DFIR_IRIS_URL | 是 | DFIR-IRIS实例的基本URL |
DFIR_IRIS_API_KEY | 是 | DFIR-IRIS“我的设置”中的API密钥 |
DFIR_IRIS_TLS_SKIP_VERIFY | 否 | 设置为跳过TLS证书验证(仅限dev/demo) |
用法
服务器使用JSON-RPC通过stdio进行通信。将其添加到MCP客户端配置中。
克劳德桌面/克劳德代码
添加到MCP设置(claude_desktop_config.json 或 .mcp.json):
{
"mcpServers": {
"dfir-iris": {
"command": "/path/to/dfir-iris-mcp",
"env": {
"DFIR_IRIS_URL": "https://your-iris-instance.example.com",
"DFIR_IRIS_API_KEY": "your-api-key-here"
}
}
}
}光标
添加 .cursor/mcp.json 在您的项目或 ~/.cursor/mcp.json 全球地:
{
"mcpServers": {
"dfir-iris": {
"command": "/path/to/dfir-iris-mcp",
"env": {
"DFIR_IRIS_URL": "https://your-iris-instance.example.com",
"DFIR_IRIS_API_KEY": "your-api-key-here"
}
}
}
}手动测试
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"dfir_iris_system_ping","arguments":{}}}' | \
DFIR_IRIS_URL=https://your-iris DFIR_IRIS_API_KEY=your-key ./dfir-iris-mcp工具(共88个)
| 域 | 工具 | 描述 |
|---|---|---|
| 系统 | 2 | Ping,版本信息 |
| 设置 | 8 | 列出资产类型、IOC类型、任务状态、分析状态、案例状态、模板、分类、证据类型 |
| 案例 | 9 | 列表、筛选、创建、更新、删除、关闭、重新打开、摘要更新、导出 |
| 警报 | 8 | 筛选、获取、创建、更新、删除、升级、合并、取消合并 |
| 资产 | 5 | 列出、获取、添加、更新、删除(案例范围) |
| 注释 | 9 | CRUD用于注释和注释组,搜索(大小写范围) |
| IOC | 5 | 列出、获取、添加、更新、删除(案例范围) |
| 时间线 | 5 | 列出、获取、添加、更新、删除事件(案例范围) |
| 任务 | 5 | 列出、获取、添加、更新、删除(案例范围) |
| 证据 | 5 | 列出、获取、添加、更新、删除(案例范围) |
| 数据存储 | 10 | 树视图,文件CRUD/移动,文件夹CRUD/移动/重命名(大小写范围) |
| 注释 | 4 | 列出、添加、编辑、删除任何案例对象 |
| 用户 | 5 | 列表、获取、添加、更新、删除(管理员) |
| 组 | 4 | 列表、添加、更新、删除(管理员) |
| 客户 | 4 | 列出、添加、更新、删除 |
所有工具都遵循命名模式 dfir_iris__例如。 dfir_iris_cases_list, dfir_iris_alerts_escalate, dfir_iris_timeline_add.
建筑
cmd/dfir-iris-mcp/main.go # Entry point
internal/
config/config.go # Env var loading
client/client.go # HTTP client, Bearer auth, envelope unwrap
tools/
register.go # RegisterAll + helpers
{domain}.go # Tool handlers per domain- 软件开发工具包:官方 (stdio传输)
- 认证:持票人代币通过
Authorization头球 - 响应处理:DFIR-IRIS将响应封装在
{"status","message","data"}--客户端解包并返回原始数据dataJSON供LLM解释 - 兼容性:以所有DFIR-IRIS v2.x版本支持的传统API终结点为目标
许可证
看 许可证 了解详情。
