Skip to main content
Glama

kali-mcp-server

This project provides a Docker container that runs a Model Context Protocol (MCP) server on top of a Kali Linux base image. The server exposes common security tools so they can be invoked by an LLM through MCP or via a small Flask web API. Clients can discover which utilities are available and control execution timeouts to keep interactions safe.

Supported tools

The server currently allows the following Kali utilities to be run. More tools may be added by setting the EXTRA_TOOLS environment variable when the container is launched (comma separated list):

  • nmap

  • sqlmap

  • hydra

  • john

  • nikto

  • aircrack-ng

  • metasploit-framework

Usage

Build the container and run it locally:

docker build -t kali-mcp-server . docker run --rm -p 8000:8000 -p 5000:5000 kali-mcp-server

The MCP server listens on port 8000 by default. Use the run_tool MCP tool to invoke one of the supported commands with any desired arguments. The list_tools MCP tool returns the list of permitted utilities.

An HTTP API is also available on port 5000. Query the available tools with GET /tools and run a tool by POSTing JSON to the /run endpoint:

curl -X POST http://localhost:5000/run \ -H 'Content-Type: application/json' \ -d '{"tool": "nmap", "args": "-V", "timeout": 10}'

To enable HTTPS, mount a certificate and key and set the SSL_CERT and SSL_KEY environment variables when running the container:

docker run --rm -p 8000:8000 -p 5000:5000 \ -e SSL_CERT=/opt/cert.pem -e SSL_KEY=/opt/key.pem \ -v $PWD/cert.pem:/opt/cert.pem -v $PWD/key.pem:/opt/key.pem \ kali-mcp-server
-
security - not tested
-
license - not tested
-
quality - not tested

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/DurkDiggler/KaliMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server