MCP Kali Server
MCP configuration to connect AI agent to a Linux machine.
Wh0am123
README
MCP Kali Server
Kali MCP Server is a lightweight API bridge that connects MCP Clients (e.g: Claude Desktop, 5ire) to the API server which allows excuting commands on a Linux terminal.
This allows the MCP to run terminal commands like nmap, nxc or any other tool, interact with web applications using tools like curl, wget, gobuster.
And perform AI-assisted penetration testing, solving CTF web challenge in real time, helping in solving machines from HTB or THM.
My Medium Article on 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, 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 for my testing (I used google's AI gemini 2.0 flash)
Example solving my web CTF challenge in 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
curland 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
On your Linux Machine (Will act as MCP Server)
git clone https://github.com/Wh0am123/MCP-Kali-Server.git
cd MCP-Kali-Server
python3 kali_server.py
On your MCP Client (You can run on Windows or Linux)
- You will want to run
python3 /absolute/path/to/mcp_server.py http://LINUX_IP:5000
Configuration for claude desktop:
edit (C:\Users\USERNAME\AppData\Roaming\Claude\claude_desktop_config.json)
{
"mcpServers": {
"kali_mcp": {
"command": "python3",
"args": [
"/absolute/path/to/mcp_server.py",
"http://LINUX_IP:5000/"
]
}
}
}
Configuration for 5ire Desktop Application:
- Simply add an MCP with the command
python3 /absolute/path/to/mcp_server.py http://LINUX_IP:5000and it will automatically generate the needed configuration files.
š® Other Possibilities
There are more possibilites than described since the AI model can now execute commands on the terminal. Here are some example:
-
Memory forensics using Volatility
- Automating memory analysis tasks such as process enumeration, DLL injection checks, and registry extraction from memory dumps.
-
Disk forensics with SleuthKit
- Automating analysis from disk images, timeline generation, file carving, and hash comparisons.
ā ļø Disclaimer:
This project is intended solely for educational and ethical testing purposes. Any misuse of the information or tools provided ā including unauthorized access, exploitation, or malicious activity ā is strictly prohibited. The author assumes no responsibility for misuse.
Recommended Servers
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.
Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
MATLAB MCP Server
Integrates MATLAB with AI to execute code, generate scripts from natural language, and access MATLAB documentation seamlessly.
Macrostrat MCP Server
Enables Claude to query comprehensive geologic data from the Macrostrat API, including geologic units, columns, minerals, and timescales through natural language.
MCP Word Counter
A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.
