使用说明
Nessus MCP服务器
一种用于交互的模型上下文协议(MCP)服务器 涅索斯 漏洞扫描程序。该服务器将Nessus功能作为MCP工具、资源和提示公开,使Claude等AI助手能够管理扫描、分析漏洞和生成报告。
特性
🔧 工具(30+)
| 类别 | 工具 |
|---|---|
| 认证 | nessus_login, nessus_server_info, nessus_server_status |
| 扫描管理 | nessus_list_scans, nessus_create_scan, nessus_launch_scan, nessus_pause_scan, nessus_resume_scan, nessus_stop_scan, nessus_delete_scan, nessus_configure_scan |
| 扫描结果 | nessus_get_scan_details, nessus_get_host_details, nessus_get_plugin_output, nessus_search_vulnerabilities, nessus_get_scan_history |
| 出口 | nessus_export_scan, nessus_download_export |
| 模板和策略 | nessus_list_templates, nessus_list_policies |
| 文件夹 | nessus_list_folders, nessus_create_folder, nessus_delete_folder |
| 插件 | nessus_list_plugin_families, nessus_get_plugin_family, nessus_get_plugin_details, nessus_list_plugin_rules |
| 系统 | nessus_list_scanners, nessus_list_users, nessus_list_timezones |
📚 资源
nessus://server/info--服务器元数据nessus://scans/list--所有扫描概览nessus://templates/list--可用的扫描模板
💡 提示
vulnerability_report--生成漏洞评估报告compare_scans--比较两个扫描结果scan_creation_wizard--引导式扫描创建
安装
先决条件
- Python 3.10+
- Nessus扫描仪正在运行(使用Nessus Expert 10.x进行测试)
- MCP-SDK(
pip install mcp)
设置
# Clone or copy the server files
cd nessus-mcp
# Install dependencies
pip install -r requirements.txt
# Set environment variables (or use defaults)
export NESSUS_URL="https://localhost:8834"
export NESSUS_USERNAME="XXXX"
export NESSUS_PASSWORD="XXXX"
# Test the server
python nessus_mcp_server.py
配置
克劳德桌面版
添加到您的Claude桌面配置(%APPDATA%\Claude\claude_desktop_config.json 在Windows或 ~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):
{
"mcpServers": {
"nessus": {
"command": "python",
"args": ["C:\\path\\to\\nessus_mcp_server.py"],
"env": {
"NESSUS_URL": "https://localhost:8834",
"NESSUS_USERNAME": "your_username",
"NESSUS_PASSWORD": "your_password"
}
}
}
}
克劳德代码
claude mcp add nessus -- python /path/to/nessus_mcp_server.py
环境变量
| 变量 | 默认值 | 描述 |
|---|---|---|
NESSUS_URL |
https://localhost:8834 |
Nessus服务器URL |
NESSUS_USERNAME |
XXXX |
身份验证用户名 |
NESSUS_PASSWORD |
XXXX |
身份验证密码 |
使用示例
列出所有扫描
> Use nessus_list_scans to show me all current scans
创建并启动扫描
> Create a basic network scan targeting 192.168.1.0/24 named "Internal Network Audit"
> Then launch it
分析扫描结果
> Show me the details of scan 5, focusing on critical and high severity findings
搜索特定漏洞
> Search scan 5 for any SSL/TLS related vulnerabilities
导出结果
> Export scan 5 as a CSV file
获取插件详细信息
> Show me details about Nessus plugin 10287
建筑
┌─────────────────┐ stdio ┌──────────────────┐ HTTPS/REST ┌─────────────┐
│ Claude / LLM │ ◄────────────► │ Nessus MCP │ ◄──────────────► │ Nessus │
│ (MCP Client) │ │ Server │ │ Scanner │
└─────────────────┘ └──────────────────┘ └─────────────┘
- 运输:stdio(标准输入/输出)
- 认证:使用Nessus API进行基于会话的令牌身份验证
- 安全套接层:已禁用自签名证书验证(本地Nessus的标准)
安全说明
- 凭据通过环境变量传递(在生产中不是硬编码的)
- SSL证书验证已禁用,以支持Nessus的自签名证书
- 服务器进行一次身份验证并重用会话令牌
- 对于生产使用,考虑实施令牌轮换和安全凭证存储
API覆盖范围
此服务器涵盖核心Nessus REST API端点:
| 端点 | 方法 | 涵盖 |
|---|---|---|
/session |
帖子 | ✅ |
/server/properties |
获取 | ✅ |
/server/status |
获取 | ✅ |
/scans |
获取、发布 | ✅ |
/scans/{id} |
获取、放置、删除 | ✅ |
/scans/{id}/launch |
帖子 | ✅ |
/scans/{id}/pause |
帖子 | ✅ |
/scans/{id}/resume |
帖子 | ✅ |
/scans/{id}/stop |
帖子 | ✅ |
/scans/{id}/export |
帖子 | ✅ |
/scans/{id}/hosts/{id} |
获取 | ✅ |
/scans/{id}/hosts/{id}/plugins/{id} |
获取 | ✅ |
/editor/scan/templates |
获取 | ✅ |
/policies |
获取 | ✅ |
/folders |
获取、发布、删除 | ✅ |
/plugins/families |
获取 | ✅ |
/plugins/families/{id} |
获取 | ✅ |
/plugins/plugin/{id} |
获取 | ✅ |
/plugin-rules |
获取 | ✅ |
/scanners |
获取 | ✅ |
/users |
获取 | ✅ |
/scans/timezones |
获取 | ✅ |
许可证
MIT许可证