Rapid7 InsightIDR MCP服务器
 ](https://nodejs.org/)   
A. 模型上下文协议(MCP) 为AI助手提供访问权限的服务器 Rapid7洞察IDR,一种用于现代检测和响应的云原生SIEM。使用LEQL查询调查、搜索日志、分析警报、跟踪资产、监控用户行为和管理威胁情报。
特性
调查
- 按状态、优先级、受让人、日期范围搜索和过滤调查
- 创建、更新和管理调查生命周期
- 添加评论并检索相关警报
- 制定调查时间表
日志搜索(LEQL)
- 跨日志集执行LEQL(日志条目查询语言)查询
- 列出可用日志集(防火墙、DNS、DHCP、端点、云、Active Directory)
- 检索单个日志条目和汇总统计信息
- LEQL语法参考和示例
警报
- 按严重性、类型、状态、日期列出和过滤警报
- 通过证据和指标获取完整的警报详细信息
- 更新警报状态(打开、调查、关闭)
- 调查取证
资产
- 按主机名、IP、操作系统、代理状态搜索端点
- 完整的资产详细信息:软件清单、漏洞、代理信息
- 最近的活动:登录、进程、网络连接
用户行为分析(UBA)
- 在整个组织中搜索用户帐户
- 活动分析:登录模式、位置、访问的资产
- 通过行为评分进行风险用户识别
- 异常检测和警报关联
威胁情报
- IOC管理:IP、域名、文件哈希
- 向威胁库添加指标
- 在日志中搜索威胁指标匹配项
保存的查询
- 列出并管理已保存的LEQL查询
- 创建具有描述的可重用查询
- LEQL语法助手及其示例
建筑
┌────────────────────────────────────────┐
│ MCP Client (LLM) │
└──────────────┬─────────────────────────┘
│ MCP Protocol (stdio)
┌──────────────▼─────────────────────────┐
│ rapid7-mcp server │
│ │
│ ┌──────────┐ ┌────────────────────┐ │
│ │ Prompts │ │ Resources │ │
│ │ 4 guides │ │ templates, LEQL, │ │
│ │ │ │ detection rules │ │
│ └──────────┘ └────────────────────┘ │
│ │
│ ┌──────────────────────────────────┐ │
│ │ Tools │ │
│ │ investigations │ logs │ alerts │ │
│ │ assets │ users │ threats│queries │ │
│ └──────────────┬───────────────────┘ │
│ │ │
│ ┌──────────────▼───────────────────┐ │
│ │ InsightIDR REST Client │ │
│ │ (client.ts + config.ts) │ │
│ └──────────────┬───────────────────┘ │
└──────────────────┼─────────────────────┘
│ HTTPS
┌──────────────────▼─────────────────────┐
│ Rapid7 InsightIDR Platform API │
│ https://.api.insight.rapid7│
└────────────────────────────────────────┘安装
git clone https://github.com/solomonneas/rapid7-mcp.git
cd rapid7-mcp
npm install
npm run build配置
设置环境变量:
export RAPID7_API_KEY="your-api-key"
export RAPID7_REGION="us" # us, eu, ca, au, ap
export RAPID7_ORG_ID="your-org-id" # optional或者使用 .env 文件:
RAPID7_API_KEY=your-api-key
RAPID7_REGION=us
RAPID7_ORG_ID=your-org-idMCP客户端配置
克劳德桌面版
{
"mcpServers": {
"rapid7": {
"command": "node",
"args": ["path/to/rapid7-mcp/dist/index.js"],
"env": {
"RAPID7_API_KEY": "your-api-key",
"RAPID7_REGION": "us"
}
}
}
}龙虾
添加到您的 openclaw.json:
{
"mcp": {
"servers": {
"rapid7": {
"type": "stdio",
"command": "node",
"args": ["/path/to/rapid7-mcp/dist/index.js"],
"env": {
"RAPID7_API_KEY": "your-api-key",
"RAPID7_REGION": "us"
}
}
}
}
}工具参考
| 工具 | 说明 |
|---|---|
search_investigations | 按状态、优先级、受让人列出/筛选调查 |
get_investigation | 获取完整的调查细节和时间表 |
create_investigation | 创建新调查 |
update_investigation | 更新状态、受让人、处置 |
add_investigation_comment | 在调查中添加评论/注释 |
get_investigation_alerts | 获取与调查相关的警报 |
search_logs | 对日志集执行LEQL查询 |
list_log_sets | 列出可用日志集 |
get_log_entry | 按ID获取特定日志条目 |
get_log_stats | 时间范围的汇总统计信息 |
list_alerts | 获取具有严重性/类型/状态过滤器的警报 |
get_alert | 完整的警报细节和证据 |
update_alert_status | 更新警报状态 |
get_alert_evidence | 从警报中获取证据/指标 |
search_assets | 按主机名、IP、操作系统搜索端点 |
get_asset | 包含软件/漏洞的完整资产详细信息 |
get_asset_activity | 资产最近的活动 |
search_users | 搜索用户帐户 |
get_user_activity | 用户行为分析 |
get_risky_users | 行为评分异常的用户 |
list_threat_indicators | 在威胁库中列出IOC |
add_threat_indicator | 添加新的IOC |
search_threat_activity | 在日志中搜索国际奥委会比赛 |
list_saved_queries | 列出已保存的LEQL查询 |
create_saved_query | 保存LEQL查询以供重用 |
leql_help | LEQL语法参考和示例 |
LEQL查询示例
-- Find all blocked traffic from a source
where(source_address = 10.0.0.1 AND action = BLOCK)
-- Top talkers by connection count
groupby(source_address) calculate(count) sort(desc)
-- Failed logins for a specific user
where(user = "admin" AND result = FAILED_LOGIN)
-- HTTP errors by URL
where(status >= 400) groupby(url) calculate(count)
-- DNS queries to suspicious domains
where(query CONTAINS "malware") groupby(query) calculate(count)
-- Outbound connections on non-standard ports
where(destination_port != 80 AND destination_port != 443 AND direction = OUTBOUND)提示
| 提示 | 描述 |
|---|---|
investigate-alert | 指导性警报调查工作流程 |
hunt-ioc | 在所有日志源中搜索IOC |
user-behavior-review | 分析用户活动是否存在异常 |
incident-timeline | 建立按时间顺序排列的事件时间表 |
资源
| URI | 描述 |
|---|---|
rapid7://investigation-templates | 常见调查模板 |
rapid7://leql-reference | LEQL语法和示例 |
rapid7://detection-rules | 内置检测规则目录 |
发展
npm run build # Compile TypeScript
npm run dev # Watch mode
npm run test # Run tests
npm run lint # Lint check许可证
麻省理工学院
