MCP Kali
Enables AI agents to execute any command in a Kali Linux environment, with features like interactive sessions, background tasks, and HTTP interception for security testing.
README
MCP Kali
Give your AI agent a full Kali Linux arsenal, not just a handful of wrapped CLI tools.
A Model Context Protocol (MCP) server that runs inside a Kali Linux Docker container, giving AI agents full access to offensive security tooling through a standardized interface.
Built for real-world offensive security and CTF work, battle-tested through hundreds of Hack The Box machines, contributing to a Top #100 global ranking on the platform.
✨ Features at a Glance
| Feature | What It Means |
|---|---|
| Unrestricted Command Execution | Run any command — not limited to a predefined list of tools |
| Interactive PTY Sessions | SSH, telnet, netcat, SQL shells, reverse shells — full back-and-forth interaction |
| Background Tasks | Fire off long-running scans without blocking the conversation |
| HTTP Intercepting Proxy | Capture, inspect, export, and replay HTTP traffic (built on mitmproxy) |
| Dynamic Tool Discovery | Find, install, and register new tools at runtime — zero restarts |
| OpenTelemetry (OTLP) Ready | Trace and capture every tool execution for full observability |
| Batteries Included | Ships with 1000+ security tools pre-installed in a Kali container |
🤔 Why MCP Kali?
MCP Kali isn't a wrapper around security tools — it's a full Kali Linux environment exposed to your AI agent through MCP primitives. Instead of one MCP function per tool, it provides building blocks that let the agent operate freely:
- Execute any command available in Kali, not just a predefined list
- Open interactive sessions for services that need back-and-forth (SSH, SQL shells, reverse shells)
- Run scans in the background while continuing other work
- Intercept and replay HTTP traffic for web testing
- Install new tools on the fly without restarting the server
The agent decides how to combine them, just like working in a real terminal.
🚀 Quick Start
1. Build the Docker image
docker build -t mcp-kali .
2. Run the container
docker run -d --name mcp-kali --privileged mcp-kali
3. Configure Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"kali": {
"type": "stdio",
"command": "docker",
"args": ["exec", "-i", "mcp-kali", "python3", "/opt/mcp_server.py"]
}
}
}
📖 Documentation
- Tools Reference — full list of MCP tools, sessions, background tasks, proxy, and meta-tools
- Architecture & Container — internals, design decisions, pre-installed packages, and OTLP tracing
🧪 Running Tests
Tests run inside Docker to match the production environment:
docker build -t mcp-kali .
docker run --rm -v $(pwd):/mcp-kali -w /mcp-kali mcp-kali \
bash -c "pip3 install --quiet --break-system-packages pytest && python3 -m pytest tests/ -v"
140 tests covering the tool registry, JSON-RPC protocol, session management, concurrent execution, meta-tools, resources, and dynamic registration.
⚠️ Disclaimer
This project is shared for educational and research purposes only. It provides unrestricted command execution inside a Kali Linux container — use it responsibly and at your own risk. The authors assume no liability for misuse. Always ensure you have proper authorization before testing any target.
📄 License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。