System Servicesapibridgemcppenetration-testingctfterminal

MCP Kali Server

Lightweight API bridge connecting MCP Clients to a Kali Linux API server for executing terminal commands. Enables AI-assisted penetration testing and real-time CTF solving.

Description

The mcp-kali-server package provides an API bridge that connects MCP Clients such as Claude Desktop or 5ire to an API server, allowing execution of commands on a Linux terminal. This setup enables running tools like nmap, nxc, curl, wget, gobuster, and others directly through the MCP interface.

Use cases include interacting with web applications, performing AI-assisted penetration testing, solving CTF web challenges in real time, and assisting with machines from HTB or THM. It bridges AI clients to Kali's powerful toolset for dynamic, terminal-based operations.

The package includes both the Kali API server (kali-server-mcp) and the MCP server (mcp-server), facilitating seamless integration between AI-driven clients and Linux command execution.

How It Works

The tool operates as an API bridge using Flask (python3-flask) to run a server on a specified IP and port (default 127.0.0.1:5000). MCP Clients connect via HTTP requests to this server, which executes Linux terminal commands and returns results. The mcp-server component handles client-side connections to the API server with configurable timeout and debug options, leveraging python3-mcp and python3-requests for protocol handling.

Installation

bash
sudo apt install mcp-kali-server

Flags

--debugEnable debug mode for kali-server-mcp
--port PORTPort for the API server (default: 5000) for kali-server-mcp
--ip IPIP address to bind the server to (default: 127.0.0.1 for localhost only) for kali-server-mcp
--server SERVERKali API server URL (default: http://localhost:5000) for mcp-server
--timeout TIMEOUTRequest timeout in seconds (default: 300) for mcp-server
--debugEnable debug logging for mcp-server

Examples

Show help message and exit for Kali Linux API Server
kali-server-mcp -h
Run the Kali Linux API Server with debug mode enabled
kali-server-mcp --debug
Run the Kali Linux API Server on default port 5000
kali-server-mcp --port 5000
Run the Kali Linux API Server bound to all interfaces on port 5000
kali-server-mcp --ip 0.0.0.0 --port 5000
Show help message and exit for Kali MCP Client
mcp-server -h
Run the Kali MCP Client connecting to default API server
mcp-server --server http://localhost:5000
Run the Kali MCP Client with 600s timeout and debug logging
mcp-server --timeout 600 --debug
Updated 2026-04-16kali.org ↗