
AI-powered penetration testing MCP server
"In Japanese mythology, the Tengu is a fierce mountain spirit — master strategist, warrior, and trainer of samurai. In cybersecurity, it guides you through every phase of the hunt."
From recon to report — AI-assisted pentesting in one command.
Tengu is an MCP server that turns Claude into a penetration testing copilot. It orchestrates 80 security tools — from Nmap to Metasploit — with built-in safety controls, audit logging, and professional reporting.
Use Claude as an interactive pentest copilot — you direct the engagement, Claude picks the right tools and chains them together automatically.
git clone https://github.com/rfunix/tengu.git && cd tengu
make docker-build
make docker-up
Connect Claude Code to the running server:
claude mcp add --transport sse tengu http://localhost:8000/sse
Then ask Claude: Do a full pentest on http://192.168.1.100
Claude chains tools automatically: validate_target → whatweb → nmap → nikto →
nuclei → sqlmap → correlate_findings → generate_report
| Command | What it starts |
|---|---|
make docker-up | Tengu MCP server (:8000) |
make docker-lab | + Juice Shop, DVWA (safe practice targets) |
make docker-pentest | + Metasploit, OWASP ZAP (real-world targets) |
make docker-full | + Metasploit, ZAP, and lab targets |
Scan custom targets without editing files:
TENGU_ALLOWED_HOSTS="192.168.1.0/24,10.0.0.0/8" make docker-up
Choose the right size for your use case:
| Tier | Size | MCP Tools | Use case |
|---|---|---|---|
minimal | ~480MB | 17 | Lightweight analysis, CVE research, reporting |
core | ~7GB | 47 | Full pentest toolkit (default) |
full | ~8GB | 80 | Everything + AD, wireless, stealth/OPSEC |
TENGU_TIER=minimal make docker-build # lightweight
TENGU_TIER=core make docker-build # default
TENGU_TIER=full make docker-build # everything
All tiers include all 35 prompts and 20 resources — only the binary tools differ.
Prerequisites: Python 3.12+, uv, Kali Linux (recommended)
git clone https://github.com/rfunix/tengu.git && cd tengu
# Install Python dependencies
uv sync
# Install external pentesting tools (Kali/Debian)
make install-tools
# Run the MCP server (stdio transport)
uv run tengu
Connect Claude Code:
claude mcp add --scope user tengu -- uv run --directory /path/to/tengu tengu
Configure allowed targets in tengu.toml:
[targets]
allowed_hosts = ["192.168.1.0/24", "example.com"]
For Claude Desktop, VM/SSE remote setup, and advanced configurations, see docs/deployment-guide.md.
[targets]
# REQUIRED: Only these hosts will be scanned
allowed_hosts = ["192.168.1.0/24", "example.com"]
blocked_hosts = [] # Always blocked, even if in allowed_hosts
[stealth]
enabled = false # Route traffic through Tor/proxy
[stealth.proxy]
enabled = false
type = "socks5h"
host = "127.0.0.1"
port = 9050
[osint]
shodan_api_key = "" # Required for shodan_lookup
[tools.defaults]
scan_timeout = 300 # seconds
See docs/configuration-reference.md for the full reference.
Run a fully autonomous pentest without manual tool invocation. The agent uses Claude as its strategic brain and Tengu as its execution toolset, following the PTES methodology from recon through reporting.
cp .env.example .env
# Edit .env: set ANTHROPIC_API_KEY and TENGU_AGENT_TARGET
Lab targets (Juice Shop, DVWA):
make docker-lab
make docker-agent # default model (sonnet)
make docker-agent-haiku # cheaper — claude-haiku-4-5, max_tokens=1024
make docker-agent-sonnet # balanced — claude-sonnet-4-6, max_tokens=4096
Real-world pentests (Tengu + MSF + ZAP, no lab containers):
make docker-pentest
make docker-agent
View reports in browser:
make docker-report-view # http://localhost:8888 — styled HTML, all reports
make docker-report-browse # same, auto-opens browser
REPORT_PORT=9999 make docker-report-view # custom port
Without Docker:
uv sync --extra agent
python autonomous_tengu.py 192.168.1.100 --scope 192.168.1.0/24 --type blackbox
# Cost-optimised run
python autonomous_tengu.py 192.168.1.100 --model claude-haiku-4-5 --max-tokens 1024 --timeout 30
Cost control — three env vars / CLI flags:
| Flag | Env var | Default |
|---|---|---|
--model | TENGU_AGENT_MODEL | claude-sonnet-4-6 |
--max-tokens | TENGU_AGENT_MAX_TOKENS | 2048 |
--timeout | TENGU_AGENT_TIMEOUT | 60 (minutes, 0=unlimited) |