Kali-MCP is an AI-assisted ethical hacking framework that integrates a large language model (Claude) with a real Kali Linux execution environment using the Model Context Protocol (MCP).
Unlike prompt-only AI systems, this framework executes real commands inside Kali Linux and forces the AI to reason strictly based on actual command output.
This prevents hallucination and ensures evidence-based decision making.
Most AI security tools can only:
- Suggest commands
- Explain attack paths
- Assume expected results
Kali-MCP goes further:
- Executes real tools (Nmap, Metasploit, etc.)
- Returns raw stdout/stderr
- Enforces execution-grounded reasoning
- Prevents simulated outputs
Claude (AI Model) ↓ MCP Bridge (JSON-RPC stdio) ↓ Kali MCP Server (Flask API) ↓ Kali Linux Docker Container ↓ Real Security Tools
The MCP layer acts as a strict execution contract between the AI and the operating system.
- Real Kali Linux (kali-rolling)
- Docker-isolated execution
- Model Context Protocol (MCP) integration
- JSON-RPC tool interface
- Evidence-based AI reasoning
- Portable architecture
kali-mcp-project/
│
├── bridge/
│ └── kali_mcp_stdio.py
│
├── docker/
│ ├── Dockerfile
│ └── kali_mcp_server.py
│
├── requirements.txt
│
├── claude_config_example.json
│
└── README.md
You must install:
- Docker Desktop (with WSL2 enabled)
- Python 3.10+
- Claude Desktop (with MCP support enabled)
git clone https://github.com/Foolish-admin/Docker-Kali-MCP.git
cd Docker-Kali-MCP
pip install -r requirements.txt
docker build -t kali-mcp docker/
docker run -d -p 5000:5000 --name kali-mcp kali-mcp
Copy claude_config_example.json into your Claude config directory and adjust if needed.
Ensure the bridge path points to:
bridge/kali_mcp_stdio.py
Once running, the AI can call the MCP tool:
- Tool name:
kali_run - Input: shell command string
- Output: raw stdout, stderr, return code
Example:
nmap -sV 192.168.1.10
The output returned to the AI is always the real execution result.
- AI performs reconnaissance
- Enumerates services
- Identifies vulnerabilities
- Executes exploitation tools
- Adapts strategy based on real output
All reasoning is grounded in actual system responses.
This project is strictly for:
- Educational purposes
- Authorized lab environments
- Capture The Flag (CTF) platforms
- Controlled security research
Do NOT use against systems without explicit authorization.
The author is not responsible for misuse.
Sai Charan Nalagarla