redpent-tools
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
redpent-tools
A Model Context Protocol (MCP) server that wraps a reconnaissance / web-security CLI toolset (nmap, sqlmap, commix, subfinder, httpx, ffuf, nikto, tls, WHOIS/DNS/email-auth, crt.sh, theHarvester, wayback, Shodan/Censys, …) as safe, scope-gated, audited tools an AI agent can call. It runs as a persistent HTTP MCP service (API-key protected, Docker out of the box) and plugs straight into RedPentAI or any MCP client.
⚠️ AUTHORIZED assessments only. Active scanners stay disabled until you declare scope + an authorization window in
scope.yaml. Every target is scope-checked and every run is recorded. Do not point it at systems you are not explicitly permitted to test.
It keeps three lanes — PASSIVE → BOUNDARY → ACTIVE — and enforces the authorization gates
in code, not just in docs. Every tool run is recorded (JSONL audit trail + SESSION.md).
Quickstart (Docker)
git clone https://github.com/mithun-403/redpent-tools.git && cd redpent-tools
docker compose up -d --build
docker compose logs redpent-tools # copy the auto-generated API key: rpk_…
# → service at http://localhost:8971/mcp (header X-API-Key: rpk_…)Then add it to RedPentAI (or any MCP client) — see Add it to RedPentAI.
Related MCP server: CyberMCP
Lanes & tools
Lane | Tools |
Passive |
|
Boundary (light touch) |
|
Active (gated) |
|
Utility |
|
Resources: scope://current, evidence://<engagement_id>/index, sop://checklist.
Prompt: passive_recon_flow(domain).
Safety model (enforced in code)
scope.yamlis the contract.out_of_scopealways wins. Hostnames are resolved and their IPs are checked againstout_of_scopetoo.Active tools (
nmap/masscan/ffuf/nikto) run only when all hold:active_allowed: true, current time insideactive_window, caller passesconfirm_authorized=true, andengagement_idmatches the scope. Any failure returns a clear error naming the failed gate — and is audited asblocked.Clamps:
masscan --rate ≤ masscan_max_rate,ffuf -t ≤ ffuf_max_threads,nmap -T ≤ nmap_max_timing. Intrusive NSE categories (brute/dos/intrusive/exploit/vuln) are refused unlessallow_intrusive_nse: true.CDN/cloud protection: CDN IPs are flagged; direct scanning of a CDN netblock IP is refused (scan the in-scope hostname instead).
Strict input validation: domain/IP/CIDR/port regexes; wordlists must live inside the allowed wordlists dir; no arbitrary flags ever reach a subprocess; never
shell=True.No secrets leak: API keys live in env vars; tool output is secret-masked before it is returned or written to evidence.
Takeover is DETECT-ONLY — the server never claims a dangling resource.
Install
Recommended: one command (installs the app and its CLI tools)
./bootstrap.sh # venv + Python package + all CLI tools for this OS
./bootstrap.sh --passive # ... passive + boundary tools onlybootstrap.sh creates .venv, installs the package, then installs the recon CLI tools
(nmap, subfinder, httpx, ffuf, theHarvester, …) using the right package manager
for your OS. After it finishes the whole application and its tools are ready.
Equivalent via make: make install then make tools (or just make tools to (re)install
tools into an existing install).
How "tools install with the project" works
The package exposes a console command
redpent-tools-install([all|--passive|--check]) that installs (or checks) the CLI tools for the current OS.setup.pyregisters a best-effort post-install hook, so a legacypython setup.py install/pip install .also triggers the tool install.Note: a modern
pip install -e .uses the PEP 517 build backend, which does not run setup.py hooks — sobootstrap.sh(orredpent-tools-install) is the reliable path and is what the docs above use. SetREDPENT_SKIP_TOOL_INSTALL=1to opt out.
Manual: Python package, then CLI tools
pip install -e . # or: pip install -r requirements.txt
redpent-tools-install all # OS-aware tool install (same as ./install.sh)
redpent-tools-install --check # report which tools are present/missingThe underlying OS-aware scripts can also be run directly:
./install.sh # macOS / Linux (brew / apt / dnf / pacman / apk + go install)
./install.sh --check
.\install.ps1 # Windows (winget / choco / scoop + go install)If Go tools aren't on PATH: export PATH="$PATH:${GOBIN:-$HOME/go/bin}" (the server also
resolves them from $GOBIN/~/go/bin automatically).
Or just use Docker (all tools preinstalled, Kali base)
docker build -t redpent-tools .
docker run --rm -i \
-v "$PWD/scope.yaml:/app/scope.yaml:ro" \
-v "$PWD/evidence:/app/evidence" redpent-toolsConfigure an engagement
cp scope.example.yaml scope.yaml
$EDITOR scope.yaml # set engagement_id, in/out scope, active_allowed, windowStart with active_allowed: false. Flip it to true (and set active_window) only once
the RoE for that engagement covers active testing — per SOP §1.5 / Appendix U.
Environment variables:
Var | Purpose |
| path to scope.yaml (default |
| evidence root (default |
| allowed wordlists dir (default |
| Shodan tools |
| Censys search |
Run
python -m redpent_tools.server # stdio (Claude Desktop / Claude Code)
python -m redpent_tools.server --http # streamable HTTP on 127.0.0.1:8971
./run.sh # HTTP service (reads ./scope.yaml)Run as a persistent HTTP MCP service with an API key (Docker)
This is the "separate entity" mode RedPentAI integrates with. The Docker image auto-generates an API key on first start, persists it to a volume, and prints it to the logs:
docker build -t redpent-tools .
docker run -d --name redpent-tools -p 8971:8971 \
-v "$PWD/scope.yaml:/app/scope.yaml:ro" \
-v redpent-data:/data -v "$PWD/evidence:/app/evidence" redpent-tools
docker logs redpent-tools # <-- copy the printed rpk_… API keyThe key is generated by
redpent-tools-keygenand saved at/data/redpent-api-key(stable across restarts). Supply your own with-e REDPENT_API_KEY=rpk_…to skip generation.The service then requires that key on every
/mcprequest (X-API-Key: rpk_…orAuthorization: Bearer rpk_…); requests without it get401.Running on the host instead? Set
REDPENT_API_KEYyourself (redpent-tools-keygenprints one) before./run.sh; with no key set, the host service runs unauthenticated (bind to 127.0.0.1 only).
Add it to RedPentAI
In RedPentAI → System → MCP → Add server (or the RedPent Tools preset):
transport:
httpurl:
http://localhost:8971/mcpenv (sent as request headers):
X-API-Key=rpk_…(the key fromdocker logs)
Save → Refresh tools → the 29 tools appear. RedPentAI now calls the running service over HTTP (authenticated) and the tools serve each request back.
Troubleshooting "No tools discovered"
An MCP client discovers tools by starting the server and asking it to list them. If the client shows no tools:
Command not found. The client must be able to launch the server. Either install it so
redpent-toolsis on PATH (pipx install /path/to/redpent-tools) or point the client at the absolute path, e.g.…/redpent-tools/.venv/bin/redpent-tools. A bareredpent-toolsfails if the client's process PATH doesn't include your venv/~/.local/bin.Scope file. The server starts even with no
scope.yaml(it runs UNCONFIGURED and still lists all tools), but setREDPENT_SCOPE_FILEto a real scope so tools actually run against targets. A missing file only prints a stderr warning — it never blocks discovery.Verify from a shell:
REDPENT_SCOPE_FILE=/abs/scope.yaml /abs/.venv/bin/redpent-toolsshould start without a traceback.
Register with Claude Code / Claude Desktop
Add to your MCP config (~/.claude.json / claude_desktop_config.json):
{
"mcpServers": {
"redpent-tools": {
"command": "python",
"args": ["-m", "redpent_tools.server"],
"cwd": "/path/to/redpent-tool",
"env": {
"REDPENT_SCOPE_FILE": "/path/to/redpent-tool/scope.yaml",
"REDPENT_EVIDENCE_DIR": "/path/to/redpent-tool/evidence",
"SHODAN_API_KEY": "",
"CENSYS_API_ID": "",
"CENSYS_API_SECRET": ""
}
}
}
}Or via the CLI:
claude mcp add redpent-tools -- python -m redpent_tools.server
# (run from the repo dir, or add --env REDPENT_SCOPE_FILE=/abs/path/scope.yaml)Docker variant:
{ "mcpServers": { "redpent-tools": {
"command": "docker",
"args": ["run","--rm","-i",
"-v","/abs/scope.yaml:/app/scope.yaml:ro",
"-v","/abs/evidence:/app/evidence","redpent-tools"]
}}}Evidence & audit layout
evidence/<engagement_id>/
audit.jsonl # one JSON object per tool run (allowed/blocked/error/ok)
SESSION.md # human-readable one-line-per-run log
<tool>/<timestamp>.txt # full raw output of each run (secret-masked)
RECON-REPORT.md # built by recon_report (SOP §4.3)Tests
pip install -e ".[dev]"
pytest -qCovers scope matching (wildcards/CIDRs/OOS-wins), the active gate (every failing condition), rate clamping, input validation, and output parsing from saved samples. No network is touched by the tests.
License / use
Maintained by Mithun. Use only against assets you are explicitly authorized to test.
This server cannot be deployed
Maintenance
Related MCP Connectors
Exposes FEDLIN's public security scanners as agent-callable tools over Streamable HTTP.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Pay-per-call cybersecurity for AI agents: vuln scans, threat intel, compliance, code security.
WAF-bypass web scraper and passive URL mapper for AI agents with zero pay-on-fail.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceExposes 21 tools over stdio that let any MCP-capable AI agent run real Kali-container security tools (nmap, nuclei, sqlmap, Metasploit), search a local 59,000+ CVE vulnerability database, and browse a 5,266-entry GitHub security tool index. Built-in guardrails refuse government, education, and military domains, and only whitelisted in-container executables can be invoked.2-
- AlicenseBqualityBmaintenanceEnables AI agents to conduct authorized pentests and bug-bounty workflows with scope enforcement, audit logging, reconnaissance, safe vulnerability checks, payload/wordlist generation, and professional report generation.14MIT
- AlicenseNot gradedqualityAmaintenanceEnables professional penetration testers to drive recon and exploitation tooling — including nmap, gobuster, nikto, John the Ripper, hashcat, subfinder, ffuf, nuclei, hydra, and sqlmap — over stdio, Streamable HTTP, or SSE transports with bearer/OIDC auth. Also supports wordlist generation, engagement record capture, and automated client report creation with scope-of-work handling.298 npmGPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables professional penetration testers to run reconnaissance and exploitation tooling—nmap, gobuster, nikto, John the Ripper, hashcat, subfinder, httpx, ffuf, nuclei, hydra, and SQLi extraction sweeps—alongside wordlist generation, engagement-record capture, and client report creation. Supports stdio, Streamable HTTP, and legacy SSE transports with bearer-token/OIDC authentication.298 npmGPL 3.0