Provides direct access to Kali Linux command line and security tools like nmap, gobuster, sqlmap, nikto, and enum4linux for AI-driven penetration testing, CTF solving, and security research
Supports interactive MySQL sessions for database enumeration and testing during security assessments
Enables AI assistance for solving TryHackMe machines and challenges through automated security tool execution
K-MCP: Kali Model Context Protocol Server
K-MCP is a powerful API bridge that connects AI assistants (like Claude, GPT, etc.) to a Kali Linux terminal, enabling AI-driven penetration testing, CTF solving, and security research.
π Overview
K-MCP extends the capabilities of AI assistants by giving them direct access to the Kali Linux command line. This enables your AI partner to:
Execute security tools like
nmap,gobuster,sqlmap, etc.Interact with remote systems via SSH, Evil-WinRM, and similar tools
Solve CTF challenges in real-time
Help with machines from HackTheBox or TryHackMe
Automate repetitive security tasks
Assist during penetration tests
π Key Features
π§ AI Integration: Works with Claude Desktop, 5ire, and other MCP-enabled AI interfaces
π§ Tool Access: Execute any Kali Linux security tool through a secure API
π Interactive Shell Sessions: Maintains persistent interactive sessions for SSH, Evil-WinRM, etc.
π Automatic Tool Detection: Intelligently detects and handles interactive vs. non-interactive tools
π Security Focus: Purpose-built for penetration testers, CTF players, and security researchers
π Session Management: Track and manage multiple concurrent interactive sessions
π Network Tools Support: Full support for tools that require continuous network connection
π Requirements
Kali Linux or similar security-focused distribution
Python 3.7+ on both server and client
An MCP-compatible AI interface (Claude Desktop, 5ire, etc.)
Network connectivity between the AI client and Kali server
π οΈ Installation
1. On Your Kali Linux Machine
2: On Your Client Machine (Windows/Linux/Mac)
3. Configure Claude Desktop
Edit C:\Users\USERNAME\AppData\Roaming\Claude\claude_desktop_config.json:
4: Run the claude desktop
Example Conversations with Claude
1. Basic Network Reconnaissance
2. Web Application Testing
3. Windows Machine Enumeration
π» Usage Examples
Running Security Tools
K-MCP lets your AI execute any Kali Linux tool directly:
Working with Interactive Tools
Interactive tools are automatically detected and handled:
The system will:
Recognize these as interactive commands
Create a persistent session
Return a session ID for further interaction
Interactive Session Management
Once a session is created:
Using Evil-WinRM Helper
For convenience with Evil-WinRM:
π Security Considerations
This tool enables remote command execution on your system
Only use on secure networks or with proper network isolation
Consider implementing authentication for the API
Review all commands before allowing AI to execute them
Designed for educational and professional security testing - use responsibly
π€οΈ Advanced Use Cases
K-MCP enables AI to assist with many security tasks:
Network Discovery & Enumeration: Using nmap, enum4linux, and netcat
Web Application Testing: Using gobuster, sqlmap, nikto, etc.
Windows Domain Testing: Using impacket, CrackMapExec, and Evil-WinRM
Password Attacks: Using hydra, john, hashcat, etc.
Forensic Analysis: Using volatility, autopsy, and other tools
Exploit Development: For researching, modifying, and testing exploits
CTF Challenges: For real-time assistance in solving CTF tasks
π€ Contributing
Contributions are welcome! Feel free to:
Report bugs and suggest features
Submit pull requests
Improve documentation
Share usage examples
β οΈ Disclaimer
K-MCP is intended solely for educational and authorized testing purposes. Any misuse of the information or tools provided β including unauthorized access, exploitation, or malicious activity β is strictly prohibited. The authors assume no responsibility for misuse.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgements
Special thanks to the Kali Linux team for their amazing security distribution