Exposes 20+ Kali Linux security tools for performing authorized penetration testing and security assessments, including network scanning, web application testing, password cracking, and exploit database searches.
Provides access to Metasploit's msfvenom payload generator for creating custom exploit payloads in various formats.
Enables packet capture and analysis using Wireshark's CLI tool (tshark) for network traffic inspection.
Integrates WPScan for performing security scans and vulnerability assessments on WordPress installations.
Kali MCP Server
A production-quality MCP (Model Context Protocol) server that exposes 20+ Kali Linux security tools through an AI-friendly interface, enabling AI assistants to perform penetration testing and security assessments in a controlled, structured manner.
⚠️ LEGAL NOTICE
This tool is intended for AUTHORIZED security testing only.
You MUST have explicit written permission to test any systems
Unauthorized access to computer systems is ILLEGAL
Users are responsible for ensuring proper authorization
The authors assume NO LIABILITY for misuse of this tool
By using this tool, you acknowledge that you have proper authorization and accept full responsibility for your actions.
Features
20+ Security Tools across multiple categories
Type-safe using TypeScript and Zod validation
Safe execution with command allowlists, timeouts, and output limits
Input validation to prevent command injection
Rate limiting to prevent abuse
Structured output with proper error handling
MCP-compliant for seamless AI integration
Supported Tools
Network Tools (6)
nmap - Network port scanning and service detection
nmap discover - Host discovery on networks
masscan - High-speed port scanner
netdiscover - ARP reconnaissance
tcpdump - Packet capture
tshark - Wireshark CLI for packet analysis
Web Security Tools (7)
gobuster dir - Directory/file enumeration
gobuster dns - Subdomain enumeration
sqlmap - SQL injection testing
nikto - Web server scanner
wpscan - WordPress security scanner
ffuf - Web fuzzer
nuclei - Template-based vulnerability scanner
Password Tools (3)
hydra - Network login brute-forcer
john - John the Ripper password cracker
hashcat - Advanced password recovery
Exploitation Tools (3)
searchsploit - Exploit database search
searchsploit examine - View exploit details
msfvenom - Metasploit payload generator
Installation
Prerequisites
Kali Linux (or any Linux distribution with security tools installed)
Node.js 18+ and npm
Security tools installed on your system
Install Security Tools (Kali Linux)
Install MCP Server
Usage
Running the Server
Testing with MCP Inspector
Integrating with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Tool Reference
Network Tools
kali_network_nmap_scan
Perform network port scanning using Nmap.
Example:
Parameters:
target(required): IP, hostname, or CIDR rangeports(optional): Port specification (default: top 1000)scan_type: tcp_syn, tcp_connect, udp, ack, null, fin, xmastiming: paranoid, sneaky, polite, normal, aggressive, insaneos_detection: Enable OS detection (requires root)service_version: Probe for service versionsscript_scan: NSE scripts to runaggressive: Enable aggressive scantimeout: Timeout in seconds (default: 300)
kali_network_nmap_discover
Discover live hosts on a network.
Example:
Web Tools
kali_web_gobuster_dir
Enumerate directories and files on web servers.
Example:
kali_web_sqlmap_test
Automated SQL injection testing.
Example:
WARNING: Only use on systems you have authorization to test.
Password Tools
kali_password_hydra_brute
Fast network login brute-forcer.
Example:
WARNING: Only use on systems you have authorization to test.
Exploitation Tools
kali_exploit_searchsploit_search
Search the Exploit Database.
Example:
Or search by CVE:
kali_exploit_msfvenom_generate
Generate custom payloads.
Example:
Security Features
Command Allowlist
Only pre-approved commands can be executed. The server maintains a strict allowlist of permitted security tools.
Input Validation
All inputs are validated before execution:
IP addresses and CIDR ranges
Hostnames and URLs
Port numbers and ranges
File paths (no directory traversal)
No shell metacharacters
Output Sanitization
Sensitive information is automatically redacted from output:
Passwords
API keys
Tokens
Secrets
Execution Limits
Timeouts: Configurable per tool (default: 5 minutes)
Output size: Maximum 10MB per command
Rate limiting: 10 commands per minute, 100 per hour
Process Isolation
All commands are executed in isolated child processes with:
Separate stdout/stderr capture
Graceful timeout handling
Resource cleanup
Configuration
Environment Variables
Customize tool paths using environment variables:
Wordlist Paths
Default wordlists (Kali Linux):
/usr/share/wordlists/rockyou.txt/usr/share/wordlists/dirb/common.txt/usr/share/seclists/Discovery/Web-Content/common.txt
Error Handling
The server provides detailed, actionable error messages:
Troubleshooting
Tools Not Found
If tools are not in your PATH:
Permission Errors
Some tools require root privileges:
nmap TCP SYN scan (-sS)
masscan
tcpdump/tshark
netdiscover
Solutions:
Use non-privileged alternatives (e.g., nmap TCP connect scan)
Grant specific capabilities:
sudo setcap cap_net_raw+ep /usr/bin/nmapRun server with sudo (not recommended for security reasons)
Timeout Issues
If scans are timing out:
Development
Project Structure
Adding New Tools
Define Zod schema in
src/schemas/[category].schemas.tsImplement tool handler in
src/tools/[category].tsRegister tool in
src/index.tsAdd to
ALLOWED_COMMANDSinsrc/constants.ts
Example:
Running Tests
Test with MCP Inspector:
Common Workflows
1. Network Reconnaissance
2. Web Application Testing
3. Password Assessment
4. Exploit Research
Performance Tips
Use appropriate timing: Balance speed vs stealth
Limit port ranges: Scan only necessary ports
Use wordlists wisely: Smaller wordlists for faster results
Adjust threads: More threads = faster, but more resource-intensive
Set realistic timeouts: Complex scans need more time
Contributing
Contributions are welcome! Please ensure:
All inputs are validated
Commands are in the allowlist
Error messages are actionable
Documentation is updated
Security best practices are followed
License
MIT License - See LICENSE file for details
Acknowledgments
Kali Linux team for the excellent security distribution
Anthropic for the Model Context Protocol
Security tool authors: nmap, gobuster, sqlmap, hydra, john, hashcat, and many more
Disclaimer
This tool is provided for educational and authorized security testing purposes only. The authors are not responsible for any misuse or damage caused by this tool. Always ensure you have proper authorization before testing any systems.
Version: 1.0.0 Last Updated: 2025-11-29