恶意代码防护ClamAV
一个启用使用ClamAV引擎扫描文件中病毒的服务器,通过SSE连接提供与Cursor IDE的简单集成。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"ClamAV Server": {
"url": "http://[SERVER_IP]:8000/sse"
}
}
}
服务介绍
ClamAV MCP
简单的 ClamAV MCP,允许使用 ClamAV 引擎扫描文件中的病毒。

要求
此项目需要在您的系统上安装 ClamAV。以下是安装方法:
Ubuntu/Debian
sudo apt-get update
sudo apt-get install clamav clamav-daemon
Windows
- 从 ClamAV 官方网站 下载 ClamAV 安装程序
- 运行安装程序并按照设置向导进行操作
- 确保将 ClamAV 添加到系统的 PATH 中
macOS
brew install clamav
使用
要运行 MCP 服务器:
uv run mcp run main.py -t sse
服务器将启动并在默认情况下监听 8000 端口上的 SSE 连接。
Cursor 配置
要将此 MCP 与 Cursor 一起使用,请在 Cursor 设置中添加以下配置:
{
"mcpServers": {
"ClamAV Server": {
"url": "http://[SERVER_IP]:8000/sse"
}
}
}
此配置告诉 Cursor 连接到 ClamAV MCP 服务器。
API
MCP 提供了一个单一的端点:
scan_file
- 参数:
base64_data: 要扫描的文件的 Base64 编码字符串filename: 在扫描中使用的文件名
- 返回:
success: 布尔值,表示扫描是否成功result: 来自 clamscan 命令的原始输出error: 如果扫描失败,则返回错误消息