Kali MCP Server
AI-powered penetration testing through 36 MCP tools on a containerized Kali Linux, enabling automated reconnaissance, web testing, exploitation, and evidence collection.
README
<div align="center">
<img src="https://img.shields.io/badge/Kali%20MCP-Security%20Testing%20Platform-critical?style=for-the-badge&logo=kalilinux&logoColor=white" alt="Kali MCP" />
Kali MCP Server
AI-powered penetration testing through 36 MCP tools on a containerized Kali Linux
Reconnaissance · Web Testing · Exploitation · Session Management · Evidence Collection
Quick Start · Tools · Architecture · Contributing
</div>
Why Kali MCP?
Most security tools require manual operation, context switching, and output parsing. Kali MCP gives AI assistants direct access to 36 security tools inside a Docker-containerized Kali Linux. Communicate via SSE or stdio, and let Claude run nmap scans, enumerate subdomains, crack hashes, generate payloads, and produce structured reports through natural language.
| What you get | Details |
|---|---|
| 36 MCP tools | Network scanning, web testing, credential attacks, exploitation, encoding, evidence collection |
| 50+ underlying binaries | nmap, sqlmap, hydra, metasploit, nuclei, ffuf, amass, subfinder, hashcat, and more |
| Session management | Create, switch, and track pentest sessions with full command history |
| Evidence pipeline | Save outputs, generate reports (Markdown/JSON/text), structured output parsing |
| Credential store | Per-session credential tracking for discovered creds |
| Payload generation | Msfvenom payloads + reverse shell one-liners in 8 languages |
| Auto recon | Multi-stage reconnaissance pipeline with configurable depth |
| Docker isolation | All tools run inside a container with no host filesystem access |
Quick Start
1. Clone and build
git clone https://github.com/sudohakan/kali-mcp-server.git
cd kali-mcp-server
docker compose up --build -d
2. Configure your MCP client
<details open> <summary><strong>Claude Code (SSE)</strong></summary>
Add to .claude.json:
{
"mcpServers": {
"kali-mcp": {
"type": "sse",
"url": "http://localhost:8000/sse"
}
}
}
</details>
<details> <summary><strong>Claude Code (stdio)</strong></summary>
claude mcp add kali-mcp -- docker exec -i kali-mcp-server python -m kali_mcp_server.server --transport stdio
</details>
3. Use it
Ask Claude: "Scan 192.168.1.0/24 for open ports" or "Run a deep recon on example.com"
Tools
Reconnaissance and Scanning (6 tools)
| Tool | Description |
|---|---|
port_scan |
Smart nmap wrapper with presets (quick, full, stealth, udp, service, aggressive) |
dns_enum |
Comprehensive DNS enumeration with zone transfer attempts |
network_discovery |
Multi-stage network reconnaissance (quick, comprehensive, stealth) |
subdomain_enum |
Subdomain enumeration via subfinder, amass |
recon_auto |
Automated multi-stage pipeline (DNS, ports, headers, SSL, exploits) |
enum_shares |
SMB/NFS share enumeration (smbclient, enum4linux, showmount) |
Web Application Testing (7 tools)
| Tool | Description |
|---|---|
vulnerability_scan |
Automated vulnerability assessment (quick, comprehensive, web, network) |
web_enumeration |
Application discovery and directory enumeration |
web_audit |
Comprehensive web application security audit |
spider_website |
Web crawling with configurable depth and threads |
form_analysis |
Discover and analyze web forms for vulnerabilities |
header_analysis |
HTTP header security assessment |
ssl_analysis |
SSL/TLS configuration analysis via testssl.sh |
Credential and Brute-Force (2 tools)
| Tool | Description |
|---|---|
hydra_attack |
Brute-force testing (SSH, FTP, HTTP, SMB, MySQL, RDP, and more) |
credential_store |
Store, retrieve, and search discovered credentials per session |
Exploitation (3 tools)
| Tool | Description |
|---|---|
payload_generate |
Msfvenom payloads (reverse shell, bind shell, meterpreter) for 5 platforms |
reverse_shell |
One-liner generators (bash, python, php, perl, nc, ruby, java, powershell) |
exploit_search |
Searchsploit-powered exploit database search |
Encoding and Analysis (4 tools)
| Tool | Description |
|---|---|
encode_decode |
Multi-format encoding/decoding (base64, URL, hex, HTML, ROT13) |
hash_identify |
Hash type identification (MD5, SHA, bcrypt, NTLM, and more) |
file_analysis |
File type detection, strings extraction, hash computation |
fetch |
Fetch website content for analysis |
Output Parsing and Evidence (5 tools)
| Tool | Description |
|---|---|
parse_nmap |
Parse nmap output (text/XML) into structured JSON |
parse_tool_output |
Parse nikto, gobuster, dirb, hydra, sqlmap output |
save_output |
Timestamped evidence storage with categories |
create_report |
Generate structured reports (Markdown, JSON, text) |
download_file |
Download files with local storage |
Session Management (7 tools)
| Tool | Description |
|---|---|
session_create |
Create new pentest session with name, description, target |
session_list |
List all sessions with metadata |
session_switch |
Switch between active sessions |
session_status |
Current session status and summary |
session_delete |
Delete session and all associated evidence |
session_history |
Command and evidence history for active session |
session_results |
Read recent output files for active session |
System (2 tools)
| Tool | Description |
|---|---|
run |
Execute any shell command on the Kali Linux container |
resources |
List available system resources and command examples |
Architecture
Docker Container (Kali Linux)
┌─────────────────────────────────┐
┌──────────────┐ SSE/stdio │ MCP Server (Python) │
│ Claude Code ├────────────►│ ├── Tool Router (server.py) │
│ or any MCP │ port 8000 │ ├── 36 Tool Handlers (tools.py)│
│ client │◄────────────┤ └── Session Manager │
└──────────────┘ │ │
│ Underlying Binaries │
│ nmap, sqlmap, hydra, nikto │
│ metasploit, amass, subfinder │
│ nuclei, ffuf, feroxbuster │
│ hashcat, john, gobuster │
│ testssl.sh, gospider, masscan │
│ crackmapexec, impacket, ... │
└─────────────────────────────────┘
Transport options:
- SSE (default): HTTP server on port 8000, ideal for Claude Desktop and persistent connections
- stdio: Standard I/O, ideal for Claude Code CLI integration
Session data is persisted via Docker volume mount (./sessions:/app/sessions).
Project Structure
kali-mcp-server/
├── kali_mcp_server/
│ ├── server.py # MCP server, tool registration, transport config
│ ├── tools.py # 36 tool implementations
│ └── utils.py # Shared utilities
├── tests/
│ ├── test_server.py # Server integration tests
│ └── test_tools.py # Tool unit tests
├── Dockerfile # 5-layer Kali Linux image (apt, Go, pip, exploits, app)
├── docker-compose.yml # Production compose with volume mounts
├── pyproject.toml # Python project config (hatch build)
└── requirements.txt # Python dependencies
Docker Image Layers
The Dockerfile builds in 5 stages for optimal caching:
| Layer | Contents |
|---|---|
| 1. System + apt tools | nmap, sqlmap, hydra, nikto, metasploit, amass, subfinder, nuclei, ffuf, hashcat, john, crackmapexec, impacket, aircrack-ng, bettercap, tcpdump, tshark, seclists |
| 2. Go tools | katana, gau, grpcurl, dalfox, waybackurls, kerbrute, chisel |
| 3. Python tools | impacket, certipy-ad, frida-tools, arjun, paramspider, wfuzz, commix, bloodhound |
| 4. Exploit toolkits | PayloadsAllTheThings, SSTImap, jwt_tool, XSStrike, GraphQLmap, smuggler, NoSQLMap, linpeas, pspy |
| 5. Application | Virtual environment, MCP server, dev tooling |
Contributing
See CONTRIBUTING.md for Docker build workflow, how to add new tools, and the PR process.
License
MIT : Copyright 2026 Hakan Topcu
Disclaimer: This tool is intended for authorized security testing only. Always obtain proper written authorization before testing systems you do not own or operate.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。