一款专为网络安全情报设计的模型上下文协议(MCP)服务器,提供统一访问来自多个权威来源(包括NVD、MITRE和GitHub安全公告)的漏洞数据。此精简版专注于核心CVE情报功能,为安全专业人士提供了必要的特性。
MCP CVE 情报服务器精简版是一款专为安全专业人士、渗透测试人员和网络安全研究人员设计的模型上下文协议(MCP)服务器,这些人员需要将基本的漏洞情报整合到他们的AI工作流程中。此精简版专注于核心功能,从多个权威来源聚合数据,并通过标准化协议提供可操作的安全见解。
状态:精简版,具备核心CVE情报功能和简化功能。
# 克隆仓库
git clone https://github.com/gnlds/mcp-cve-intelligence-server-lite.git
cd mcp-cve-intelligence-server-lite
# 安装依赖
npm install
# 构建项目
npm run build
# 启动服务器
npm start
# 从Docker Hub拉取并运行最新镜像
docker run -d \
--name mcp-cve-server \
-p 13001:3001 \
-e MCP_TRANSPORT_TYPE=http \
-e MCP_HTTP_PORT=3001 \
-e MCP_HTTP_HOST=0.0.0.0 \
proug/mcp-cve-intelligence-server-lite:latest
# 服务器将在 http://localhost:13001 可用
# 健康检查:http://localhost:13001/health
# 使用提供的Docker设置
chmod +x docker-run.sh
./docker-run.sh up
# 服务器将在 http://localhost:13001 可用
# 健康检查:http://localhost:13001/health
# 如果要自定义,请本地构建
docker build -t mcp-cve-intelligence-server-lite:local .
docker run -d -p 13001:3001 mcp-cve-intelligence-server-lite:local
📋 关于高级Docker配置、定制化和部署选项,请参阅 docs/DOCKER.md
要使用此服务器与兼容MCP的客户端,通过NPM安装并配置:
# 从NPM快速安装
npx @proug/mcp-cve-intelligence-server-lite@latest --help
VS Code配置:
{
"servers": {
"cve-intelligence": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-cve-intelligence-server-lite@latest"]
}
}
}
📋 有关完整的MCP客户端配置(VS Code、Claude Desktop等),请参阅下面的配置部分。
该服务器提供7个基本工具,用于全面的CVE情报和安全分析:
searchCves - 高级CVE搜索与发现使用灵活的标准搜索漏洞,带有智能过滤:
{
"keyword": "apache log4j",
"severity": "CRITICAL",
"hasExploit": true,
"dateStart": "2021-01-01",
"dateEnd": "2024-12-31",
"limit": 50,
"source": "nvd"
}
高级示例:
// 搜索最近的RCE漏洞
{
"keyword": "远程代码执行",
"severity": "HIGH,CRITICAL",
"dateStart": "2024-01-01",
"hasExploit": true,
"limit": 100
}
// 查找Windows特权提升问题
{
"keyword": "windows 特权提升",
"severity": "MEDIUM,HIGH,CRITICAL",
"limit": 25
}
getCveDetails - 综合CVE情报检索详细的漏洞信息,附带利用分析:
{
"cveId": "CVE-2021-44228",
"includeExploits": true,
"includeReferences": true
}
响应包含:
getTrendingCves - 实时漏洞情报根据活动和严重性发现当前热门漏洞:
{
"limit": 25,
"timeframe": "7d",
"minSeverity": "MEDIUM"
}
趋势分析:
calculateEpssScores - 环境风险评估计算上下文感知型EPSS分数以进行漏洞优先级划分:
{
"cveIds": ["CVE-2021-44228", "CVE-2022-22965", "CVE-2023-23397"],
"environmentContext": {
"networkExposure": "internet-facing",
"assetCriticality": "critical",
"securityControls": ["waf", "ids", "edr"],
"patchingCapability": "rapid"
}
}
环境上下文:
networkExposure:"internal"、"dmz"、"internet-facing"assetCriticality:"low"、"medium"、"high"、"critical"securityControls:已部署的安全措施数组patchingCapability:"limited"、"standard"、"rapid"generateCveReport - 专业安全报告生成多种格式的综合漏洞报告:
{
"cveIds": ["CVE-2021-44228", "CVE-2022-22965"],
"format": "markdown",
"includeExploits": true,
"includeMetrics": true,
"includeMitigation": true
}
报告格式:
markdown:专业的Markdown报告json:结构化的数据用于自动化summary:执行摘要格式报告部分:
searchByCpe - 产品特定漏洞发现使用CPE标识符查找影响特定产品的漏洞:
{
"cpe": "cpe:2.3:a:apache:log4j:*:*:*:*:*:*:*:*",
"severity": "HIGH,CRITICAL",
"hasExploit": true,
"limit": 50
}
CPE示例:
// 搜索所有Apache产品
{
"cpe": "cpe:2.3:a:apache:*:*:*:*:*:*:*:*:*",
"severity": "CRITICAL"
}
// Windows Server漏洞
{
"cpe": "cpe:2.3:o:microsoft:windows_server:*:*:*:*:*:*:*:*",
"hasExploit": true
}
// 特定版本目标
{
"cpe": "cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*",
"includeExploits": true
}
getSourceHealth - 数据源监控监控CVE数据源的健康状况和可用性:
{
"includeMetrics": true,
"includeLastUpdated": true
}
健康指标:
该服务器包含一个全面的CLI,适用于生产部署和测试:
# 使用HTTP传输快速启动
npm start -- quick-start --port 3001
# 使用默认MCP的stdio传输启动
npm start -- --transport stdio
# 使用自定义配置启动
npm start -- --transport http --port 3001 --log-level debug
# 显示当前配置和环境
npm start -- config
# 通过HTTP端点进行基本健康检查
curl http://localhost:3001/health
# 通过MCP工具测试
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "getSourceHealth", "arguments": {}}}'
# 生成Docker命令和部署信息
npm start -- docker --port 3001
# 自定义传输和网络
npm start -- --transport http --port 3001 --host 0.0.0.0
# 设置调试日志级别
npm start -- --transport http --log-level debug
# 帮助和可用命令
npm start -- --help
# 1. 启动服务器进行评估
npm start -- quick-start --port 3001
# 2. 检查源健康状况
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "getSourceHealth", "arguments": {}}}'
# 3. 在您的堆栈中搜索关键漏洞
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "searchByCpe", "arguments": {"cpe": "cpe:2.3:a:apache:*:*:*:*:*:*:*:*:*", "severity": "CRITICAL"}}}'
# 4. 生成评估报告
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "generateCveReport", "arguments": {"cveIds": ["CVE-2021-44228"], "format": "markdown", "includeExploits": true}}}'
# 1. 查找热门漏洞
npm start -- --transport http --port 3001
# 2. 研究具有利用的特定CVE
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "getCveDetails", "arguments": {"cveId": "CVE-2024-12345", "includeExploits": true}}}'
# 3. 计算环境风险
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "calculateEpssScores", "arguments": {"cveIds": ["CVE-2024-12345"], "environmentContext": {"networkExposure": "internet-facing", "assetCriticality": "critical"}}}}'
# 在目标技术中搜索可利用的漏洞
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "searchCves", "arguments": {"keyword": "windows server 2019", "hasExploit": true, "severity": "HIGH,CRITICAL", "limit": 50}}}'
# 查找最近的RCE漏洞
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "searchCves", "arguments": {"keyword": "远程代码执行", "dateStart": "2024-01-01", "hasExploit": true}}}'
使用环境变量或.env文件配置服务器:
要使用此服务器与兼容MCP的客户端(如VS Code、Claude Desktop等),您需要配置客户端以连接到此服务器。
对于VS Code:
在您的工作区创建一个.vscode/mcp.json文件:
{
"servers": {
"cve-intelligence": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-cve-intelligence-server-lite@latest"]
}
}
}
或者,对于全局配置,在VS Code中运行MCP: 打开用户配置并添加:
{
"servers": {
"cve-intelligence": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-cve-intelligence-server-lite@latest"],
"env": {
"NVD_API_KEY": "${input:nvd-api-key}",
"GITHUB_TOKEN": "${input:github-token}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "nvd-api-key",
"description": "NVD API密钥(可选)",
"password": true
},
{
"type": "promptString",
"id": "github-token",
"description": "GitHub个人访问令牌(可选)",