项目介绍
VirusTotal MCP Server

这是一个用于查询VirusTotal API的模型上下文协议(MCP)服务器。该服务器提供了全面的安全分析工具,并自动获取相关数据。它与兼容MCP的应用程序无缝集成,如Claude Desktop。
<a href="https://glama.ai/mcp/servers/rcbu34kp5c"><img width="380" height="200" src="https://gips0.baidu.com/it/u=1029796147,917949196&fm=3081&app=3081&f=PNG?w=760&h=400" /></a>
快速开始(推荐)
通过Smithery安装
要通过Smithery自动安装VirusTotal服务器到Claude Desktop:
npx -y @smithery/cli install @burtthecoder/mcp-virustotal --client claude
手动安装
- 通过npm全局安装服务器:
npm install -g @burtthecoder/mcp-virustotal
- 添加到你的Claude Desktop配置文件中:
{
"mcpServers": {
"virustotal": {
"command": "mcp-virustotal",
"env": {
"VIRUSTOTAL_API_KEY": "your-virustotal-api-key"
}
}
}
}
配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- 重启Claude Desktop
替代设置(从源代码)
如果你希望从源代码运行或需要修改代码:
- 克隆并构建:
git clone <repository_url>
cd mcp-virustotal
npm install
npm run build
- 添加到你的Claude Desktop配置中:
{
"mcpServers": {
"virustotal": {
"command": "node",
"args": ["--experimental-modules", "/absolute/path/to/mcp-virustotal/build/index.js"],
"env": {
"VIRUSTOTAL_API_KEY": "your-virustotal-api-key"
}
}
}
}
功能
- 全面分析报告:每个分析工具都会自动获取相关的关联数据以及基本报告,提供一个完整的安全概览
- URL分析:安全报告,自动获取联系过的域名、下载的文件和威胁行为者
- 文件分析:详细分析文件哈希值,包括行为、释放的文件和网络连接
- IP分析:安全报告,包含历史数据、解析记录和相关威胁
- 域名分析:DNS信息、WHOIS数据、SSL证书和子域
- 详细的关联分析:专门的工具用于查询特定类型的关联,并支持分页
- 丰富的格式化:清晰地分类和展示分析结果及关联数据
工具
报告工具(自动关联获取)
1. URL报告工具
- 名称:
get_url_report
- 描述:获取一个全面的URL分析报告,包括安全扫描结果和关键关系(通信文件、联系过的域名/IP、下载的文件、重定向、威胁行为者)
- 参数:
2. 文件报告工具
- 名称:
get_file_report
- 描述:使用文件的哈希值(MD5/SHA-1/SHA-256)获取一个全面的文件分析报告。包括检测结果、文件属性和关键关系(行为、释放的文件、网络连接、嵌入内容、威胁行为者)
- 参数:
hash(必需):文件的MD5、SHA-1或SHA-256哈希值
3. IP报告工具
- 名称:
get_ip_report
- 描述:获取一个全面的IP地址分析报告,包括地理位置、信誉数据和关键关系(通信文件、历史证书/WHOIS、解析记录)
- 参数:
4. 域名报告工具
- 名称:
get_domain_report
- 描述:获取一个全面的域名分析报告,包括DNS记录、WHOIS数据和关键关系(SSL证书、子域、历史数据)
- 参数:
domain(必需):要分析的域名
relationships(可选):报告中包含的具体关系数组
关联工具(详细分析)
1. URL关联工具
- 名称:
get_url_relationship
- 描述:查询URL的特定类型关联,支持分页。可以选择17种关联类型,包括分析、通信文件、联系过的域名/IP、下载的文件、图表、引用文件、重定向和威胁行为者
- 参数:
url(必需):要获取关联的URL
relationship(必需):要查询的关联类型
- 可用的关联类型:analyses, comments, communicating_files, contacted_domains, contacted_ips, downloaded_files, graphs, last_serving_ip_address, network_location, referrer_files, referrer_urls, redirecting_urls, redirects_to, related_comments, related_references, related_threat_actors, submissions
limit(可选,默认:10):要检索的相关对象的最大数量(1-40)
cursor(可选):分页的继续游标
2. 文件关联工具
- 名称:
get_file_relationship
- 描述:查询文件的特定类型关联,支持分页。可以选择41种关联类型,包括行为、网络连接、释放的文件、嵌入内容、执行链和威胁行为者
- 参数:
hash(必需):文件的MD5、SHA-1或SHA-256哈希值
relationship(必需):要查询的关联类型
- 可用的关联类型:analyses, behaviours, bundled_files, carbonblack_children, carbonblack_parents, ciphered_bundled_files, ciphered_parents, clues, collections, comments, compressed_parents, contacted_domains, contacted_ips, contacted_urls, dropped_files, email_attachments, email_parents, embedded_domains, embedded_ips, embedded_urls, execution_parents, graphs, itw_domains, itw_ips, itw_urls, memory_pattern_domains, memory_pattern_ips, memory_pattern_urls, overlay_children, overlay_parents, pcap_children, pcap_parents, pe_resource_children, pe_resource_parents, related_references, related_threat__actors, similar_files, submissions, screenshots, urls_for_embedded_js, votes
limit(可选,默认:10):要检索的相关对象的最大数量(1-40)
cursor(可选):分页的继续游标
3. IP关联工具
- 名称:
get_ip_relationship
- 描述:查询IP地址的特定类型关联,支持分页。可以选择12种关联类型,包括通信文件、历史SSL证书、WHOIS记录、解析记录和威胁行为者
- 参数:
ip(必需):要分析的IP地址
relationship(必需):要查询的关联类型
- 可用的关联类型:comments, communicating_files, downloaded_files, graphs, historical_ssl_certificates, historical_whois, related_comments, related_references, related_threat_actors, referrer_files, resolutions, urls
limit(可选,默认:10):要检索的相关对象的最大数量(1-40)
cursor(可选):分页的继续游标
4. 域名关联工具
- 名称:
get_domain_relationship
- 描述:查询域名的特定类型关联,支持分页。可以选择21种关联类型,包括SSL证书、子域、历史数据和DNS记录
- 参数:
domain(必需):要分析的域名
relationship(必需):要查询的关联类型
- 可用的关联类型:caa_records, cname_records, comments, communicating_files, downloaded_files, historical_ssl_certificates, historical_whois, immediate_parent, mx_records, ns_records, parent, referrer_files, related_comments, related_references, related_threat_actors, resolutions, soa_records, siblings, subdomains, urls, user_votes
limit(可选,默认:10):要检索的相关对象的最大数量(1-40)
cursor(可选):分页的继续游标
要求
故障排除
API密钥问题
如果你看到“错误的API密钥”错误:
- 检查日志文件
/tmp/mcp-virustotal-server.log(在macOS上)以查看API密钥状态
- 验证你的API密钥:
- 应该是一个有效的VirusTotal API密钥(通常是64个字符)
- 密钥周围没有多余的空格或引号
- 必须来自你的VirusTotal账户中的API密钥部分
- 在进行任何配置更改后:
- 保存配置文件
- 重启Claude Desktop
- 查看日志以检查新的API密钥状态
模块加载问题
如果你看到ES模块加载警告:
- 对于全局安装:使用快速开始中显示的简单配置
- 对于源代码安装:确保在参数中包含
--experimental-modules
开发
要在开发模式下运行并启用热重载:
npm run dev
错误处理
服务器包括全面的错误处理:
- 无效的API密钥
- 速率限制
- 网络错误
- 无效的输入参数
- 无效的哈希格式
- 无效的IP格式
- 无效的URL格式
- 无效的关联类型
- 分页错误
版本历史
- v1.0.0:初始发布,核心功能
- v1.1.0:添加了URL、文件和IP地址的关联分析工具
- v1.2.0:添加了改进的错误处理和日志记录
- v1.3.0:添加了关联查询的分页支持
- v1.4.0:在报告工具和域名分析中添加了自动关联获取
贡献
- 分叉仓库
- 创建一个特性分支(
git checkout -b feature/amazing-feature)
- 提交你的更改(
git commit -m 'Add amazing feature')
- 推送到分支(
git push origin feature/amazing-feature)
- 打开一个拉取请求
许可证
该项目根据MIT许可证授权 - 详情见LICENSE文件。