MCP Kali Server
About
MCP configuration to connect AI agent to a Linux machine.
Details
- License
- MIT
Explore
- 🧠 AI Endpoint Integration: Connect your Kali to any MCP of your liking such as Claude Desktop or 5ier.
- 🖥️ Command Execution API: Exposes a controlled API to execute terminal commands on your Kali Linux machine.
- 🕸️ Web Challenge Support: AI can interact with websites and APIs, capture flags via curl and any other tool AI the needs.
- 🔐 Designed for Offensive Security Professionals: Ideal for red teamers, bug bounty hunters, or CTF players automating common tasks.
---
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Kali ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Edit:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- Simply add an MCP with the command python3 /absolute/path/to/client.py --server http://LINUX_IP:5000 and it will automatically generate the needed configuration files.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp kali server": {
"MCP-Kali-Server": {
"command": "python3",
"args": [
"-m",
"venv",
".venv"
]
}
}
}
}
McpServers
{
"MCP-Kali-Server": {
"command": "python3",
"args": [
"-m",
"venv",
".venv"
]
}
}
MCP Kali Server (MKS) is a lightweight API bridge that connects MCP clients (e.g: Claude Desktop or 5ire) to the API server which allows executing commands on a Linux terminal.
This MCP is able to run terminal commands as well as interacting with web applications using:
- Dirb
- enum4linux
- gobuster
- Hydra
- John the Ripper
- Metasploit-Framework
- Nikto
- Nmap
- sqlmap
- WPScan
- As well as being able to execute raw commands.
As a result, this is able to perform AI-assisted penetration testing and solving CTF challenges in real time.
Articles Using This Tool
👉 How MCP is Revolutionizing Offensive Security
---
🔍 Use Case
The goal is to enable AI-driven offensive security testing by:
- Letting the MCP interact with AI endpoints like OpenAI, Claude, DeepSeek, Ollama or any other models.
- Exposing an API to execute commands on a Kali machine.
- Using AI to suggest and run terminal commands to solve CTF challenges or automate recon/exploitation tasks.
- Allowing MCP apps to send custom requests (e.g. curl, nmap, ffuf, etc.) and receive structured outputs.
Here are some example (using Google's AI gemini 2.0 flash):
Example solving a web CTF challenge from RamadanCTF
https://github.com/user-attachments/assets/dc93b71d-9a4a-4ad5-8079-2c26c04e5397
Trying to solve machine "code" from HTB
https://github.com/user-attachments/assets/3ec06ff8-0bdf-4ad5-be71-2ec490b7ee27
---
🚀 Features
- 🧠 AI Endpoint Integration: Connect your Kali to any MCP of your liking such as Claude Desktop or 5ier.
- 🖥️ Command Execution API: Exposes a controlled API to execute terminal commands on your Kali Linux machine.
- 🕸️ Web Challenge Support: AI can interact with websites and APIs, capture flags via curl and any other tool AI the needs.
- 🔐 Designed for Offensive Security Professionals: Ideal for red teamers, bug bounty hunters, or CTF players automating common tasks.
---
🛠️ Installation and Running
On your Kali Machine
sudo apt install mcp-kali-server
kali-server-mcp
Otherwise for bleeding edge:
git clone https://github.com/Wh0am123/MCP-Kali-Server.git
cd MCP-Kali-Server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
./server.py
Command Line Options:
- --ip <address>: Specify the IP address to bind the server to (default: 127.0.0.1 for localhost only)
- Use 127.0.0.1 for local connections only (secure, recommended)
- Use 0.0.0.0 to allow connections from any network interface (very dangerous; use with caution)
- Use a specific IP address to bind to a particular network interface
- --port <port>: Specify the port number (default: 5000)
- --debug: Enable debug mode for verbose logging
Examples:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




