AI-Pentest-MCP
Enables natural-language-driven security testing by orchestrating multiple pen-testing tools through MCP, with automated scan execution and AI-assisted vulnerability summarization.
README
🛡️ AI-Powered Pentesting Automation Platform (MCP-Based)

An AI-driven security automation platform that integrates traditional penetration testing tools into a unified, natural-language-driven workflow using the Model Context Protocol (MCP).
The system orchestrates multiple security tools and transforms raw outputs into structured, actionable insights through an AI interface.
🖼️ Example Output

🚀 Overview
Security assessments often require chaining multiple tools and manually interpreting outputs.
This platform streamlines that process by enabling natural-language execution of reconnaissance and vulnerability analysis tasks, while automatically handling tool orchestration, output aggregation, and result interpretation.
🧠 Engineering Approach
Designed and implemented a modular security automation system using MCP as an orchestration layer.
Developed Python-based adapters to integrate external security tools, handled execution and parsing logic, and ensured reliable cross-platform operation.
Focused on transforming fragmented tool outputs into a cohesive, AI-assisted analysis workflow.
🧠 Architecture
User (Natural Language)
↓
Claude Desktop (AI Interface)
↓
MCP Server (Python)
↓
Security Tools (Nmap, Nikto, Gobuster, etc.)
↓
Aggregated Results → AI Summary
🔧 Integrated Tools
- Nmap — network reconnaissance and port scanning
- Nikto — web server vulnerability analysis
- Gobuster — directory and file enumeration
- testssl.sh — SSL/TLS configuration analysis
- HTTP Header Scanner — security header misconfiguration detection
- Ping Tool — host availability checks
⚙️ Features
- Natural-language-driven security testing
- Multi-tool orchestration through MCP
- Automated scan execution and result aggregation
- AI-assisted vulnerability summarization
- Cross-platform support (macOS / Linux / Windows via WSL)
- Modular architecture for adding new tools
🎯 Use Case
This platform is designed to accelerate reconnaissance and initial vulnerability assessment by reducing manual tool execution and simplifying result interpretation.
It can serve as a foundation for building automated security workflows, internal tooling, or AI-assisted penetration testing pipelines.
🧪 Example Usage
Inside Claude Desktop:
Ping scanme.nmap.org
Scan scanme.nmap.org with nmap
Run nikto against http://scanme.nmap.org
Run gobuster against http://scanme.nmap.org
Check security headers for https://example.com
📁 Project Structure
ai-pentest-mcp/
├── server.py
├── nmap_scanner.py
├── nikto_scanner.py
├── gobuster_scanner.py
├── header_scanner.py
├── testssl_scanner.py
├── ping_tool.py
├── requirements.txt
└── README.md
⚡ Setup
1. Clone the repository
git clone https://github.com/yassserhabib/ai-pentest-mcp.git
cd ai-pentest-mcp
2. Create a virtual environment
macOS / Linux / WSL:
python3 -m venv venv
source venv/bin/activate
Windows (PowerShell):
python -m venv venv
venv\Scripts\Activate.ps1
3. Install Python dependencies
pip install -r requirements.txt
4. Install required tools
Ensure the following tools are installed and available in your system PATH:
- nmap
- gobuster
- curl
- nikto
- testssl.sh
macOS (Homebrew)
brew install nmap gobuster curl
Nikto and testssl may require manual setup depending on your environment.
Linux (Debian/Ubuntu)
sudo apt update
sudo apt install -y nmap gobuster curl nikto
git clone --depth 1 https://github.com/drwetter/testssl.sh.git ~/testssl
chmod +x ~/testssl/testssl.sh
Windows
For Windows, the recommended setup is WSL (Windows Subsystem for Linux).
Install the tools inside WSL:
sudo apt update
sudo apt install -y nmap gobuster curl nikto
git clone --depth 1 https://github.com/drwetter/testssl.sh.git ~/testssl
chmod +x ~/testssl/testssl.sh
Running the full toolchain through WSL is more reliable than native Windows installations for this workflow.
5. Configure Claude Desktop (MCP)
macOS
Edit:
~/Library/Application Support/Claude/claude_desktop_config.json
Add:
{
"mcpServers": {
"pentest": {
"command": "/path/to/venv/bin/python",
"args": ["/path/to/server.py"]
}
}
}
Linux
Configure Claude Desktop to launch the server with your Python environment and project path:
{
"mcpServers": {
"pentest": {
"command": "/path/to/venv/bin/python",
"args": ["/path/to/server.py"]
}
}
}
Windows (WSL)
Edit the Claude Desktop config file and use WSL to launch the server:
{
"mcpServers": {
"pentest": {
"command": "wsl",
"args": ["python3", "/home/YOUR_WSL_USERNAME/ai-pentest-mcp/server.py"]
}
}
}
Replace YOUR_WSL_USERNAME with your actual WSL username.
Restart Claude Desktop after saving the configuration.
🧩 How It Works
Each tool is wrapped in a Python adapter that:
- Receives input arguments
- Executes the underlying CLI tool
- Captures output
- Returns results to the MCP server
The MCP server exposes these tools to the AI interface, enabling execution through natural-language commands.
🔐 Security Considerations
- Input validation is implemented to reduce command injection risk
- Tool execution is isolated through subprocess handling
- Only authorized targets should be scanned
⚠️ Disclaimer
This project is intended for educational and authorized security testing purposes only. Testing should only be performed on systems you own or have explicit permission to assess.
🧠 Project Background
Designed and implemented an AI-driven penetration testing automation system using the Model Context Protocol (MCP).
The system integrates multiple security tools through a custom orchestration layer, enabling natural-language execution of scans and automated analysis of results.
Built Python-based adapters, resolved tool integration challenges, and ensured reliable cross-platform execution of the workflow.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。