Kali MCP Server
Provides integration with Kali Linux, allowing AI agents to run 19 network tools for maintenance and penetration testing, including nmap, arp-scan, and others.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kali MCP ServerScan the 192.168.1.0/24 subnet for active hosts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🔍 Kali MCP Server
将 Kali Linux 变成你的 AI 网络助手 —— 27 个工具,从日常维护到渗透测试,对话即操作。
⚠️ 重要警告
本工具集包含信息收集、漏洞扫描和主动攻击模块。未经授权对他人系统使用属于违法行为。
🔴 攻击模块需要独立开关
ATTACK_ENABLED=true才能加载(双层确认)🟡 渗透侦察模块需
PENTEST_ENABLED=true🟢 网络维护模块默认启用
仅限局域网使用,不要暴露到公网
使用者对自身行为承担全部法律责任
Related MCP server: Kali MCP Server
能做什么
在 Cherry Studio / Claude Desktop 对话中直接:
🟢 网络维护(12 工具,默认)
场景 | 对话示例 |
设备发现 | "扫描 192.168.0.0/24 有哪些在线设备" |
端口扫描 | "192.168.0.13 开放了哪些端口和服务" |
连接测试 | "ping 一下 8.8.8.8 看看延迟" |
路由诊断 | "traceroute 看看去百度走什么路径" |
网络质量 | "MTR 综合测试到网关的链路质量" |
DNS 排查 | "查一下 baidu.com 的 A 记录和 MX 记录" |
信息查询 | "搜一下 github.com 的 WHOIS 注册信息" |
连接查看 | "Kali 上现在有哪些服务在监听" |
网卡状态 | "查看所有网卡 IP 和流量统计" |
路由表 | "检查默认网关和路由策略" |
抓包分析 | "抓取 eth0 上 100 个 HTTP 数据包" |
HTTP 测试 | "用 curl 请求 https://httpbin.org/ip" |
🟡 渗透侦察(7 工具,PENTEST_ENABLED=true)
场景 | 对话示例 |
漏洞扫描 | "用 nmap 扫描 192.168.0.1 的 CVE 漏洞" |
目录爆破 | "爆破 http://192.168.0.1 的隐藏目录" |
Web 漏洞 | "nikto 扫描 http://192.168.0.1 的安全问题" |
SMB 枚举 | "枚举 192.168.0.13 的 SMB 用户和共享" |
技术识别 | "识别 http://192.168.0.1 用了什么 Web 技术" |
漏洞搜索 | "searchsploit 搜一下 OpenSSH 7.0 的漏洞" |
密码爆破 | "用 rockyou 字典爆破 192.168.0.x 的 SSH" |
🔴 主动攻击(8 工具,额外 ATTACK_ENABLED=true)
场景 | 对话示例 |
SQL 注入 | "检测 http://target/page.php?id=1 是否有 SQL 注入" |
WordPress | "扫描 https://blog.example.com 的 WP 漏洞和用户" |
Payload 生成 | "生成 Windows x64 reverse shell payload" |
网络连接 | "nc 连接到 192.168.0.13 的 22 端口" |
哈希捕获 | "用 Responder 在 eth0 上捕获 30 秒 NTLM 哈希" |
AD 攻击 | "crackmapexec 检查域内 SMB 访问权限" |
WiFi 扫描 | "airodump-ng 扫描附近 WiFi 网络 30 秒" |
哈希破解 | "john 破解捕获的 NTLM 哈希(60 秒)" |
架构
┌──────────────────┐ Streamable HTTP ┌──────────────────────────┐
│ Cherry Studio │ ────── :8000/mcp ──────────→ │ Kali MCP Server │
│ Claude Desktop │ │ (FastMCP 3.x) │
└──────────────────┘ ├──────────────────────────┤
│ 🟢 12 网络维护 (默认) │
│ 🟡 7 渗透侦察 (可开关) │
│ 🔴 8 主动攻击 (可开关) │
└──────────────────────────┘快速开始
1. 部署到 Kali
# 克隆仓库
git clone https://github.com/xhj-cloud/kali-mcp.git
cd kali-mcp
# 一键安装系统包 + Python venv
chmod +x setup.sh
sudo ./setup.sh2. 配置
cat > .env << EOF
TRANSPORT=http
HTTP_HOST=0.0.0.0
HTTP_PORT=8000
AUTH_TOKEN=
PENTEST_ENABLED=true
ATTACK_ENABLED=true
EOF3. 启动
source .venv/bin/activate
PYTHONPATH=src python -m kali_mcp.server
# 或后台 + 开机自启
sudo cp kali-mcp.service /etc/systemd/system/
sudo systemctl enable --now kali-mcp4. 修复工具权限
sudo apt install libcap2-bin -y
sudo setcap cap_net_raw,cap_net_admin+eip $(which arp-scan)
sudo setcap cap_net_raw,cap_net_admin+eip $(which tcpdump)5. 连接 AI 客户端
Cherry Studio → 设置 → MCP 服务器 → 添加:
字段 | 值 |
名称 | Kali 工具箱 |
类型 | HTTP / Streamable HTTP |
URL |
|
完整工具清单
# | 工具名 | Kali 命令 | 级别 | 功能 |
1 |
| ping | 🟢 | ICMP 连通性 + 延迟 |
2 |
| traceroute | 🟢 | 路由跳数追踪 |
3 |
| mtr | 🟢 | ping+traceroute 综合链路报告 |
4 |
| dig | 🟢 | DNS 查询 (A/AAAA/MX/NS/TXT...) |
5 |
| whois | 🟢 | 域名/IP 注册信息 |
6 |
| nmap | 🟢 | 端口/服务/OS 扫描 (7 模式) |
7 |
| arp-scan | 🟢 | ARP 设备发现 + MAC 厂商 |
8 |
| ss | 🟢 | 监听端口 + 活跃连接 |
9 |
| ip addr | 🟢 | 网卡 IP + 流量统计 |
10 |
| ip route | 🟢 | 内核路由表 |
11 |
| tcpdump | 🟢 | 实时抓包 (BPF 过滤) |
12 |
| curl | 🟢 | HTTP 请求测试 |
13 |
| nmap --script | 🟡 | CVE 漏洞 + 广播发现 |
14 |
| searchsploit | 🟡 | Exploit-DB 离线搜索 |
15 |
| whatweb | 🟡 | Web 技术栈指纹 |
16 |
| nikto | 🟡 | Web 漏洞扫描 (6700+ 规则) |
17 |
| gobuster | 🟡 | Web 目录/文件爆破 |
18 |
| enum4linux | 🟡 | SMB 用户/共享/OS 枚举 |
19 |
| hydra | 🟡 | 服务密码爆破 |
20 |
| sqlmap | 🔴 | SQL 注入检测与利用 |
21 |
| wpscan | 🔴 | WordPress 漏洞+用户枚举 |
22 |
| msfvenom | 🔴 | Payload 生成 (不执行) |
23 |
| netcat | 🔴 | TCP 监听/连接/端口扫描 |
24 |
| responder | 🔴 | NTLM 哈希捕获/投毒 |
25 |
| crackmapexec | 🔴 | SMB/WinRM/MSSQL 攻击 |
26 |
| airodump-ng | 🔴 | WiFi 扫描 + 握手包捕获 |
27 |
| john | 🔴 | 密码哈希离线破解 |
权限控制
ATTACK_ENABLED=true ──→ 🔴 攻击工具 (需二次开关)
└── PENTEST_ENABLED=true ──→ 🟡 渗透工具 (需手动开启)
└── (默认) ──────────→ 🟢 维护工具 (始终可用)配置参考
变量 | 默认 | 说明 |
|
| stdio / sse (旧版 Cherry Studio) / http |
|
| 绑定地址 |
|
| 端口 |
| 空 | Bearer Token,局域网留空 |
|
| 渗透侦察模块 |
|
| 主动攻击模块 |
|
| 命令超时(秒) |
安全设计
措施 | 说明 |
零命令注入 |
|
Pydantic 校验 | 所有输入经模型校验,拦截 shell 元字符 |
三级权限 | 维护→渗透→攻击,逐级开启,默认仅维护 |
调用警告 | 攻击工具强制输出 |
危险过滤 | 禁止 nmap --script 写入、tcpdump 写文件等 |
超时保护 | 每个命令独立超时 |
免责声明
本工具仅供合法授权的安全测试、教育研究和网络维护使用。使用者须确保遵守所在国家/地区法律法规。作者不对滥用行为承担任何责任。
License
MIT — LICENSE
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-quality-maintenanceEnables AI assistants to execute penetration testing commands and security tools on Kali Linux remotely. Supports automated reconnaissance, vulnerability scanning, and CTF solving through integration with 25+ offensive security tools like nmap, gobuster, and nuclei.Last updated16
- FlicenseCqualityDmaintenanceProvides access to 20+ Kali Linux penetration testing tools through isolated Docker containers, enabling network scanning, vulnerability assessment, password cracking, web security testing, and forensics through natural language commands.Last updated261
- Alicense-qualityDmaintenanceEnables AI assistants to perform penetration testing and security assessments by exposing 60+ Kali Linux security tools including network scanning, web security testing, password cracking, exploitation frameworks, and OSINT capabilities through an AI-friendly interface.Last updated2MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to perform authorized penetration testing and security assessments by exposing 20+ Kali Linux security tools (nmap, sqlmap, gobuster, hydra, etc.) through a safe, validated interface with command allowlists, rate limiting, and input sanitization.Last updated191
Related MCP Connectors
500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.
The web capability layer for AI agents: render, extract, DNS, SSL, WHOIS & more via x402.
54 AI agent tools: OSINT, intel feeds, DeFi, crypto, weather, DNS, proxies. x402 micropayments.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xhj-cloud/kali-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server