Provides threat intelligence queries for IPs, domains, files, URLs, and vulnerabilities using the ThreatBook API.
这是一个基于微步在线威胁分析API的MCP(Model Context Protocol)服务器,提供完整的情报查询功能。支持微步在线威胁分析API的全部15个工具,包括IP分析、域名分析、文件检测、URL扫描、漏洞情报等。
# 进入项目目录
cd ThreatMCP
# 安装依赖(自动生成的精确依赖)
pip install -r requirements.txt
当前依赖包:
mcp
- Model Context Protocol核心包pydantic
- 数据验证库requests
- HTTP请求库设置微步在线威胁分析API密钥环境变量:
export THREATBOOK_API_KEY="your_threatbook_api_key_here"
在Claude Desktop的配置文件中添加:
{
"mcpServers": {
"threatbook": {
"command": "python",
"args": ["/path/to/your/ThreatMCP/run_server.py"],
"env": {
"THREATBOOK_API_KEY": "your_api_key_here"
}
}
}
}
配置说明:
command
: 使用 python
命令args
: 使用完整绝对路径运行 run_server.py
脚本env
: 设置微步在线威胁分析API密钥环境变量注意: 请将路径 /path/to/your/ThreatMCP/run_server.py
替换为您实际的项目路径
本服务器兼容所有支持MCP协议的客户端,包括:
结合 AI SSH 工具和威胁情报,可以实现智能化的 Linux 系统安全应急分析:
1. 异常发现阶段
# AI 通过 SSH 连接到可疑系统
ssh user@suspicious-server
# 检查系统基本状态
ps aux | grep -E "(bitcoin|mining|crypto)"
netstat -tulpn | grep LISTEN
2. 威胁情报关联分析
ip_reputation
和 ip_analysis
工具分析系统中发现的外部连接 IPdomain_analysis
检查系统 DNS 查询记录中的可疑域名file_analysis
分析可疑文件的 MD5/SHA256 哈希值3. 深度分析示例
# 发现可疑外连 IP: 192.168.1.100
# AI 自动调用威胁情报 API 进行分析
AI 会自动:
ip_reputation
查询该 IP 的信誉信息ip_analysis
获取 IP 地理位置、ASN、历史威胁记录ioc_detection
检测是否为已知的失陷指标4. 综合威胁评估
AI 结合系统信息和威胁情报,提供:
分析类型 | 使用的威胁情报工具 | 应用场景 |
---|---|---|
网络连接分析 | ip_reputation , ip_analysis | 检测恶意外连、C&C 通信 |
DNS 查询分析 | domain_analysis , domain_context | 发现恶意域名、DGA 域名 |
文件完整性检查 | file_analysis , file_multiengines | 检测木马、后门、挖矿程序 |
Web 访问分析 | url_scan , url_report | 分析可疑 URL 访问记录 |
漏洞风险评估 | vulnerability , vuln_match | 系统漏洞风险评估 |
注意: 此功能需要配合支持 SSH 的 AI 工具使用,如 Claude Desktop 配合 SSH MCP 服务器等。
本MCP服务器提供微步在线威胁分析API的完整15个工具,覆盖所有威胁情报分析场景:
ThreatMCP/
├── threatbook_mcp/ # 核心包目录
│ ├── __init__.py # 包初始化
│ ├── server.py # MCP服务器核心
│ ├── response_handler.py # 统一响应处理
│ ├── ip_reputation.py # IP信誉查询
│ ├── ip_analysis.py # IP分析
│ ├── ip_advanced.py # IP高级查询
│ ├── ioc_detection.py # 失陷检测
│ ├── domain_analysis.py # 域名分析
│ ├── domain_advanced.py # 域名高级查询
│ ├── domain_context.py # 域名上下文查询
│ ├── subdomain.py # 子域名查询
│ ├── file_analysis.py # 文件信誉报告
│ ├── file_multiengines.py # 文件反病毒检测
│ ├── file_upload.py # 文件上传分析
│ ├── url_scan.py # URL扫描
│ ├── url_report.py # URL信誉报告
│ ├── vulnerability.py # 漏洞情报
│ └── vuln_match.py # 产品漏洞匹配
├── run_server.py # 🚀 服务器启动脚本(主入口)
├── requirements.txt # 项目依赖
├── README.md # 项目说明
└── config_example.json # Claude Desktop配置示例
MIT License
如有问题或建议,请提交Issue或联系开发者。
An automated research agent using Google Gemini models and Google Search to perform deep, multi-step web research.
A server for Brave Search, enabling web search capabilities via its API.
Search and analyze classical Japanese literature using the Genji API, with advanced normalization features.
Search for IP addresses using Chaitin's IP Intelligence API.
Fetch, convert, and search AWS documentation pages, with recommendations for related content.
Interact with the French government's open data platform (data.gouv.fr) to search for company information.
Web search using OpenAI's o3 model. Requires an OpenAI API key.
Unlock geospatial intelligence through Mapbox APIs like geocoding, POI search, directions, isochrones and more.
An MCP server for Google Search provided by CData, which requires an external CData JDBC Driver.
Search NCBI databases, including PubMed, for scientific literature. Tailored for researchers in life sciences, evolutionary biology, and computational biology.