Kali Linux MCP
Two-component system bridging Kali Linux penetration testing tools with AI agents via MCP. Flask API server executes 10+ security tools (Nmap, SQLMap, Metasploit, etc.) while MCP client provides seamless AI integration for automated security workflow
What is Kali Linux MCP?
Kali Linux MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to two-component system bridging kali linux penetration testing tools with ai agents via mcp. flask api server executes 10+ security tools (nmap, sqlmap, metasploit, etc.) while mcp client provides seaml...
Two-component system bridging Kali Linux penetration testing tools with AI agents via MCP. Flask API server executes 10+ security tools (Nmap, SQLMap, Metasploit, etc.) while MCP client provides seamless AI integration for automated security workflow
This server falls under the Security category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Two-component system bridging Kali Linux penetration testing
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx kali-linux-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Kali Linux MCP
Kali Linux MCP is a two-component system that bridges Kali Linux penetration testing tools with AI assistants via the Model Context Protocol. A Flask API server running on port 5000 executes over 10 security tools including Nmap, SQLMap, Gobuster, Nikto, Metasploit, WPScan, Hydra, and John the Ripper, while an MCP client translates AI requests into tool executions—enabling automated, AI-assisted security workflows for authorized labs, CTFs, and HackTheBox or TryHackMe machines.
Prerequisites
- Kali Linux or a Linux system with penetration testing tools installed in PATH
- Python 3 with pip available
- nmap, sqlmap, gobuster, nikto, metasploit, wpscan, hydra, and john installed
- Authorization to test all target systems (never use on unauthorized targets)
- Claude Desktop or another MCP-compatible AI client
Install Python dependencies
Install the required Python packages for both the Flask API server and the MCP client.
pip install flask requests mcpClone the repository
Clone the Kali Linux MCP repository from GitHub.
git clone https://github.com/i3T4AN/Kali_Linux_MCP.git
cd Kali_Linux_MCPStart the Flask API server
Launch the Flask API server that wraps the security tools. This server listens on port 5000 by default and exposes REST endpoints for each tool.
python3 Kali_Linux_Server.py --port 5000Start the MCP server
In a separate terminal, start the MCP server that connects to the Flask API and exposes the security tools to AI clients. Adjust the timeout for long-running scans.
python3 MCP_Server.py --server http://localhost:5000 --timeout 300Configure Claude Desktop
Add the Kali Linux MCP server to your Claude Desktop configuration. The MCP server acts as the bridge between Claude and the Flask security tool API.
{
"mcpServers": {
"kali-linux-mcp": {
"command": "python3",
"args": ["MCP_Server.py", "--server", "http://localhost:5000", "--timeout", "300"],
"cwd": "/path/to/Kali_Linux_MCP"
}
}
}Kali Linux MCP Examples
Client configuration
Claude Desktop configuration for the Kali Linux MCP server, referencing the MCP_Server.py script.
{
"mcpServers": {
"kali-linux-mcp": {
"command": "python3",
"args": ["MCP_Server.py", "--server", "http://localhost:5000", "--timeout", "300"],
"cwd": "/path/to/Kali_Linux_MCP"
}
}
}Prompts to try
Use these prompts in Claude for authorized penetration testing workflows.
- "Run an Nmap service version scan on scanme.nmap.org and summarize open ports"
- "Use Gobuster to enumerate directories on http://testphp.vulnweb.com"
- "Run Nikto against my lab web server at 192.168.1.100 and report vulnerabilities"
- "Test for SQL injection on my test application at http://localhost/dvwa using SQLMap"Troubleshooting Kali Linux MCP
Flask server fails to execute a tool with 'command not found'
Ensure the security tool is installed on your system and available in PATH. On Kali Linux, most tools are pre-installed. On other distros, install them with 'apt install nmap sqlmap gobuster nikto' etc. Test with 'which nmap' to confirm.
MCP server times out on long-running scans
Increase the --timeout value when starting MCP_Server.py. For comprehensive Nmap scans or brute-force attacks with Hydra, set --timeout to 600 or higher. Metasploit exploits may require even longer timeouts.
Flask API returns connection refused errors
Ensure Kali_Linux_Server.py is running in a separate terminal before starting MCP_Server.py. Verify the port with 'netstat -tlnp | grep 5000'. If the port is in use, change it with --port on both the server and the MCP client's --server URL.
Frequently Asked Questions about Kali Linux MCP
What is Kali Linux MCP?
Kali Linux MCP is a Model Context Protocol (MCP) server that two-component system bridging kali linux penetration testing tools with ai agents via mcp. flask api server executes 10+ security tools (nmap, sqlmap, metasploit, etc.) while mcp client provides seamless ai integration for automated security workflow It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Kali Linux MCP?
Follow the installation instructions on the Kali Linux MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Kali Linux MCP?
Kali Linux MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Kali Linux MCP free to use?
Yes, Kali Linux MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Kali Linux MCP Alternatives — Similar Security Servers
Looking for alternatives to Kali Linux MCP? Here are other popular security servers you can use with Claude, Cursor, and VS Code.
Casdoor
★ 13.6kAn open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
ghidraMCP
★ 9.0kAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through
HexStrike AI
★ 8.9kHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b
IDA Pro MCP
★ 8.7kEnables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.
Anthropic Cybersecurity Skills
★ 6.6k754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform
Hooker
★ 5.1k🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u
Browse More Security MCP Servers
Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Kali Linux MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Kali Linux MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.