
halilkirazkaya/pentester-mcp
Developer toolsEmpower your AI assistants with the ultimate open-source penetration testing arsenal.
Overview
Empower your AI assistants with the ultimate open-source penetration testing arsenal.
README
Pentester-MCP
Empower your AI assistants with the ultimate open-source penetration testing arsenal.
Overview
Pentester-MCP provides Model Context Protocol (MCP) integration for over 200 of the most popular open-source cybersecurity and penetration testing tools.
By adding Pentester-MCP to an AI assistant (like Claude Desktop, Cursor, or specialized agents), the AI gains the autonomous ability to act as a penetration tester:
- It can run
nmapscans, analyze open ports, and automatically decide to runffufon discovered web servers. - It can execute
sqlmapagainst parameters it identifies as vulnerable. - It understands tool arguments, required flags, and syntaxes thanks to AI-optimized documentation strings injected into every MCP tool.
All 217 Python *_mcp.py tools were generated intelligently from cheat sheets to ensure safe execution (e.g., preventing shell injection, enforcing timeouts, and handling huge terminal outputs).
The Arsenal
The tools/ directory includes MCP servers for almost every category:
- Reconnaissance:
nmap,masscan,recon-ng,amass,subfinder,nuclei - Web Exploitation:
sqlmap,commix,ffuf,gobuster,dirsearch,nikto - Active Directory & Network:
impacket(full suite),bloodhound,responder,evil-winrm - Brute-Forcing & Password:
hydra,medusa,john,hashcat,nxc - And 180+ more covering WiFi, Cloud, Kubernetes, and reversing.
Installation & Usage
Because of the massive amount of tools, installing everything on your host machine can be messy. Therefore, Pentester-MCP offers two primary ways to run: Docker Sandbox (Recommended) and Local Execution. Both use uv for dependency management — the project is defined in pyproject.toml, locked in uv.lock, and everything lives under src/.
Method A: Docker Sandbox (Recommended & Secure)
The sandbox is based on Exegol — a well-known, curated set of Docker build recipes for pentesters (shell history, wordlists, custom tool configs). Exegol’s prebuilt Docker Hub tags are stale (frozen at v3.1.6 while upstream is at 3.2), so Pentester-MCP builds Exegol from source: the src/exegol-images git submodule pins the upstream recipe tree, and each src/docker/Dockerfile. runs Exegol’s own entrypoint.sh package installers on top of debian:13-slim. You always get the current Exegol tree — update it with one command and rebuild:
git submodule update --remote src/exegol-images
Variant images live in src/pentester_mcp/docker/ (Dockerfile.) with a matching compose file in src/pentester_mcp/compose-files/ per profile:
| Variant | Exegol packages | Focus | Suggested config |
|---|---|---|---|
example-kali (default) |
(none) | thin Kali base, you pick tools via apt in the Dockerfile — fastest way to try Pentester-MCP | pick your own |
web |
base + web + cracking + code analysis | web app security | web-config.yaml |
ad |
base + ad + c2 + network | Active Directory / internal | ad-config.yaml |
light |
base + package_most_used |
essentials only, fastest build | pick your own |
osint |
base + osint | OSINT | recon-config.yaml |
full |
all package_* installers |
every supported tool | any |
Build time warning: building Exegol from source compiles the whole toolkit — expect hours and a multi-GB image (
lightis the fastest). Docker layer caching makes later rebuilds incremental.
The MCP_CONFIG_PATH in each compose file controls which tool wrappers are exposed to the AI; the image determines which binaries are installed. Exposed-but-missing tools simply return a FileNotFoundError the AI can report.
-
Clone with submodules and select your tools (
src/pentester_mcp/configs/*.yaml):git clone --recurse-submodules https://github.com/halilkirazkaya/pentester-mcp.git cd pentester-mcp -
Build and Run the Sandbox:
docker compose -f src/pentester_mcp/compose-files/docker-compose.example-kali.yml up -d --buildFor another profile, e.g. web:
docker compose -f src/pentester_mcp/compose-files/docker-compose.web.yml up -d --buildYour container is now running silently in the background.
-
Add to your AI Client: Open your MCP client’s configuration (e.g.,
claude_desktop_config.json) and copy a snippet fromsrc/pentester_mcp/mcp-config-files/.
Method B: Local Execution (Fastest Setup)
If you already have Kali Linux, Parrot OS, or you specifically only want to use the tools already installed on your host system:
-
Clone and Install with uv:
git clone https://github.com/halilkirazkaya/pentester-mcp.git cd pentester-mcp uv sync uv run pentester-mcp # default config (example) uv run pentester-mcp src/pentester_mcp/configs/web-config.yaml uv run python -m pentester_mcp.server src/pentester_mcp/configs/ad-config.yaml -
Add to your AI Client: Point your MCP client at the console script (
.venv/bin/pentester-mcp) or runpython -m pentester_mcp.serverfrom your local environment. The active tool set is chosen by (in order): the config path argument,MCP_CONFIG_PATH, or the defaultsrc/pentester_mcp/configs/example-config.yaml.Note: If the tool binary (e.g.,
nmaporgobuster) is not installed on your host system, the AI will gracefully receive aFileNotFoundErrorand inform you.
🔧 Configuring MCP Clients (Claude, Cursor, etc.)
Unlike legacy setups requiring you to register a server per tool out of 217 options, Pentester-MCP now uses a Unified Server Architecture.
-
Define which tools you want available by editing a configuration file in
src/pentester_mcp/configs/(e.g.,example-config.yaml). -
Add the single Unified Server to your Claude/Cursor configuration. Ready-to-use MCP client snippets live in
src/pentester_mcp/mcp-config-files/in two sets — same eight tool configs each, one file per tool config:docker/— runs the server inside the runningpentester-mcpcontainer (docker exec ... uv run --no-sync --project /app pentester-mcp configs/.yaml). For use with Method A.local/— runs the server directly on your host with uv (uv run --no-sync --directory pentester-mcp src/pentester_mcp/configs/.yaml). For use with Method B; replace the/path/to/pentester-mcpplaceholder with your clone’s path and runuv synconce first.
File (in both docker/andlocal/)Starts the server with Tools exposed mcp-config.jsonexample-config.yamlstarter 18-toolkit mcp-config.full.jsonfull-config.yamleverything (217) mcp-config.web.jsonweb-config.yamlweb only mcp-config.ad.jsonad-config.yamlAD only mcp-config.recon.jsonrecon-config.yamlrecon only mcp-config.pwd.jsonpwd-config.yamlpassword attacks mcp-config.exploit.jsonexploit-config.yamlexploitation/C2 mcp-config.misc.jsonmisc-config.yamlmisc/scanning Multiple snippets can coexist in one MCP client (distinct
mcpServerskeys:pentester_mcp,pentester_mcp_web, …), letting the AI pick the right toolset per task. Don’t register thedocker/andlocal/version of the same profile together — they use the same server keys.
Claude Desktop Example
Simply copy the contents of src/pentester_mcp/mcp-config-files/docker/mcp-config.json (Method A) or src/pentester_mcp/mcp-config-files/local/mcp-config.json (Method B) into your claude_desktop_config.json file. The docker one looks like this:
{
"mcpServers": {
"pentester_mcp": {
"command": "docker",
"args": [
"exec",
"-i",
"pentester-mcp",
"uv",
"run",
"--no-sync",
"--project",
"/app",
"pentester-mcp",
"configs/example-config.yaml"
]
}
}
}
WARNING: The snippets use
docker exec -i pentester-mcp, targeting the running Docker container namedpentester-mcp. Ensure the container is running (e.g.docker compose -f src/pentester_mcp/compose-files/docker-compose.example-kali.yml up -d) before using the AI assistant. Theconfigs/.yamlargument is the path inside the container; the same files live locally undersrc/pentester_mcp/configs/.
Contributing & Architecture
The Python scripts in the src/pentester_mcp/tools/ directory are auto-generated from YAML cheat sheets to guarantee consistent API design (proper timeouts, truncating outputs to >8000 chars, no shell=True vulnerabilities). Only security- and pentest-specific tools are included; generic sysadmin utilities are intentionally excluded (the kubectl wrapper is kept for Kubernetes attack-surface checks like RBAC enumeration and secret viewing).
If you have a request for a new tool to be added, please feel free to open an issue.
Disclaimer
Legal Disclaimer: This project is created strictly for educational purposes, authorized auditing, and ethical hacking. The developers of Pentester-MCP assume no liability and are not responsible for any misuse or damage caused by this software. Never use these tools against environments you do not own or do not have explicit, written permission to test.
Star History
Install
docker exec -i pentester-mcp uv run --no-sync --project /app pentester-mcp configs/example-config.yamlConfiguration
{
"mcpServers": {
"pentester_mcp": {
"command": "docker",
"args": [
"exec",
"-i",
"pentester-mcp",
"uv",
"run",
"--no-sync",
"--project",
"/app",
"pentester-mcp",
"configs/example-config.yaml"
]
}
}
}