网络哨兵MCP服务器是一款全面的威胁情报聚合MCP(模型上下文协议)服务器,它为安全分析提供了对多个威胁情报源的统一访问,解决了安全分析中多源数据获取的难题,提升了分析效率和准确性。
git clone https://github.com/jx888-max/cyber-sentinel-mcp.git
cd cyber-sentinel-mcp
pip install -e .
# 运行设置向导
python -m cyber_sentinel.setup_wizard
# 或者直接设置环境变量
export VIRUSTOTAL_API_KEY=your_virustotal_api_key_here
export ABUSEIPDB_API_KEY=your_abuseipdb_api_key_here
python -c "from cyber_sentinel.server import app; print('✅ 安装成功!')"
.env
文件:VIRUSTOTAL_API_KEY=your_key_here
.env
文件:ABUSEIPDB_API_KEY=your_key_here
.env
文件:SHODAN_API_KEY=your_key_here
添加到 claude_desktop_config.json
文件:
{
"mcpServers": {
"cyber-sentinel": {
"command": "python",
"args": ["-m", "cyber_sentinel.server"],
"cwd": "/path/to/cyber-sentinel",
"env": {
"VIRUSTOTAL_API_KEY": "your_virustotal_key",
"ABUSEIPDB_API_KEY": "your_abuseipdb_key",
"SHODAN_API_KEY": "your_shodan_key"
}
}
}
}
添加到MCP配置文件:
{
"mcp.servers": {
"cyber-sentinel": {
"command": ["python", "-m", "cyber_sentinel.server"],
"cwd": "/path/to/cyber-sentinel",
"env": {
"VIRUSTOTAL_API_KEY": "your_virustotal_key",
"ABUSEIPDB_API_KEY": "your_abuseipdb_key"
}
}
}
}
分析IP地址8.8.8.8是否存在恶意活动
检查1.1.1.1是否安全可用
google.com是否安全?
检查example.com的安全状态
分析此MD5哈希:d41d8cd98f00b204e9800998ecf8427e
此URL是否安全:https://example.com/suspicious-path
显示所有威胁情报源的状态
分析此Python代码的安全漏洞:
[paste your code here]
检查此JavaScript函数是否存在XSS漏洞:
[paste your code here]
扫描此SQL查询是否存在注入风险:
[paste your code here]
扫描这些项目依赖的漏洞:
package.json: [paste content]
requirements.txt: [paste content]
检查我的Python项目是否有过时的包:
[provide requirements.txt content]
分析此Dockerfile的安全问题:
[paste Dockerfile content]
检查此Kubernetes部署是否存在安全配置错误:
[paste K8s YAML content]
为我的项目生成全面的安全报告
创建具有当前威胁态势的安全仪表板
将安全发现导出为HTML报告
analyze_indicator
跨多个威胁情报源分析安全指标。
支持的指标:
8.8.8.8
)google.com
)https://example.com
)返回结果:
check_api_status
检查所有威胁情报源的配置和状态。
返回结果:
analyze_code_security
对源代码进行全面的安全分析。
参数:
code_content
:要分析的源代码language
:编程语言(未指定时自动检测)locale
:输出语言(zh/en)返回结果:
scan_project_dependencies
扫描项目依赖以查找安全漏洞。
参数:
project_files
:依赖文件的字典(如package.json、requirements.txt等)返回结果:
analyze_docker_security
分析Docker配置以遵循安全最佳实践。
参数:
dockerfile_content
:要分析的Dockerfile内容返回结果:
scan_kubernetes_config
扫描Kubernetes清单以查找安全问题。
参数:
k8s_manifests
:Kubernetes YAML文件的字典返回结果:
generate_security_report
生成带有可视化的全面安全报告。
参数:
analysis_results
:安全分析的组合结果report_format
:输出格式(json/html/markdown)返回结果:
{
"indicator": "8.8.8.8",
"type": "ip",
"overall_reputation": "clean",
"confidence": 100.0,
"sources_checked": 4,
"sources_responded": 3,
"malicious_sources": 0,
"clean_sources": 3,
"countries": ["US"],
"isps": ["Google LLC"],
"detailed_results": [
{
"source": "VirusTotal",
"reputation": "clean",
"malicious_count": 0,
"total_engines": 89
}
],
"errors": [],
"timestamp": "2024-01-15T10:30:00Z"
}
运行测试套件以验证功能:
# 运行单元测试
python -m pytest tests/ -v
# 使用你的API密钥进行测试
python -c "
from cyber_sentinel.server import check_api_status
import asyncio
print(asyncio.run(check_api_status()))
"
本项目采用MIT许可证 - 详情请参阅 LICENSE 文件。
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)🛡️ 简化威胁情报分析。