AI Pentest MCP Server
Allows monitoring GitHub for sensitive data exposure using gitgraber_scan and trufflehog_scan.
Provides tools to search and run Metasploit modules for exploitation.
Integrates with VirusTotal to fetch URLs and domain information via waymore_scan.
Enables WordPress vulnerability scanning using wpscan_scan.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI Pentest MCP ServerWhat services are running on 10.0.0.1?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
An MCP (Model Context Protocol) server that turns your Kali Linux machine into an AI-driven penetration testing powerhouse. Connect it to Open WebUI (or any MCP-compatible client) and control 40+ offensive security tools using natural language.
How it works: Your local LLM (running in Open WebUI) sends MCP tool calls to this server, which executes the actual security tools (Nmap, Metasploit, Nuclei, CrackMapExec, Impacket, etc.) on Kali and returns the results. The LLM then analyzes the output and decides the next steps — all through a chat interface.
📑 Table of Contents
Related MCP server: Arsenal MCP
🏗 Architecture
┌────────────────────────────┐ ┌──────────────────────────────────┐
│ Open WebUI │ │ Kali Linux (MCP Server) │
│ (or any MCP client) │ │ │
│ │ HTTP │ ┌──────────────────────────┐ │
│ ┌──────────────────────┐ │◄────────►│ │ Express.js + MCP SDK │ │
│ │ Local LLM (Ollama, │ │ :8080 │ │ Streamable HTTP │ │
│ │ LLaMA, Mistral,etc) │ │ /mcp │ └──────────┬───────────────┘ │
│ └──────────────────────┘ │ │ │ │
│ ▲ │ │ ▼ │
│ │ Analyzes tool │ │ ┌──────────────────────────┐ │
│ │ results & picks │ │ │ Nmap, Nuclei, SQLMap, │ │
│ │ next actions │ │ │ Metasploit, Impacket, │ │
│ └──────────────────│ │ │ CrackMapExec, Hydra, │ │
│ │ │ │ Evil-WinRM, LinPEAS... │ │
└────────────────────────────┘ │ └──────────────────────────┘ │
└──────────────────────────────────┘📋 Prerequisites
Requirement | Details |
Operating System | Kali Linux (VM, bare-metal, or WSL2) |
Node.js | v18.0.0 or higher |
npm | Included with Node.js |
Root Access | Required for most security tools |
Network | Kali must be reachable from your MCP client (NAT/Bridged network for VMware/VirtualBox) |
MCP Client | Open WebUI with MCP support (recommended), or any MCP-compatible client |
🚀 Quick Setup (Automated)
The included setup.sh script handles everything — installs all 40+ dependencies, configures the firewall, and creates a systemd service for auto-start.
Step 1 — Clone the Repository on Kali
git clone https://github.com/Parvesh776/MCP-for-kali.git
cd MCP-for-kaliStep 2 — Run the Setup Script
chmod +x setup.sh
sudo ./setup.shThe script will:
Install all system packages.
Verify/install Node.js 18+
Copy project files and install npm dependencies
Open port
8080in the firewallCreate a
pentest-mcpsystemd service for auto-start on boot
Step 3 — Start the Server
# Using systemd (recommended — persists across reboots)
sudo systemctl start pentest-mcp
# Or run manually
npm startStep 4 — Verify
curl http://<KALI-IP>:8080/healthExpected response:
{
"status": "ok",
"server": "ai-pentest-mcp",
"version": "3.0.0",
"transport": "streamable-http",
"endpoint": "/mcp"
}💡 Find your Kali IP: Run
ip aorhostname -Ion Kali.
🌐 Open WebUI Integration
Open Open WebUI in your browser
Go to ⚙️ Settings → Tools
Click Add Tool (or +)
Set the following:
Field | Value |
Type |
|
URL |
|
Click Save and start a new chat
⚠️ Important: Make sure the type is set to MCP (Streamable HTTP), not SSE or WebSocket.
🛠 Available Tools (40+)
🔍 Reconnaissance
Tool | Description | Key Parameters |
| Port scanning, service detection, OS fingerprinting |
|
| Ultra-fast port scanner for large networks/CIDR |
|
| Web technology fingerprinting |
|
| Domain WHOIS information |
|
| DNS record enumeration & brute-forcing |
|
| Passive subdomain discovery |
|
| Deep subdomain enumeration (passive/active) |
|
| Find related subdomains |
|
| Probe live HTTP servers (status, title, tech) |
|
| Fast probe for working HTTP/HTTPS servers |
|
| Identify Web Application Firewalls |
|
| Multi-purpose DNS toolkit |
|
| ProjectDiscovery Chaos subdomain enum |
|
| Python subdomain enumerator |
|
| Cross-platform subdomain enumerator |
|
| Fast subdomains enumeration |
|
| Recursive OSINT/recon framework |
|
| Powerful subdomain integration framework |
|
| Resolve subdomains with massdns |
|
| Fast domain resolver & bruteforcing |
|
| Subdomain permutations/alterations |
|
| Subdomain takeover checker |
|
| Subdomain takeover tool |
|
| Find IP ranges for an ASN |
|
| Map IPs/Domains to ASNs |
|
| CIDR operations utility |
|
| Extremely fast Go port scanner |
|
| Modern port scanner (3 seconds) |
|
| Nmap wrapper for faster recon |
|
| Scan multiple targets or CIDR ranges |
|
🌐 Web Application Testing
Tool | Description | Key Parameters |
| Web vulnerability scanner |
|
| Template-based vuln scanner (9000+ templates) |
|
| SQL injection detection & exploitation |
|
| WordPress vulnerability scanner |
|
| Directory & file brute-forcing |
|
| Fast web fuzzer |
|
| Web path discovery |
|
| Crawl websites to extract endpoints |
|
| Fetch known URLs from Wayback Machine |
|
| SSL/TLS vulnerability testing (Heartbleed, POODLE, etc.) |
|
| Find exposed secrets/keys in code/Git |
|
| Fast recursive content discovery |
|
| Web application fuzzer |
|
| Fetch URLs from Wayback/AlienVault/VirusTotal |
|
| Fetch JS files from URLs |
|
| Extract JS files from URLs |
|
| Find sensitive data in JS files |
|
| Hunt down API keys and secrets |
|
| Monitor GitHub for sensitive data |
|
| Interact with AWS/S3 |
|
| Bruteforce AWS S3 buckets |
|
| Scan open S3 buckets & dump contents |
|
🔓 Exploitation & Brute-Force
Tool | Description | Key Parameters |
| Login brute-force (SSH, FTP, HTTP, SMB) |
|
| SMB/NetBIOS enumeration |
|
| Run any Metasploit module |
|
| Search the Metasploit exploit database |
|
| Offline Exploit-DB search (CVEs, PoCs) |
|
| Look up CVEs and exploits for a service/version |
|
| Command injection exploitation |
|
| File upload vulnerability scanner |
|
| WordPress/Joomla/Drupal scanner |
|
| Open Redirect vulnerability scanner |
|
| LFI vulnerability identifier |
|
🏢 Active Directory & Windows
Tool | Description | Key Parameters |
| SMB/WinRM/LDAP/MSSQL attacks, pass-the-hash, spraying |
|
| Dump SAM/LSA/NTDS hashes from Windows |
|
| Get SYSTEM shell via PsExec |
|
| WinRM shell — run PowerShell remotely |
|
| Kerberos user enumeration & brute-force |
|
| Modern AD pentesting (replaces CME) |
|
| Map Active Directory attack paths |
|
🧗 Post-Exploitation
Tool | Description | Key Parameters |
| LinPEAS privilege escalation scanner |
|
| WinPEAS privilege escalation scanner |
|
| Set up reverse tunnel for pivoting |
|
🔑 Credential Management
Tool | Description | Key Parameters |
| Store credentials for reuse across tools |
|
| List all found credentials | — |
| Spray stored creds against targets |
|
📦 Loot & Session Management
Tool | Description | Key Parameters |
| Save interesting files/data found during pentest |
|
| List all collected loot | — |
| Save session to disk (resume later) |
|
| Load a previously saved session |
|
| View current session state | — |
| Set the primary target |
|
🤖 AI & Automation
Tool | Description | Key Parameters |
| Full automated pentest — recon → vuln scan → analysis |
|
| AI analyzes findings & recommends next steps |
|
| Generate comprehensive pentest report |
|
| Execute any shell command on Kali |
|
🔁 Auto-Chain Engine v2
The auto_chain tool runs a multi-phase automated penetration test with a single command:
auto_chain("192.168.1.100", depth=2)Flow
auto_chain(target, depth)
│
▼
┌──────────────────────────────────────┐
│ Phase 1: Reconnaissance │
│ └─ Nmap scan (ports, services, OS) │
└──────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────┐
│ Phase 2: Service Enumeration │
│ ├─ Web ports → WhatWeb + Gobuster │
│ ├─ SMB → Enum4Linux │
│ └─ FTP → Anonymous Login │
└──────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────┐
│ Phase 2.5: Vulnerability Scanning │ ← NEW
│ └─ Nuclei (CVEs, misconfigs, creds) │
└──────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────┐
│ Phase 3: AI Analysis │
│ ├─ Vulnerability identification │
│ ├─ Risk scoring │
│ ├─ Metasploit module suggestions │
│ └─ Next-step recommendations │
└──────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────┐
│ 📄 Report saved to /tmp/ │
└──────────────────────────────────────┘🔑 Credential Store
Credentials found during pentesting are automatically collected and stored in the session. Tools like impacket_secretsdump and crackmapexec_scan auto-capture creds.
"Dump hashes from 10.10.10.5" → secretsdump runs → hashes auto-saved to creds store
"Spray those creds on the subnet" → creds_spray uses stored hashes → finds valid loginsYou can also manually add creds with creds_add and list them with creds_list.
💾 Session Persistence
Save your entire pentest session (findings, credentials, ports, vulnerabilities) to disk and resume later:
"Save this session" → session_save → /tmp/pentest_session_*.json
"Load session from /tmp/..." → session_load → all data restored💬 Example Prompts
Prompt | Tools Triggered |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
📡 API Endpoints
Method | Endpoint | Description |
|
| Handle MCP JSON-RPC messages (tool calls, initialization) |
|
| SSE stream for server-to-client notifications |
|
| Terminate an MCP session |
|
| Health check — returns server status and version |
⚙️ Configuration
Environment Variable | Default | Description |
|
| Server listening port |
Systemd Service Management
# Start / Stop / Restart
sudo systemctl start pentest-mcp
sudo systemctl stop pentest-mcp
sudo systemctl restart pentest-mcp
# Check status & logs
sudo systemctl status pentest-mcp
sudo journalctl -u pentest-mcp -f🐛 Troubleshooting
Problem | Solution |
Can't reach server from host | Ensure VMware/VirtualBox network is Bridged or NAT. Run |
Connection refused on port 8080 |
|
Metasploit not found |
|
Nuclei not found |
|
CrackMapExec not found |
|
Server crashes | Check logs: |
Open WebUI won't connect | Ensure Type is MCP (Streamable HTTP) and URL is |
Tool timeout | Long scans (Nuclei, SQLMap) can take 5-10 min. Be patient or narrow scope. |
npm install fails | Delete |
⚖️ Legal Disclaimer
⚠️ AUTHORIZED USE ONLY
This tool is intended exclusively for:
✅ CTF (Capture The Flag) challenges and competitions
✅ Your own lab environments and home networks
✅ Authorized penetration tests with written permission
✅ Educational and research purposes
Do NOT use this tool against any systems you do not own or have explicit, written authorization to test. Unauthorized access to computer systems is illegal and punishable under laws including the Computer Fraud and Abuse Act (CFAA) and similar legislation worldwide.
The authors are not responsible for any misuse of this software.
📄 License
This project is licensed under the MIT License.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Parvesh776/pentest-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server