Provides secure access to Kali Linux security tools for network scanning, web application testing, system enumeration, credential testing, and exploit research through a dockerized environment.
Enables WordPress security scanning and vulnerability assessment using WPScan tool for authorized penetration testing.
Kali Linux MCP Server (Dockerized)
A dockerized Model Context Protocol (MCP) server that provides secure access to Kali Linux security tools for defensive security and authorized penetration testing.
Features
Network Scanning
nmap_scan: Network discovery and port scanning
gobuster_dir: Directory and file enumeration
Web Application Testing
wpscan_scan: WordPress security scanning
sqlmap_test: SQL injection testing
dirb_scan: Web content discovery
System Enumeration
enum4linux_scan: SMB/NetBIOS enumeration
searchsploit_query: Exploit database search
Credential Testing
crackmapexec_smb: SMB credential testing
john_crack: Password cracking with John the Ripper
hashcat_crack: GPU-accelerated password cracking
Utilities
netcat_connect: Network connectivity testing
bloodhound_py: Active Directory enumeration
Security Features
Input Sanitization: All inputs are validated against strict patterns
Network Restrictions: Configurable allowed target networks
Non-root Execution: Runs with minimal privileges using Linux capabilities
Timeout Protection: Commands have configurable execution limits
Output Limiting: Response sizes are capped for safety
Docker Installation & Usage
Prerequisites
Docker and Docker Compose installed
Sufficient disk space for Kali Linux image
Quick Start
Container Usage
Container Management
Claude Desktop Integration (Automatic)
Configuration
Environment Variables
MCP_HOST
: Server host (default: 127.0.0.1)MCP_PORT
: Server port (default: 8000)MCP_MAX_EXEC_TIME
: Command timeout in seconds (default: 300)MCP_OUTPUT_LIMIT
: Maximum output size in bytes (default: 10000)MCP_ALLOWED_NETWORKS
: Comma-separated list of allowed target networksWPSCAN_API_TOKEN
: Optional WPScan API token for vulnerability data
Network Restrictions
For production use, configure MCP_ALLOWED_NETWORKS
to restrict scanning targets:
Usage Examples (Inside Container)
Automatic Server Startup
Testing Tools Directly (Optional)
MCP Tool Usage (via Claude Desktop)
Once connected to Claude Desktop, you can use tools like:
Claude Desktop Integration
Configuration Steps
Start the containerized MCP server (automatic):
# Server starts automatically docker compose up -d --build # Verify server is running curl http://localhost:8000/healthConfigure Claude Desktop:
Open Claude Desktop Settings
Go to Developer → MCP Servers
Add configuration (see
claude_desktop_config.md
)Server URL:
http://localhost:8000
Optional - Host network mode for advanced usage:
services: kali-mcp-server: network_mode: "host" # ... rest of config
Container Features
Automatic startup: MCP server starts when container boots
Data persistence:
./data
directory mounted from hostReal-time logs:
docker compose logs -f kali-mcp-server
Environment configuration: All variables in docker-compose.yml
Port mapping: localhost:8000 automatically mapped
Security Considerations
Authorized Use Only
This tool is designed for:
Authorized penetration testing
Security assessments
Educational purposes
Defensive security research
Network Security
Configure network restrictions in production
Use firewall rules to limit access
Monitor tool usage and logs
Implement proper authentication
User Permissions
Run as dedicated service user (not root)
Use Linux capabilities for network tools
Restrict file system access
Enable audit logging
Requirements
Host System
Docker and Docker Compose
4GB+ free disk space for Kali image
Network access for tool downloads
Container Environment
Kali Linux rolling base image
Python 3.8+ (included)
All Kali security tools (pre-installed)
Virtual environment with Python dependencies
Python Dependencies (Auto-installed in container)
fastmcp >= 0.4.0
pydantic >= 2.0.0
Built-in Python modules (asyncio, subprocess, etc.)
Development
Project Structure
Adding New Tools
Add tool function with
@mcp.tool()
decoratorImplement input sanitization
Use
run_tool()
helper for executionAdd proper error handling
Update documentation
License
MIT License - See LICENSE file for details
Disclaimer
This software is provided for educational and authorized testing purposes only. Users are responsible for complying with applicable laws and regulations. The authors are not responsible for misuse of this tool.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Provides secure access to Kali Linux security tools through a dockerized environment for authorized penetration testing and defensive security. Enables network scanning, web application testing, system enumeration, and credential testing with built-in input sanitization and network restrictions.