MCP-Kali-Server
Allows executing arbitrary commands and running a wide variety of Kali Linux security tools (e.g., nmap, masscan, gobuster, sqlmap, hydra, john, wpscan, enum4linux) on a Kali VM through the MCP server.
Provides a dedicated tool for running Metasploit modules and exploits on the target Kali system.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP-Kali-Server
将 Kali Linux VM 的能力通过 MCP 暴露给 Claude Code 的 API 桥。包含 Kali 侧命令执行服务端(server.py)和 MCP 网关客户端(client.py),配合 execute_command 可执行 Kali 上任意工具。
架构
Claude Code
│ stdio (client.py)
▼
client.py ──HTTP──► server.py (Kali VM, 127.0.0.1:5000)
│ subprocess
▼
Kali 工具 (nmap/masscan/impacket...)server.py:跑在 Kali VM,Flask HTTP API,执行命令并返回结构化结果client.py:MCP 网关,把工具调用转发到 Kali server
Related MCP server: MCP-Kali-Server
工具面
12 个专用 MCP 工具:nmap_scan / gobuster_scan / dirb_scan / nikto_scan / sqlmap_scan / metasploit_run / hydra_attack / john_crack / wpscan_analyze / enum4linux_scan / server_health / execute_command
通用 kali_tool(tool, params) 调度器:走 TOOL_SPECS 规格表,覆盖 57 工具——
类别 | 工具 |
侦察 | masscan / netdiscover / theharvester / whatweb / wafw00f / dnsrecon / dnsenum / fierce / amass / subfinder / httpx / dig / whois / dnsx |
Web/目录 | ffuf / wfuzz / dirsearch / feroxbuster / nuclei / commix / joomscan / arjun |
服务枚举 | smbclient / smbmap / rpcclient / nbtscan / ldapsearch / snmpwalk / onesixtyone / nmblookup |
利用/凭据 | msfvenom / searchsploit / hashcat / responder / netexec / secretsdump / hashid / ncrack / cewl |
AD/横向 | psexec / wmiexec / ntlmrelayx / evil-winrm / xfreerdp / bloodhound |
流量 | tcpdump / tshark / ngrep / arpspoof / tcpflow |
取证 | binwalk / exiftool / steghide / foremost |
无线 | aircrack-ng / airmon-ng / reaver |
后渗透 | proxychains |
每个工具都支持 additional_args 透传,配合 execute_command 可覆盖 Kali 全能力。
本版增强功能
通用工具调度器:
TOOL_SPECS规格表 +/api/tools/run,一行规格加一个工具,无需逐个写 wrapper自动 sudo:需要 root 的工具(masscan/arp-scan/tcpdump/无线类)自动加
sudo -n(SUDO_TOOLS),前提是 Kali 侧已配 NOPASSWD sudo每请求超时:请求体可带
timeout字段(秒)覆盖默认 180s;execute_command(command, timeout=)/kali_tool(..., params={"timeout": ...})均已支持,超时返回timed_out:true及部分结果参数校验:缺失必需参数/未知工具返回明确错误
使用
1. Kali 侧启动 server
python3 server.py --ip 0.0.0.0 --port 50002. 注册 MCP client
Claude Code 项目级 .mcp.json(将 <YOUR_KALI_IP> 替换为 Kali 实际 IP):
{
"mcpServers": {
"kali": {
"type": "stdio",
"command": "python",
"args": ["/absolute/path/to/MCP-Kali-Server/client.py", "--server", "http://<YOUR_KALI_IP>:5000/"]
}
}
}客户端通过 HTTP 直连 Kali server(NAT/桥接均可),无需 SSH 隧道;改 IP 只动 .mcp.json 一处。
3. 调用示例
# 专用工具
mcp__kali__nmap_scan(target="10.0.0.1", scan_type="-sV")
# 通用调度器
mcp__kali__kali_tool(tool="masscan", params={"target": "10.0.0.0/24", "ports": "80,443"})
# 任意命令
mcp__kali__execute_command(command="whoami", timeout=600)部署
部署到 Kali:
scp server.py kali@<YOUR_KALI_IP>:/home/kali/kali-mcp-server.py(或直接git clone后运行)客户端在本机:
pip install -r requirements.txt后用python client.py --server http://<YOUR_KALI_IP>:5000/启动含对上游
Wh0am123/MCP-Kali-Server的针对性增强(通用调度器/超时/sudo)
免责声明
仅供授权测试、CTF、安全教育使用。VM 快照可回溯,故本适配未做安全加固(含 execute_command 任意命令)。
This server cannot be deployed
Maintenance
Related MCP Connectors
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Claude Code / MCP skills for the dev pipeline: discover, spec, design, build, ship, operate.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides Claude Desktop with access to Kali Linux penetration testing tools via a privileged Docker container, enabling network scanning (nmap), web vulnerability scanning (nikto), and custom command execution.11-
- AlicenseNot gradedqualityDmaintenanceEnables AI-assisted penetration testing by connecting MCP clients to execute terminal commands on a Kali Linux machine, supporting tools like Nmap, Metasploit, and custom commands.MIT
- FlicenseNot gradedqualityBmaintenanceEnables Claude to run Kali Linux penetration-testing tools (e.g., nmap, sqlmap, ffuf) in an isolated Docker container.-
- FlicenseNot gradedqualityCmaintenanceEnables Claude to run Kali Linux penetration-testing tools inside an isolated Docker container, including nmap, sqlmap, ffuf, and other security scanning utilities.-