home / mcp / kali mcp pentest server
An MCP server to allow your AI of choice to use recon tools in Kali Linux. For White Hat purposes.
Configuration
View docs{
"mcpServers": {
"andrew-stclair-kali-mcp-server": {
"url": "http://localhost:8080/mcp"
}
}
}Kali MCP Pentest Server provides a unified MCP interface to access a broad suite of penetration testing tools running in a Kali Linux environment. It exposes standardized MCP endpoints so you can orchestrate discovery, analysis, and reporting tasks from an automated assistant, IDE, or other automation platforms.
Connect your MCP client to the server using the primary MCP endpoint to request tool actions. Your client can sequence tool calls to perform discovery, web application analysis, content extraction, and intelligence gathering. Use the predefined workflow guidance to chain tools in an order that builds context and improves results. The server enforces input validation, timeouts, and a whitelist of tools to ensure safe execution.
To begin, establish a session with the MCP server at the configured endpoint, then target a host, domain, or URL with the appropriate tool names and parameters. Review tool outputs for IPs, ports, service versions, and identified assets to decide subsequent actions. For best results, follow the recommended sequencing: discovery, web analysis, content extraction, and intelligence gathering.
Prerequisites You need a system with Python 3.11+ or Docker available, plus basic networking capabilities. If you prefer containerized deployment, you can run the server with Docker Compose. If you want to run directly, you can use a Python virtual environment.
version: '3.9'
services:
kali-mcp:
image: kali-mcp-server:latest
ports:
- "8080:8080"
cap_add:
- NET_RAW
- NET_ADMIN
- NET_BIND_SERVICE
read_only: true
tmpfs:
- /tmp
- /var/tmpStart the server with Docker Compose, view logs to confirm it is running, then stop the services when finished.
# Start the server (recommended)
docker compose up -d
# View logs
docker compose logs -f
# Stop the server
docker compose downIf you prefer running directly, create and activate a Python virtual environment, install dependencies, and start the server with the main entry point.
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the server
python main.pyInput is sanitized to prevent command injection and dangerous characters are blocked. The server runs as a non-root user and uses a Python virtual environment for dependency isolation. It requires specific Linux capabilities for network operations and enforces tool whitelisting with timeouts and proper error handling.
The server is designed to be connected to MCP clients via a StreamableHTTP transport with endpoints for the MCP protocol, server-sent events, and health status. Use the designated MCP path to issue tool calls and receive streaming results suitable for large outputs.
Network port scanning and host discovery. Scans a hostname/IP range and reports open ports, service versions, and OS details.
ICMP connectivity test to assess reachability, latency, and overall availability for follow-up actions.
Trace the network path to a target to reveal routing hops and topology.
Layer 2 host discovery using ARP to reveal MAC addresses and vendor information on the local network.
TCP connectivity testing through firewalls to assess reachability and firewall behavior.
Stealthy TCP port scanning to detect open ports while minimizing visibility.
TCP-based traceroute to map network paths with firewall considerations.
Comprehensive DNS record enumeration including A/AAAA/MX/NS/TXT/SRV records.
High-speed subdomain enumeration to uncover additional attack surfaces.
Geolocation and ISP analysis for an IP address to map ownership and location.
Web server vulnerability scanning for misconfigurations and common weaknesses.
Automated SQL injection testing to identify vulnerable points and data exposure.
WordPress security assessment covering plugin/theme weaknesses and user enumeration.
Directory and file brute-forcing to discover hidden paths and sensitive resources.
Fast directory enumeration to reveal structure and backup files.
Virtual host discovery to identify hidden hosts on shared hosting.
Web technology fingerprinting to identify CMS, frameworks, and versions.
Intelligent web crawling and OSINT to collect URLs, emails, endpoints, and social links.
Comprehensive link extraction to gather all hyperlinks and forms for testing.
Extracted page content suitable for analysis, including forms and messages.
Exploit database search for available exploits, PoCs, and advisories.
Username reconnaissance across social platforms and digital footprints.