由 Cyreslab.ai 开发的 Model Context Protocol 服务器,提供对 ExploitDB 功能的访问。此服务器使像 Claude 这样的AI助手能够查询有关安全漏洞和弱点的信息,增强网络安全研究和威胁情报能力。
GitHub 仓库: https://github.com/Cyreslab-AI/exploitdb-mcp-server 联系: contact@cyreslab.ai
克隆仓库:
git clone https://github.com/Cyreslab-AI/exploitdb-mcp-server.git
cd exploitdb-mcp-server
安装依赖项:
npm install
构建项目:
npm run build
配置服务器:
.env.example 创建一个 .env 文件初始化数据库:
npm run update-db
注意: 初始数据库更新可能需要几分钟时间,因为它处理了来自 ExploitDB CSV 文件的大约 47,000 个漏洞。脚本通过使用所需字段的默认值来优雅地处理缺失或格式错误的数据。
运行服务器:
node build/index.js
要将此服务器与 Claude 或其他兼容 MCP 的助手一起使用,请将其添加到您的 MCP 配置中:
{
"mcpServers": {
"mcp-exploitdb-server": {
"command": "node",
"args": ["/path/to/exploitdb-mcp-server/build/index.js"]
}
}
}
ExploitDB MCP 服务器提供了 18 种全面的工具,用于查询和分析漏洞数据:
使用 search_exploits 工具在数据库中搜索漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_exploits</tool_name>
<arguments>
{
"query": "wordpress 插件",
"platform": "php",
"limit": 5
}
</arguments>
</use_mcp_tool>
额外的搜索参数:
type: 按漏洞类型筛选(例如,webapps、远程、本地)cve: 按 CVE 编号筛选author: 按作者名称筛选start_date/end_date: 按日期范围筛选(YYYY-MM-DD)verified: 按验证状态筛选(true/false)offset: 用于分页使用 get_exploit 工具获取特定漏洞的详细信息:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_exploit</tool_name>
<arguments>
{
"id": 12345,
"include_code": true
}
</arguments>
</use_mcp_tool>
使用 find_by_cve 工具查找与特定 CVE 相关的所有漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>find_by_cve</tool_name>
<arguments>
{
"cve": "CVE-2021-44228",
"limit": 10
}
</arguments>
</use_mcp_tool>
使用 get_recent_exploits 工具获取最近添加的漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_recent_exploits</tool_name>
<arguments>
{
"limit": 10
}
</arguments>
</use_mcp_tool>
使用 get_statistics 工具获取关于数据库中漏洞的洞察:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_statistics</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>
根据特定平台及其高级过滤器搜索漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_platform</tool_name>
<arguments>
{
"platform": "php",
"type": "webapps",
"verified": true,
"limit": 10
}
</arguments>
</use_mcp_tool>
查找特定作者的所有漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_author</tool_name>
<arguments>
{
"author": "Offensive Security",
"limit": 10
}
</arguments>
</use_mcp_tool>
查找特定日期范围内的漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_date_range</tool_name>
<arguments>
{
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"platform": "windows",
"limit": 20
}
</arguments>
</use_mcp_tool>
根据生成的标签搜索漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_tags</tool_name>
<arguments>
{
"tags": ["SQL 注入", "RCE"],
"match_all": false,
"limit": 10
}
</arguments>
</use_mcp_tool>
查找最近添加的漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_trending_exploits</tool_name>
<arguments>
{
"days": 30,
"limit": 10
}
</arguments>
</use_mcp_tool>
并排比较多个漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>compare_exploits</tool_name>
<arguments>
{
"ids": [12345, 12346, 12347]
}
</arguments>
</use_mcp_tool>
查找与特定漏洞相关的漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_related_exploits</tool_name>
<arguments>
{
"id": 12345,
"relation_type": "platform",
"limit": 10
}
</arguments>
</use_mcp_tool>
高效检索多个漏洞:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>batch_get_exploits</tool_name>
<arguments>
{
"ids": [12345, 12346, 12347, 12348],
"include_code": false
}
</arguments>
</use_mcp_tool>
将搜索结果导出为 CSV 或 JSON 格式:
<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>export_search_results</tool_name>
<arguments>
{
"query": "wordpress",
"format": "csv",
"platform": "php",
"limit": 100
}
</arguments>
</use_mcp_tool>
服务器可以通过环境变量或 .env 文件进行配置:
| 变量 | 描述 | 默认值 |
|---|---|---|
CLONE_REPOSITORY | 是否克隆 ExploitDB 仓库 | false |
REPOSITORY_URL | ExploitDB 仓库的 URL | https://gitlab.com/exploit-database/exploitdb.git |
CSV_URL | ExploitDB CSV 文件的 URL | https://gitlab.com/exploit-database/exploitdb/-/raw/main/files_exploits.csv |
DATA_DIR | 存储数据的目录 | ./data |
DB_PATH | SQLite 数据库的路径 | ./data/exploitdb.sqlite |
UPDATE_INTERVAL | 更新频率(小时),0 表示禁用 | 24 |
MAX_RESULTS | 每次查询返回的最大结果数 | 10 |
此服务器使用 Exploit Database 中的数据,该数据库由 Offensive Security 维护。数据要么直接从 CSV 文件下载,要么从 ExploitDB GitLab 仓库克隆。
服务器自动处理各种数据质量问题:
date_published,如果缺失则回退到 date_added、date_updated 或默认日期数据库通常包含:
本项目采用 MIT 许可证 - 详情见 LICENSE 文件。
欢迎贡献!请随意提交 Pull Request。
有功能建议或发现错误?请在我们的 GitHub 仓库 上打开一个问题,或直接联系我们 contact@cyreslab.ai。