An MCP (Model Context Protocol) server that provides AI assistants access to Kali Linux security tools through Docker containers.
Note: Docker Desktop's MCP Toolkit only displays servers from the official Docker Hub MCP Catalog. To use this custom server, you'll need to configure it manually using the MCP Gateway or direct client configuration. See DOCKER_DESKTOP_SETUP.md for detailed instructions.
- Docker Desktop Native: Designed to work with Docker Desktop's MCP Toolkit
- Dynamic Tool Discovery: Automatically discovers and exposes Kali Linux tools
- 150+ Security Tools: Access to nmap, metasploit, burpsuite, and more
- Persistent Container: Kali container runs alongside the MCP server
- Auto-Installation: Installs kali-linux-everything on first run
- Tool Management: Install additional tools on-demand
- Docker Desktop with MCP Toolkit support
- Docker Compose (included with Docker Desktop)
- At least 20GB free disk space for Kali tools (kali-linux-everything package)
cd kali-mcp-docker-desktop
./setup.shThis script automatically:
- ✅ Builds the Kali MCP server
- ✅ Starts the Kali Linux container
- ✅ Creates a custom catalog in Docker Desktop
- ✅ Adds and enables the Kali server
- ✅ Verifies the installation
👉 For detailed installation instructions, see INSTALLATION_GUIDE.md
cd kali-mcp-docker-desktop
# Build the MCP server
docker-compose build
# Start the services
docker-compose up -d
# Add to Docker Desktop
docker mcp catalog create my-security-tools
docker mcp catalog add my-security-tools kali-linux-tools ./kali-catalog.yaml
docker mcp server enable kali-linux-toolsAfter running ./setup.sh, the Kali server is automatically added to Docker Desktop:
- Open Docker Desktop
- Go to MCP Toolkit in the sidebar
- Look for Kali Linux Security Tools under "my-security-tools" catalog
- The server should already be enabled
You can also verify from the command line:
docker mcp server ls
docker mcp catalog show my-security-toolsThe first time the MCP server starts, it will:
- Pull the Kali Linux Docker image
- Install
kali-linux-everythingpackage (~15GB - ALL Kali tools) - Discover available tools
This takes 1-2 hours depending on your internet connection and system performance. Check logs with:
docker-compose logs -f kali-mcp-serverOnce registered in Docker Desktop, AI assistants can use tools like:
Examples:
kali_nmap- Scan networks with nmapkali_nikto- Scan web servers for vulnerabilitieskali_sqlmap- Test for SQL injectionkali_exec- Execute any Kali commandkali_help- Get help for any toolkali_list_tools- List all available toolskali_install- Install additional tools
- kali_list_tools - List available tools with optional filter
- kali_help - Get man page or help text for any tool
- kali_exec - Execute any command in Kali container
- kali_install - Install additional packages via apt-get
The server discovers and exposes 150+ tools including:
Network Scanning:
- nmap, masscan, zmap, netdiscover, arp-scan
Web Security:
- nikto, burpsuite, zaproxy, wpscan, whatweb, sqlmap
Password Cracking:
- john, hashcat, hydra, medusa, ncrack
Exploitation:
- metasploit (msfconsole, msfvenom), beef-xss
Wireless:
- aircrack-ng
Reconnaissance:
- amass, subfinder, theharvester, recon-ng, dnsenum
Forensics:
- autopsy, volatility, binwalk, foremost
Reverse Engineering:
- radare2, ghidra, apktool, frida
And many more...
The default installation uses kali-linux-everything (~15GB) which includes ALL Kali tools.
To use a smaller installation, edit the command in src/index.ts (around line 95):
// Current Default: All Kali tools (~15GB) - INSTALLED BY DEFAULT
"apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y kali-linux-everything man-db"
// Option 1: Top 10 tools only (~2GB) - Faster installation
"apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y kali-tools-top10 man-db"
// Option 2: Default Kali toolset (~5GB) - Balanced option
"apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y kali-linux-default man-db"
// Option 3: Specific categories only
"apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y kali-tools-web kali-tools-passwords man-db"After editing, rebuild: docker-compose build && docker-compose up -d
kali-tools-information-gathering- Reconnaissance toolskali-tools-vulnerability- Vulnerability scannerskali-tools-web- Web application testingkali-tools-passwords- Password crackingkali-tools-wireless- Wireless securitykali-tools-exploitation- Exploitation frameworkskali-tools-forensics- Digital forensicskali-tools-reverse-engineering- Reverse engineering
AI: Use kali_nmap to scan 192.168.1.0/24 with args "-sV -p 1-1000"
AI: Use kali_nikto to scan http://testsite.local with args "-h http://testsite.local"
AI: Use kali_sqlmap with args "-u 'http://testsite.local/page.php?id=1' --batch"
AI: Use kali_exec with command "nmap -sV -sC 192.168.1.1 -oA scan_results"
AI: Use kali_help with tool "metasploit"
AI: Use kali_install with packages "metasploit-framework bloodhound"
- Discovery: Docker Desktop scans running containers for MCP labels
- Registration: Containers with
com.docker.desktop.mcp.server=trueare registered - Communication: AI assistants communicate via stdio with the MCP server
- Execution: MCP server executes commands in the Kali container via Docker socket
Docker Desktop MCP Toolkit
↓ (discovers via labels)
kali-mcp-server container
↓ (Docker socket: /var/run/docker.sock)
kali-tools-container (Kali Linux)
↓ (executes commands)
Security Tools (nmap, metasploit, etc.)
# MCP server logs
docker-compose logs -f kali-mcp-server
# Kali container logs
docker-compose logs -f kali-linux
# All logs
docker-compose logs -fdocker-compose restartdocker-compose downdocker-compose build --no-cache
docker-compose up -d
# Re-add to catalog with updates
docker mcp catalog add my-security-tools kali-linux-tools ./kali-catalog.yaml --force# Remove everything (containers, images, catalog entries)
./uninstall.sh# Connect to Kali container
docker exec -it kali-tools-container /bin/bash
# Install tools
apt-get update
apt-get install -y <package-name>The server caches discovered tools for 1 hour. To force rediscovery:
docker-compose restart kali-mcp-server- Check if MCP Toolkit is enabled in Docker Desktop settings
- Verify labels in
docker-compose.yaml - Ensure container is running:
docker ps | grep kali-mcp-server - Restart Docker Desktop
docker-compose down
docker-compose up -d
docker-compose logs kali-linuxFirst run requires tool installation:
# Check installation progress
docker-compose logs -f kali-mcp-server
# Or install manually
docker exec -it kali-tools-container bash
apt-get update && apt-get install -y kali-linux-everythingThe MCP server needs access to Docker socket:
# Verify socket is mounted
docker inspect kali-mcp-server | grep "/var/run/docker.sock"Kali tools require significant space:
- kali-linux-everything: ~15GB (DEFAULT - installed automatically)
- kali-linux-default: ~5GB
- kali-tools-top10: ~2GB (alternative option)
Ensure you have at least 20GB free before starting.
Check available space: docker system df
To reduce disk usage, switch to a smaller package (see Configuration section above).
- Legal Use Only: Only use these tools on systems you own or have explicit written permission to test
- Privileged Container: The MCP server runs with Docker socket access
- Network Access: Containers can access your network - use responsibly
- Dangerous Tools: These tools can cause damage, data loss, or legal issues if misused
- Audit Logging: Consider implementing audit logs for all commands
- Access Control: Only run in trusted environments with proper access controls
- Isolation: Consider running in an isolated network or VM
- No Production Use: Never run this on production systems
- First Run: 1-2 hours (image pull + kali-linux-everything installation)
- Subsequent Runs: <10 seconds to start
- Tool Discovery: 5-10 seconds (cached for 1 hour)
- Command Execution: Varies by tool (default 5 min timeout)
- Disk Usage: ~15GB for kali-linux-everything (default installation)
To add more tools or improve functionality:
- Edit
src/index.tsto add tool definitions - Rebuild:
docker-compose build - Test with Docker Desktop MCP Toolkit
MIT
This tool is provided for educational and authorized security testing purposes only. The authors and contributors are not responsible for any misuse, damage, or legal consequences arising from the use of this tool. Users must:
- Obtain proper authorization before conducting any security testing
- Comply with all applicable laws and regulations
- Use the tools responsibly and ethically
- Understand the risks and potential consequences
By using this tool, you acknowledge that you have read and understood these terms and agree to use it only for lawful purposes.