A comprehensive Model Context Protocol (MCP) server that exposes popular Kali Linux security tools as MCP tools. This server allows AI assistants and other MCP clients to execute security reconnaissance and testing tools in a controlled manner.
This MCP server provides access to 40+ security tools across multiple categories:
- whois - WHOIS domain/IP lookups
- dig - DNS record queries
- dnsenum - DNS enumeration
- dnsrecon - DNS reconnaissance
- nmap - Network port scanning
- masscan - High-speed port scanning
- unicornscan - Asynchronous network scanning
- zmap - Internet-wide network scanning
- ike-scan - IKE/IPSec VPN scanning
- whatweb - Web application fingerprinting
- wafw00f - Web Application Firewall detection
- dirb - Web content directory scanning
- gobuster - Directory/DNS/VHost fuzzing
- feroxbuster - Fast recursive content discovery
- nikto - Web vulnerability scanning
- wfuzz - Web application fuzzing
- arachni - Web application security scanning
- enum4linux - Windows/Samba enumeration
- enum4linux-ng - Next-gen Windows/Samba enumeration
- smbmap - SMB share enumeration
- rpcclient - MS-RPC enumeration
- snmpwalk - SNMP enumeration
- ldapsearch - LDAP directory searches
- airmon-ng - Monitor mode management
- airodump-ng - 802.11 packet capture
- wash - WPS-enabled AP scanner
- kismet - Wireless network detection
- bettercap - Network reconnaissance framework
- netcat - Network connections utility
- curl - HTTP client
- wget - Network downloader
- sslscan - SSL/TLS security scanner
- sslyze - SSL/TLS configuration analyzer
- theharvester - Email/subdomain gathering
- sublist3r - Subdomain enumeration
- amass - Attack surface mapping
- maltego - Link analysis and data mining
- shodan - Internet-connected device search
- recon-ng - Reconnaissance framework
- metagoofil - Metadata extraction
- Kali Linux (recommended) or any Linux distribution with security tools installed
- Rust 1.70+ for building the server
- Root privileges for some tools (wireless, certain network scans)
Most tools come pre-installed on Kali Linux. For other distributions:
# Debian/Ubuntu
sudo apt update
sudo apt install nmap masscan nikto dirb gobuster whatweb wafw00f \
enum4linux smbclient rpcclient snmp ldap-utils \
aircrack-ng kismet netcat curl wget sslscan \
theharvester sublist3r amass recon-ng metagoofil
# Install additional tools
sudo apt install unicornscan zmap feroxbuster wfuzz arachni \
enum4linux-ng sslyze bettercap wash-
Clone the repository:
git clone <repository-url> cd kali-mcp-server
-
Build the server:
cargo build --release
-
Install (optional):
sudo cp target/release/kali-mcp-server /usr/local/bin/
cargo install --path .The server uses stdio transport for MCP communication:
# Run directly
./target/release/kali-mcp-server --stdio
# Or if installed globally
kali-mcp-server --stdioConfigure your MCP client to connect to this server. Example configuration:
{
"mcpServers": {
"kali-tools": {
"command": "/usr/local/bin/kali-mcp-server",
"args": ["--stdio"]
}
}
}{
"name": "nmap",
"arguments": {
"target": "192.168.1.1",
"ports": "22,80,443",
"scan_type": "-sS",
"service_detection": true,
"timing": "T3"
}
}{
"name": "dnsenum",
"arguments": {
"domain": "example.com",
"threads": 5,
"timeout": 10
}
}{
"name": "gobuster",
"arguments": {
"url": "https://example.com",
"wordlist": "/usr/share/wordlists/dirb/common.txt",
"extensions": "php,html,txt",
"threads": 20
}
}{
"name": "theharvester",
"arguments": {
"domain": "example.com",
"data_source": "google",
"limit": 500
}
}{
"name": "sslscan",
"arguments": {
"target": "example.com:443",
"show_certificate": true
}
}RUST_LOG- Set logging level (debug, info, warn, error)MCP_TIMEOUT- Default command timeout in seconds
Some tools require additional setup:
# Set your Shodan API key
shodan init YOUR_API_KEY# Enable monitor mode
sudo airmon-ng start wlan0# Configure data sources in ~/.config/amass/config.iniIMPORTANT SECURITY WARNINGS:
- Privileged Access: Some tools require root privileges
- Command Execution: This server executes system commands
- Network Impact: Scanning tools can generate significant network traffic
- Legal Compliance: Ensure you have permission to scan target systems
- Rate Limiting: Some tools may trigger rate limiting or blocking
- Run in isolated/controlled environments
- Implement proper access controls
- Monitor and log all activities
- Respect rate limits and target policies
- Only scan systems you own or have permission to test
The server includes comprehensive error handling:
- Tool Not Found: Validates tool availability
- Invalid Arguments: Checks required parameters
- Execution Timeouts: Prevents hanging processes
- Permission Errors: Handles privilege issues
- Network Errors: Manages connection failures
-
Tool Not Found
# Check if tool is installed which nmap # Install missing tools sudo apt install nmap
-
Permission Denied
# Some tools need root privileges sudo kali-mcp-server --stdio -
Timeout Errors
# Increase timeout in tool arguments # Or set environment variable export MCP_TIMEOUT=300
-
Wireless Interface Issues
# Check wireless interfaces iwconfig # Enable monitor mode sudo airmon-ng start wlan0
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
To add a new security tool:
- Create tool definition in appropriate module
- Implement execution function
- Register tool in
ToolRegistry - Add tests
- Update documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Kali Linux team for the comprehensive security toolkit
- MCP Protocol developers for the standardized interface
- Security community for developing these essential tools
For issues and questions:
- Check the troubleshooting section
- Search existing GitHub issues
- Create a new issue with detailed information
- Include system information and error logs
- v0.1.0 - Initial release with 40+ security tools
- Network reconnaissance tools
- Web application testing tools
- Enumeration utilities
- Wireless security tools
- SSL/TLS analysis tools
- OSINT capabilities