IRIS模型协议服务器

DFIR-IRIS的模型上下文协议服务器,提供88种工具使LLM客户端能够与DFIR-IRIS的事件响应案例、警报、资产、IOC、时间线等进行交互。

  • by lc-cbot
  • Go
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 lc-cbot/dfir-iris-mcp

使用说明

dfir虹膜mcp

MCP(模型上下文协议)服务器 DFIR-IRIS --公开88个工具,让LLM客户端(Claude Desktop、Cursor、Claude Code等)通过stdio与DFIR-IRIS事件响应案例、警报、资产、IOC、时间表等进行交互。

先决条件

  • 去 1.23或更高版本
  • 跑步 DFIR-IRIS 实例(v2.x)
  • 来自DFIR-IRIS的API密钥(我的设置>API密钥)

安装

从源代码构建

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_<domain>_<action>例如。 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
  • 软件开发工具包:官方 github.com/modelcontextprotocol/go-sdk (stdio传输)
  • 认证:持票人代币通过 Authorization 头球
  • 响应处理:DFIR-IRIS将响应封装在 {"status","message","data"} --客户端解包并返回原始数据 data JSON供LLM解释
  • 兼容性:以所有DFIR-IRIS v2.x版本支持的传统API终结点为目标

许可证

看 许可证 了解详情。