Kali

Provides an AI bridge to Kali Linux tools for automated and interactive security testing.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "stoicmehedi-k-mcp": {
      "command": "python",
      "args": [
        "mcp_server.py"
      ]
    }
  }
}

You enable AI assistants to interact with a Kali Linux environment through a concise MCP bridge. This server lets you run security tools, manage interactive sessions, and automate penetration testing tasks from an AI client in a safe, controlled way.

How to use

You connect an MCP-enabled AI interface to the Kali MCP server to perform security testing, automations, and real-time analyses. Start by launching the MCP bridge on your Kali machine and on your client machine, then configure your AI client to point at the bridge. The bridge automatically detects interactive tools (like SSH sessions) and maintains persistent sessions, returning IDs you use to send subsequent commands or read outputs.

Key capabilities you can leverage include network reconnaissance with nmap, web content discovery with gobuster, web app testing with sqlmap and nikto, and Windows-era enumeration with tools like enum4linux. You can also open interactive shells (SSH, Evil-WinRM, MySQL, etc.) and issue commands within those sessions using a session ID.

How to install

Prerequisites: ensure you have Python 3.7 or newer on both the Kali server and your client machine. You also need an MCP-compatible AI interface (such as Claude Desktop or 5ire) and network connectivity between the client and the Kali server.

  1. On your Kali Linux machine install and run the MCP bridge.
# Clone the bridge repository (example path; replace with actual path if different)
git clone https://github.com/YOUR-USERNAME/K-MCP.git

# Navigate to project directory
cd K-MCP

# Install Python dependencies
pip install -r requirements.txt

# Start the Kali MCP server
python3 kali_server.py
  1. On your client machine (Windows/Linux/macOS) install dependencies and start the MCP client to connect to the Kali server.
# Navigate to project directory
cd K-MCP

# Install Python dependencies
pip install -r requirements.txt

# Edit the client to point to your Kali server if needed
# Run the MCP client to establish a bridge to the Kali server
python mcp_server.py
  1. Configure the MCP client for your AI interface. The following example shows how to wire the MCP server to Claude Desktop. Edit the configuration file to point to the local MCP bridge you started.
{
  "mcpServers": {
    "kali_mcp": {
      "command": "python",
      "args": [
        "mcp_server.py"
      ]
    }
  }
}

Additional configuration and usage notes

If you are using Claude Desktop, you can configure the client to launch the MCP bridge automatically. The configuration typically specifies the Python interpreter and the path to the MCP server script.

Example: the Claude Desktop setup uses a JSON config with a Kali MCP entry that starts the MCP server when Claude launches the bridge.

{
  "mcpServers": {
    "kali_mcp": {
      "command": "python",
      "args": [
        "E:\\Paste_your_path_to_code\\mcp_server.py"
      ]
    }
  }
}

Troubleshooting tips

If you encounter connection issues, verify that the Kali server is reachable from the client network, and ensure the MCP bridge process is running on both sides. Check that Python dependencies are installed and that the correct script paths are used in the client configuration.

For interactive sessions, you will receive a session ID. Use interactive_send to forward commands to that session, interactive_read to fetch outputs without sending new commands, and interactive_close to terminate the session when finished.

Example tool usage

Common workflows begin with a quick reconnaissance and then deeper testing. You can run tools like nmap, gobuster, sqlmap, and nikto, and switch to interactive sessions for SSH or Windows remote shells as needed.

Security considerations

This bridge enables remote command execution on your Kali environment. Use it only on networks you own or have explicit authorization to test. Implement authentication and access controls for any exposed API, and review commands before execution to prevent unintended actions.

Advanced use cases

Network discovery and enumeration, web application testing, Windows domain testing, password guessing workflows, forensic analysis, exploit development research, and real-time assistance for CTF challenges are supported through the integrated tool set and interactive sessions.

Contributing

Contributions are welcome. You can report issues, propose features, or suggest usage examples to improve practical usage for security professionals and students.

Disclaimer

This MCP server is intended for educational and authorized security testing. Misuse of the tools or configurations is your responsibility.

License

MIT License - see the LICENSE file for details.

Tools and endpoints overview

The bridge exposes a set of functions and endpoints that mirror common security testing workflows, including dedicated scan helpers and session management utilities.

Available tools

nmap_scan

Triggers a network scan with specified targets and options, returning identified hosts and service information.

gobuster_scan

Performs directory and file enumeration against a target URL or host using a supplied wordlist.

sqlmap_scan

Runs sqlmap against a target URL with provided data payloads to identify and enumerate SQL injection points.

nikto_scan

Performs a web server vulnerability scan against a target URL with optional arguments.

enum4linux_scan

Enumerates Windows/SMB information from a target using the enum4linux tool.

execute_command

Executes a shell command on the Kali server and returns the output. Automatically detects interactive commands and starts a persistent session when needed.

interactive_send

Sends a command to an active interactive session identified by a session ID.

interactive_read

Reads output from an active interactive session without sending a new command.

interactive_close

Closes an active interactive session when finished.

list_active_sessions

Lists all currently active interactive sessions with their IDs and statuses.

evil_winrm_connect

Establishes a remote Windows management session via Evil-WinRM using provided IP, username, and password.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational