Kali MCP Server
Provides access to 20+ Kali Linux penetration testing tools including nmap, sqlmap, nikto, and hydra for authorized security testing and vulnerability assessment through a Docker-based MCP interface.
README
π Kali MCP Server
Model Context Protocol (MCP) server with comprehensive Kali Linux penetration testing tools.
β οΈ LEGAL DISCLAIMER
THIS TOOL IS FOR EDUCATIONAL PURPOSES ONLY!
β Only use on systems you own or have explicit written permission to test
β Comply with all applicable laws and regulations
β Understand that unauthorized access to computer systems is illegal
β Take full responsibility for your actions
Unauthorized access to computer systems is a crime. Use at your own risk!
π Features
This MCP server provides access to 20+ professional penetration testing tools:
π Network Scanning
- nmap - Network mapper and port scanner
- masscan - Ultra-fast port scanner
π·οΈ Web Vulnerability Scanners
- nikto - Web server vulnerability scanner
- wpscan - WordPress security scanner
- whatweb - Web technology identifier
- wafw00f - Web Application Firewall detector
π Directory/File Enumeration
- dirb - Directory brute forcer
- gobuster - Fast directory/DNS/vhost brute forcer
π Exploitation Tools
- sqlmap - SQL injection detection and exploitation
- searchsploit - Exploit database search
π DNS Enumeration
- dnsrecon - DNS enumeration and scanning
- dnsenum - DNS enumeration tool
π SSL/TLS Testing
- sslscan - SSL/TLS configuration tester
π Password Cracking
- hydra - Network login brute forcer
- john - John the Ripper password cracker
- hashcat - Advanced password recovery
π¦ Windows/SMB Enumeration
- enum4linux - Windows and Samba enumeration
π‘ Additional Tools
- Metasploit Framework
- Burp Suite
- Aircrack-ng suite
- And many more!
π¦ Installation
Prerequisites
- Docker and Docker Compose installed
- At least 4GB of free disk space
- Linux/macOS or Windows with WSL2
Quick Start
- Clone the repository:
git clone https://github.com/JesseEikeland/kali-mcp.git
cd kali-mcp
- Build the Docker container:
docker-compose build
β° This will take 10-15 minutes as it downloads and installs all tools.
- Start the server:
docker-compose up -d
- Access the container:
docker-compose exec kali-mcp bash
- Run the MCP server:
python3 server.py
π οΈ Usage
Available MCP Tools
π Network Scanning
# Basic nmap scan
nmap_scan(target="192.168.1.1", scan_type="basic")
# Full port scan
nmap_scan(target="example.com", scan_type="full")
# Vulnerability scan
nmap_scan(target="192.168.1.1", scan_type="vuln")
# Fast masscan
masscan_scan(target="192.168.1.0/24", ports="1-1000", rate=1000)
π·οΈ Web Scanning
# Nikto web scan
nikto_scan(target="http://example.com", ssl=False)
# WordPress scan
wpscan_scan(target="http://example.com", enumerate="vp,vt,u")
# Identify web technologies
whatweb_scan(target="http://example.com", aggression=1)
# Detect WAF
wafw00f_detect(target="http://example.com")
π Directory Brute Force
# Dirb scan
dirb_scan(target="http://example.com")
# Gobuster directory scan
gobuster_scan(target="http://example.com", mode="dir")
# Gobuster DNS enumeration
gobuster_scan(target="example.com", mode="dns")
π SQL Injection Testing
# Basic SQLMap scan
sqlmap_scan(target="http://example.com/page?id=1")
# With POST data
sqlmap_scan(target="http://example.com/login", data="username=admin&password=test")
# With cookies
sqlmap_scan(target="http://example.com/page", cookie="PHPSESSID=abc123")
π Exploit Search
# Search for exploits
searchsploit_search(query="wordpress")
# Exact match search
searchsploit_search(query="Apache 2.4.49", exact=True)
π DNS Enumeration
# DNS reconnaissance
dnsrecon_scan(domain="example.com", scan_type="std")
# DNS enumeration
dnsenum_scan(domain="example.com")
π SSL/TLS Testing
# Test SSL configuration
sslscan_test(target="example.com:443")
π Password Cracking
# Brute force SSH
hydra_bruteforce(
target="192.168.1.1",
service="ssh",
username="admin",
wordlist="/usr/share/wordlists/rockyou.txt"
)
π¦ SMB/Windows Enumeration
# Enumerate Windows/Samba
enum4linux_scan(target="192.168.1.1")
π§ Utility Functions
# List available wordlists
list_wordlists()
# Get legal disclaimer
get_disclaimer()
ποΈ Architecture
kali-mcp/
βββ Dockerfile # Kali Linux container with all tools
βββ docker-compose.yml # Container orchestration
βββ server.py # FastMCP server with tool wrappers
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ SETUP.md # Quick setup guide
βββ LICENSE # MIT License
βββ .gitignore # Git ignore rules
βββ scans/ # Scan results (created on first run)
βββ wordlists/ # Custom wordlists (optional)
How It Works
- Docker Container: Runs Kali Linux with all penetration testing tools installed
- MCP Server: Python FastMCP server wraps each tool with safe input sanitization
- Non-Root User: Runs as
pentesteruser with minimal required capabilities - Input Sanitization: All inputs are sanitized to prevent command injection
- Timeouts: Commands have configurable timeouts to prevent hanging
π Security Features
- β Runs as non-root user (
pentester) - β Input sanitization on all parameters
- β Command injection prevention
- β Timeout limits on all operations
- β No new privileges security option
- β Resource limits (CPU/Memory)
- β Minimal required capabilities (NET_RAW, NET_ADMIN)
π Learning Resources
Recommended Platforms
- HackTheBox - Hands-on pentesting labs
- TryHackMe - Guided learning paths
- PentesterLab - Web pentesting exercises
- VulnHub - Vulnerable VMs for practice
Books
- "The Web Application Hacker's Handbook" by Dafydd Stuttard
- "Penetration Testing" by Georgia Weidman
- "The Hacker Playbook 3" by Peter Kim
YouTube Channels
- NetworkChuck
- IppSec
- John Hammond
- The Cyber Mentor
π Troubleshooting
Container won't start
# Check logs
docker-compose logs kali-mcp
# Rebuild container
docker-compose down
docker-compose build --no-cache
docker-compose up -d
Permission errors
# Fix scan directory permissions
sudo chown -R $USER:$USER ./scans
Tools not found
# Update package lists
docker-compose exec kali-mcp apt-get update
# Install missing tool
docker-compose exec kali-mcp apt-get install -y <tool-name>
π Configuration
Environment Variables
Edit docker-compose.yml to customize:
environment:
- MAX_TIMEOUT=300 # Maximum command timeout (seconds)
- SCAN_RESULTS_DIR=/home/pentester/scans
Custom Wordlists
Place your wordlists in the ./wordlists directory:
mkdir -p wordlists
cp /path/to/custom.txt wordlists/
π€ Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
π License
MIT License - See LICENSE file for details
Important: This license applies to the code only. You are solely responsible for how you use this software.
βοΈ Legal Notice
READ THIS CAREFULLY:
This tool is provided for educational and authorized testing purposes only.
By using this software, you agree that:
- You will only use it on systems you own or have explicit written authorization to test
- You understand that unauthorized computer access is illegal
- You take full responsibility for your actions
- The authors and contributors are not liable for any misuse or damage
Always get written permission before testing!
π Acknowledgments
- Kali Linux Team - For the amazing pentesting distribution
- FastMCP - For the MCP server framework
- Tool Authors - For creating these incredible security tools
- NetworkChuck - For inspiring this project
π Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
πΊοΈ Roadmap
- [ ] Add Metasploit integration
- [ ] Web UI for easier interaction
- [ ] Report generation (PDF/HTML)
- [ ] Automated vulnerability chains
- [ ] Integration with CVE databases
- [ ] Custom scan profiles
- [ ] Scheduled scanning
- [ ] Multi-target support
Remember: With great power comes great responsibility. Use wisely! π¦Έ
Made with β€οΈ for the security community
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases