Claude Kali Integration
STDIOClean, minimal implementation of Kali Linux MCP integration for Claude Desktop.
Clean, minimal implementation of Kali Linux MCP integration for Claude Desktop.
A clean, minimal implementation of Kali Linux MCP (Model Context Protocol) integration for Claude Desktop, providing secure access to Kali Linux tools through Claude's interface. This project enables seamless execution of security tools and commands within an isolated Docker container.
By default, the provided docker-compose.yml
and docker-compose.full.yml
files use host networking (network_mode: host
). This gives the containers full access to the host network, which is required for some advanced networking tools and scenarios.
Security Note:
bridge
network by removing the network_mode: host
lines and adding a ports:
mapping (e.g., 8081:8080
) to the relevant service(s). See the commented examples in the compose files and documentation below for details.git clone https://github.com/house-of-stark/Claude-Kali-MCP-Commander cd Claude-Kali-MCP-Commander
Note: sudo
is enabled inside the Kali container for tools like nmap
and others that require elevated privileges. If you want to restrict the use of sudo
, edit the blockedCommands
list in config.json
.
Note: If you see a script signing or execution policy error, run the script with ExecutionPolicy Bypass:
Minimal build (recommended):
powershell -ExecutionPolicy Bypass -File .\build.ps1 docker-compose up -d
Full Kali tools build:
powershell -ExecutionPolicy Bypass -File .\build.ps1 -Profile full docker-compose -f docker-compose.full.yml up -d
Minimal build (recommended):
./build.sh minimal docker-compose up -d
Full Kali tools build:
./build.sh full docker-compose -f docker-compose.full.yml up -d
Quick start script (Linux/macOS):
chmod +x start.sh ./start.sh
This builds and starts the containers, waits for readiness, and shows status.
Check health endpoint:
curl http://localhost:8080/health
Should return: {"status":"ok"}
View running containers:
docker ps --filter "name=kali-mcp-commander"
http://localhost:8080
Choose your build profile:
Minimal (Default): Small image with just the MCP server (recommended for most users)
./build.sh minimal docker-compose up -d
Full: Complete Kali Linux with all tools (very large image)
./build.sh full docker-compose -f docker-compose.full.yml up -d
The minimal build is much faster and smaller, while the full build includes all Kali Linux tools but requires significant disk space.
Verify the installation:
curl http://localhost:8081/health
Should return: {"status":"ok"}
Configure Claude Desktop:
http://localhost:8081
/path/to/Claude-Kali-MCP-Commander
).
├── .gitignore # Git ignore file
├── CONTRIBUTING.md # Contribution guidelines
├── Dockerfile # Kali Linux container setup with MCP server
├── LICENSE # MIT License
├── README.md # This file
├── config/ # Configuration files
│ └── claude_desktop_config.json # Claude Desktop configuration
├── docker-compose.yml # Service definitions and orchestration
├── health-server.js # Health check server implementation
├── package.json # Node.js dependencies
└── start.sh # Helper script to start services
After starting the services, you can test the MCP integration:
Basic Health Check: (If using bridging to Docker)
curl http://localhost:8081/health
Should return: {"status":"ok"}
Verify Container Status:
docker ps --filter "name=kali-mcp-commander-minimal"
Should show the container as "healthy"
View Container Logs:
docker logs kali-mcp-commander
Check for any error messages or warnings
To use this MCP server with Claude Desktop, you'll need to configure the following in your Claude Desktop settings:
Example single MCP Server claude_desktop_config.json
:
{ "mcpServers": { "kali-mcp": { "command": "docker", "args": [ "exec", "-i", "kali-mcp-commander-minimal", "npx", "@wonderwhy-er/desktop-commander" ], "name": "Kali Linux MCP", "description": "Access Kali Linux security tools via MCP" } }, "defaultMcpServerId": "kali-mcp" }
Example MCP Commander Desktop OS and Kali MCP Server claude_desktop_config.json
:
{ "mcpServers": { "kali-mcp": { "command": "docker", "args": [ "exec", "-i", "kali-mcp-commander-minimal", "npx", "@wonderwhy-er/desktop-commander" ], "name": "Kali Linux MCP", "description": "Access Kali Linux security tools via MCP" }, "desktop-commander": { "command": "npx", "args": [ "@wonderwhy-er/desktop-commander@latest" ], "name": "Host OS Commander", "description": "Access commands on the host OS where Claude Desktop is installed" } }, "defaultMcpServerId": "kali-mcp" }
You can customize the following environment variables in the docker-compose.yml
file:
MCP_SERVER_PORT
: Port for the MCP server (default: 8080)NODE_ENV
: Environment mode (development/production)LOG_LEVEL
: Logging verbosity (debug, info, warn, error)To change the default ports, modify the ports
section in docker-compose.yml
:
ports: - "8081:8080" # HostPort:ContainerPort
Port Conflicts
docker-compose.yml
Container Health Check Fails
docker logs kali-mcp-commander-minimal
MCP Server Not Responding
curl http://localhost:8081/health
For detailed debugging, you can modify the docker-compose.yml
to include additional logging:
environment: - NODE_ENV=development - DEBUG=*
docker-compose.yml
Contributions are welcome! Please read our Contributing Guidelines for details on how to contribute to this project.
When contributing, please:
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Chris Stark. Maintained by Chris Stark.
For support, please open an issue on GitHub.