File size: 3,854 Bytes
33b7766 37f9172 33b7766 37f9172 33b7766 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | ---
title: Kali Linux MCP Server
emoji: 🔒
colorFrom: red
colorTo: gray
sdk: docker
sdk_version: latest
app_port: 5000
---
# Kali Linux MCP Server
A Hugging Face Spaces deployment that hosts a Kali Linux environment with Model Context Protocol (MCP) support, allowing AI assistants like Cline to execute penetration testing tools remotely.
## Features
- **Kali Linux Environment**: Full Kali Linux with 20+ penetration testing tools
- **MCP Integration**: OpenAI-compatible API for AI assistants
- **Docker Deployment**: Ready for Hugging Face Spaces
- **Remote Tool Execution**: Execute nmap, sqlmap, metasploit, and more
## Included Tools
### Network Scanning & Enumeration
- **nmap** - Network discovery and security auditing
- **masscan** - Fast internet-scale port scanner
### Web Application Testing
- **gobuster** - Directory/file/DNS busting tool
- **dirb** - Web content scanner
- **nikto** - Web server scanner
- **sqlmap** - SQL injection exploitation tool
### Password Cracking
- **hydra** - Network logon cracker
- **john** - John the Ripper password cracker
- **hashcat** - Advanced password recovery
### Wireless Security
- **aircrack-ng** - Wireless network cracking suite
### Forensics & Analysis
- **binwalk** - Firmware analysis tool
- **radare2** - Reverse engineering framework
- **wireshark** - Network protocol analyzer
### Exploit Frameworks
- **metasploit-framework** - Penetration testing framework
### CMS Scanners
- **wpscan** - WordPress vulnerability scanner
### OSINT & Social Engineering
- **sherlock** - Username enumeration across social networks
### Web Exploitation
- **commix** - Command injection exploitation tool
### Miscellaneous
- **exploitdb** - Exploit database
- **steghide** - Steganography tool
- **cewl** - Custom wordlist generator
- **crunch** - Wordlist generator
## API Endpoints
### Health Check
```bash
GET /health
```
### Execute Command
```bash
POST /api/command
Content-Type: application/json
{
"command": "nmap -sV 127.0.0.1"
}
```
### MCP Capabilities
```bash
GET /mcp/capabilities
```
## Usage with Cline
### Local Development
```bash
# Run the MCP server locally
python3 mcp_server.py
```
### Production Deployment
1. **Deploy to Hugging Face Spaces**
2. **Get your Space URL**: `https://your-username-kali-mcp.hf.space`
3. **Configure Cline MCP settings**:
```json
{
"mcpServers": {
"kali-tools": {
"command": "python3",
"args": ["/path/to/mcp_server.py"],
"env": {
"KALI_API_URL": "https://your-username-kali-mcp.hf.space"
}
}
}
}
```
### Available Tools
- **execute_command**: Execute any shell command on Kali Linux
- **server_health**: Check server status and tool availability
The server exposes MCP-compatible endpoints that allow AI assistants to discover and execute Kali Linux tools.
## Technical Details
- **Base Image**: `kalilinux/kali-rolling`
- **Web Framework**: Flask
- **Protocol**: Model Context Protocol (MCP)
- **Timeout**: 180 seconds per command
- **Health Checks**: Automated monitoring
## Deployment
1. Create a new Hugging Face Space
2. Set SDK to "Docker"
3. Upload the Kali-MCP directory files
4. The Space will automatically build and deploy
## Security Notice
⚠️ **This tool is intended for educational and ethical testing purposes only.**
- Use only on systems you own or have explicit permission to test
- All activities are logged and monitored
- Unauthorized use may violate laws and platform terms
## Cost Considerations
- **Free Tier**: Basic functionality, limited resources
- **Paid Tiers**: Higher CPU/memory limits, persistent storage
- **GPU**: Not required for these tools
## Limitations
- Command execution timeout: 3 minutes
- No interactive sessions (use non-interactive flags)
- Memory limits based on Spaces tier
- No persistent file storage across sessions |