HackBridge MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/Dhineshkumar272005/HackBridge
cd MCP-Kali-Server
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add hackbridge -- python3 "<FULL_PATH_TO_HACKBRIDGE>/dist/index.js" --server http://LINUX_IP:5000/

Replace <FULL_PATH_TO_HACKBRIDGE>/dist/index.js with the actual folder you prepared in step 1.

README.md

AI-assisted penetration testing and CTF challenge solving via Linux terminal

πŸŒ‰ HackBridge

HackBridge is a lightweight MCP (Model Context Protocol) bridge that connects AI clients (e.g., Claude Desktop, 5ire) to a Linux terminal API server β€” enabling AI-assisted penetration testing, CTF challenge solving, and automated recon/exploitation in real time.

Run terminal commands like nmap, nxc, sqlmap, or any other tool. Interact with web applications using curl, wget, gobuster. Let the AI drive your offensive security workflow β€” from enumeration to exploitation.

πŸ” Use Case

HackBridge enables AI-driven offensive security by:

  • Connecting MCP-compatible AI clients (OpenAI, Claude, DeepSeek, Gemini, etc.) to a Linux terminal.
  • Exposing a controlled API to execute commands on your Linux machine.
  • Letting AI suggest, run, and analyze terminal commands to solve CTF challenges or automate recon/exploitation tasks.
  • Allowing MCP apps to send structured requests (e.g., nmap, ffuf, curl) and receive parsed outputs.

πŸš€ Features

  • 🧠 AI Integration via MCP β€” Connect your Linux machine to any MCP-compatible client like Claude Desktop or 5ire.
  • πŸ–₯️ Command Execution API β€” Controlled API to execute terminal commands on your Linux machine.
  • πŸ› οΈ Built-in Tool Support β€” Pre-configured endpoints for Nmap, Gobuster, Dirb, SQLMap, Hydra, and WPScan.
  • πŸ•ΈοΈ Web Challenge Support β€” AI can interact with websites and APIs, capture flags via curl and any other tool.
  • ⏱️ Configurable Timeouts β€” Per-tool timeout support to handle long-running scans without interruption.
  • πŸ” Built for Offensive Security β€” Ideal for red teamers, bug bounty hunters, and CTF players automating common tasks.
  • πŸ”„ Arbitrary Command Execution β€” Execute any terminal command beyond the built-in tools for maximum flexibility.

πŸ“ Project Structure

MCP-Kali-Server/
β”œβ”€β”€ kali_server.py          # Flask API server (runs on Linux/Kali)
β”œβ”€β”€ mcp_server.py           # MCP client bridge (connects AI to API server)
β”œβ”€β”€ mcp-kali-server.json    # Example MCP client configuration
β”œβ”€β”€ requirements.txt        # Python dependencies
└── README.md               # This file

πŸ› οΈ Installation & Setup

Prerequisites

  • Python 3.8+
  • pip (Python package manager)
  • The following Python packages (installed via requirements.txt):
    • Flask>=3.0.0
    • requests>=2.31.0
    • mcp>=1.0.0

1. On Your Linux Machine (API Server)

Install HackBridge via apt:

sudo apt install hackbridge

Or install manually:

git clone <your-repo-url>
cd MCP-Kali-Server
pip install -r requirements.txt
python3 kali_server.py

Command Line Options:

  • --ip <address> β€” IP to bind the server to (default: 127.0.0.1 for localhost only)
    • 127.0.0.1 β€” Local connections only (secure, recommended)
    • 0.0.0.0 β€” Allow connections from any interface (⚠️ very dangerous; use with caution)
    • Specific IP β€” Bind to a particular network interface
  • --port β€” Port number (default: 5000)
  • --debug β€” Enable debug mode for verbose logging

Examples:

# Run on localhost only (secure, default)
python3 kali_server.py

# Run on all interfaces (less secure, useful for remote access)
python3 kali_server.py --ip 0.0.0.0

# Run on a specific IP and custom port
python3 kali_server.py --ip 192.168.1.100 --port 8080

# Run with debug mode
python3 kali_server.py --debug

2. On Your MCP Client Machine (Can Be Local or Remote)

git clone <your-repo-url>
cd MCP-Kali-Server
pip install -r requirements.txt

MCP Client Command Line Options:

  • --server <url> β€” Kali API server URL (default: http://localhost:5000)
  • --timeout <seconds> β€” Request timeout in seconds (default: 600)
  • --debug β€” Enable debug logging

If running the client and server on the same machine:

python3 mcp_server.py --server http://127.0.0.1:5000

If on separate machines, create an SSH tunnel to your Linux machine, then launch the client:

ssh -L 5000:localhost:5000 user@LINUX_IP
python3 mcp_server.py --server http://127.0.0.1:5000

Note: If you're openly hosting the API server on your network (kali_server.py --ip 0.0.0.0), you don't need the SSH tunnel β€” but ⚠️ this is highly discouraged for security reasons.

python3 mcp_server.py --server http://LINUX_IP:5000

βš™οΈ MCP Client Configuration

Claude Desktop

Edit C:\Users\USERNAME\AppData\Roaming\Claude\claude_desktop_config.json:

{
    "mcpServers": {
        "hackbridge": {
            "command": "python3",
            "args": [
                "/absolute/path/to/mcp_server.py",
                "--server",
                "http://LINUX_IP:5000/"
            ],
            "timeout": 600
        }
    }
}

[5ir

Tools (1)

execute_commandExecute arbitrary terminal commands on the Linux machine

Configuration

claude_desktop_config.json
{"mcpServers": {"hackbridge": {"command": "python3", "args": ["/absolute/path/to/mcp_server.py", "--server", "http://LINUX_IP:5000/"], "timeout": 600}}}

Try it

β†’Run an nmap scan on 192.168.1.1 to identify open ports.
β†’Use gobuster to brute force directories on the target web server at http://10.10.10.5.
β†’Execute sqlmap against the target URL to check for SQL injection vulnerabilities.
β†’List all files in the current directory and identify any interesting configuration files.
β†’Use curl to fetch the headers of the target website and analyze the server response.

Frequently Asked Questions

What are the key features of HackBridge?

AI integration via MCP for Claude Desktop and other clients. Controlled API for executing terminal commands on Linux. Pre-configured support for Nmap, Gobuster, SQLMap, and other security tools. Configurable per-tool timeouts for long-running scans. Support for arbitrary command execution for maximum flexibility.

What can I use HackBridge for?

Automating recon and enumeration phases during penetration testing. Solving CTF challenges by letting AI drive terminal-based tools. Streamlining red team workflows by integrating AI analysis with offensive security tools. Rapidly testing web applications for vulnerabilities using automated scripts.

How do I install HackBridge?

Install HackBridge by running: git clone https://github.com/Dhineshkumar272005/HackBridge && cd MCP-Kali-Server && pip install -r requirements.txt

What MCP clients work with HackBridge?

HackBridge works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep HackBridge docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare