使用说明
🛡️ PenTest MCP
通过模型上下文协议(MCP)进行AI驱动的安全扫描
PenTest MCP是一个专门的MCP服务器,向Claude Desktop等AI代理提供25多种专业安全工具。它使安全研究人员和开发人员能够通过自然语言编排渗透测试,自动化复杂的工具链并生成专业报告。
🚀 快速入门(克劳德桌面版)
-
安装依赖项:
pip install -e . -
配置Claude桌面: 将以下内容添加到您的
claude_desktop_config.json:{ "mcpServers": { "pentest": { "command": "python3", "args": [ "-m", "pentest_mcp.mcp_server" ], "cwd": "/absolute/path/to/pentest-mcp" } } } -
重新启动克劳德桌面 并开始扫描:
- “初始化安全评估http://localhost:3001"
- “快速扫描http://localhost:3001同意”
- “检查站点是否有WAF”
- “生成最终安全报告”
- Claude桌面集成 -通过模型上下文协议进行完全编排。
- 25+安全工具 -包括
nmap,sqlmap,nuclei,ffuf,nikto,testssl以及更多。 - 自然语言编排 -问安全问题时,克劳德会选择合适的工具。
- 预设扫描模式 -快速分类和广泛评估模式。
- 人工智能生成的报告 -由Gemini AI驱动的专业降价报告。
- CVE富集 -结果会自动与CVE数据进行交叉引用。
🛠️ 支持的工具(25)
| 类别 | 工具 |
|---|---|
| 侦察 | subfinder, wafw00f, nmap, whatweb, amass, dnsrecon, theharvester |
| 漏洞扫描 | nuclei, sqlmap, dalfox, nikto, retire, commix, corscanner, graphql_cop |
| 网络模糊 | ffuf, gobuster, wfuzz, arjun |
| TLS/SSL | sslyze, testssl |
| 高级/OSINT | masscan, trufflehog, git_dumper, jwt_tool |
🔧 安装和设置
先决条件
- Python 3.11+
- Gemini API密钥 (用于报告和分析)
- (推荐)安装的外部工具:
nmap,sqlmap,ffuf,nuclei等等。
配置
创建一个 .env 项目根目录中的文件:
GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemini-flash-lite-latest
📁 项目结构
pentest-mcp/
├── pentest_mcp/
│ ├── mcp_server.py # Main MCP server entry point
│ ├── scan_modes.py # Quick & Extensive scan logic
│ ├── session.py # Session & DB management
│ ├── report_engine.py # AI report generation
│ ├── llm_providers.py # Gemini API integration
│ ├── tools/ # Tool wrappers & logic
│ └── models.py # Pydantic data models
├── vulnerable-app/ # Local test target (Node.js)
├── reports/ # Generated scan reports
└── pyproject.toml # Project dependencies
🔒 安全通知
此工具仅用于授权的安全测试。
- 在扫描任何目标之前,始终获得明确的书面许可。
- 未经授权的测试是非法和不道德的。
- 这
consent标志是所有活动扫描工具的强制性要求。
内置于 🐍 python🧠 双子座AI·🛡️ 主控程序