Authorization-gated penetration testing MCP server for agentic AI
pip install pentester-mcp==0.5.0 Copy PIP instructions
Every network-touching tool refuses to run without an engagement file that records the client's written authorization and the exact in-scope targets. The gate lives in code, not in a prompt, so no conversation can talk the plugin into testing something it is not allowed to test.
Requires Python 3.10+. External tools are optional: when missing, the related tool reports available: false and the built-in capabilities (TCP port scan, TLS audit, header audit, crawl, reflection, CORS, JWT) keep working.
pipx install pentester-mcp # recommended: isolated per user # or uvx --from pentester-mcp pentest-mcp --version # or pip install --user pentester-mcp Naming note: the PyPI package is pentester-mcp (the name pentest-mcp is blocked by PyPI's similarity guard because pentestmcp/mcp-pentest exist), while the command you run and the GitHub repo stay pentest-mcp.
Do not install into a shared environment (conda base, system Python, or an existing project's venv). The mcp dependency pulls in starlette>=1 and pyjwt, which breaks packages pinned to older versions (e.g. fastapi<0.50, djangorestframework-simplejwt). Use pipx, uv tool, or a dedicated venv — every one of the commands above is isolated by design.
If you already installed into a shared environment:
pip uninstall -y pentester-mcp mcp sse-starlette pip install "starlette<0.49" "pyjwt<2.10" # restore what fastapi/simplejwt need uv tool install pentester-mcp # isolated install instead Update an existing install (registrations and client configs stay as they are):
pipx upgrade pentester-mcp # or: uv tool upgrade pentester-mcp # or pip install -U pentester-mcp Then restart the MCP client (Claude Code/Desktop, Cursor, ...) so it reloads the tool list, and confirm with pentest-mcp --version. uvx --from pentester-mcp runs fetch the latest version on every invocation — nothing to update.
cd pentest-mcp python3 -m venv .venv source .venv/bin/activate pip install -e . Optional external tools and API keys:
brew install nmap nuclei sqlmap sslscan nikto ffuf metasploit wpscan testssl hydra # sudo apt-get install nmap sqlmap sslscan nikto ffuf metasploit-framework testssl.sh hydra export SHODAN_API_KEY=... # pentest_osint_shodan export NVD_API_KEY=... # raises NVD rate limits export ZAP_API_URL=http://127.0.0.1:8080 export ZAP_API_KEY=... export BURP_API_URL=https://127.0.0.1:1337 export BURP_API_KEY=... export BURP_AUTH_STYLE=bearer # or 'apikey' for X-API-Key export DEFECTDOJO_URL=https://dojo.example.com export DEFECTDOJO_API_KEY=... Burp and ZAP report import needs no API at all — export from the GUI, then call pentest_burp_import(path) or pentest_zap_import(path).
pentest-mcp --install detects the agents installed on your machine and writes the MCP entry into each of their configs:
pentest-mcp --list-agents # see what was detected pentest-mcp --install --dry-run # preview, writes nothing pentest-mcp --install # register everywhere pentest-mcp --install --project # also write .mcp.json in the current repo pentest-mcp --uninstall # remove the entry again Supported auto-detection: Claude Code (user + project scope), Claude Desktop, Cursor, Windsurf, Cline, Roo Code, Zed, OpenCode, Continue. Existing config entries are preserved; re-running is idempotent. Restart the agent afterwards.
claude mcp add pentest-mcp -- $(which pentest-mcp) or in .mcp.json / ~/.claude.json:
{ "mcpServers": { "pentest-mcp": { "command": "pentest-mcp" } } } OpenCode opencode.json:
{ "mcp": { "pentest-mcp": { "type": "local", "command": ["pentest-mcp"] } } } Cursor / Windsurf / Cline / Roo Code / Claude Desktop In the respective MCP config (~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json, cline_mcp_settings.json, claude_desktop_config.json):
{ "context_servers": { "pentest-mcp": { "command": { "path": "pentest-mcp", "args": [] } } } } Continue In ~/.continue/mcpServers.yaml:
The agent skills ship inside the package — export them into your agent's skills directory:
pentest-mcp --export-skills ~/.claude/skills # Claude Code, global pentest-mcp --export-skills .claude/skills # per project pentest-guardrails — engagement rules: authorization, scope, no-DoS, sensitive-data handling, when to refuse. pentest-workflow — end-to-end methodology: recon → OSINT → scan → web → exploit → report. Engagement file No engagement file, no active tools. Generate a starter and edit it:
pentest-mcp --export-engagement-template engagement.json Key fields:
Run a security assessment against https://app.example.com, engagement file: ./engagement.json The agent loads the engagement first, then works the methodology from the pentest-workflow skill. Outputs land in evidence_dir:
Once published, anyone in the world can install and self-register with two lines:
uv tool install pentester-mcp # or: pipx install pentester-mcp pentest-mcp --install Maintainer — one-time setup and release flow:
Push the repository to GitHub/GitLab as keselyoleren/pentest-mcp and fill in [project.urls] in pyproject.toml. The PyPI project name is pentester-mcp (pentest-mcp itself is blocked by PyPI's similarity guard against the existing pentestmcp/mcp-pentest projects).
Configure PyPI Trusted Publishing (recommended, no long-lived token): pypi.org → project pentester-mcp → Publishing → add a pending publisher with your repo and workflow release.yml, environment pypi. Alternative: create a PyPI API token and use twine upload with __token__.
python -m build twine upload --repository testpypi dist/* uv tool install --index-url https://test.pypi.org/simple/ pentester-mcp Release with a tag — CI (.github/workflows/release.yml) runs the tests, publishes to PyPI, and attaches the wheel to a GitHub Release:
git tag v0.3.0 && git push origin v0.3.0 Manual fallback: python -m build && twine upload dist/*
Distribution without PyPI works too and keeps the same user experience:
pipx install git+https://github.com/keselyoleren/pentest-mcp.git uv tool install --from git+https://github.com/keselyoleren/pentest-mcp.git pentest-mcp End users never need the repository: the wheel carries the MCP server, the skills (pentest-mcp --export-skills), and the engagement template (pentest-mcp --export-engagement-template). Pair public distribution with the authorization gates in the security model — the tools refuse out-of-scope targets no matter where the package came from.
The model: every tester runs their own local instance — perfect isolation per process, each with their own engagement file and evidence, no shared server to operate or defend. Distribute through any channel from "Publish publicly" above.
pipx install pentester-mcp==0.3.0 pentest-mcp --install pentest-mcp --export-skills ~/.claude/skills pentest-mcp --export-engagement-template engagement.json # edit engagement.json, then: pentest_load_engagement Suggested team conventions:
pentest-mcp/ ├── pyproject.toml # PyPI metadata, pentest-mcp entry point ├── LICENSE ├── src/pentest_agent/ │ ├── engagement.py # scope matching + authorization gate │ ├── state.py # gate() used by every tool │ ├── runner.py # bounded binary execution + rate limiter │ ├── audit.py # append-only audit trail │ ├── findings.py # finding model + JSONL store │ ├── assets.py # asset inventory (hosts, services, tech) │ ├── patterns.py # secret/endpoint patterns + redaction │ ├── installer.py # --install agent auto-detection │ ├── engagement.example.json # bundled engagement template │ ├── server.py # 83 MCP tools + onboarding CLI │ ├── skills/ # bundled into the wheel │ │ ├── pentest-guardrails/SKILL.md │ │ └── pentest-workflow/SKILL.md │ └── tools/ │ ├── recon.py # DNS, WHOIS, subdomains, port scan, fingerprint │ ├── osint.py # crt.sh, Wayback, JS secrets, cloud, takeover, Shodan │ ├── vulnscan.py # nmap(+presets), nuclei, TLS, testssl, wpscan, CVE lookup │ ├── webapp.py # headers, crawl, dirbust, reflection, params, CORS, │ │ # JWT, open redirect, host header, secrets, sqlmap │ ├── exploit.py # searchsploit, Metasploit check/run, msfvenom, hydra │ ├── ctf.py # CTF: encodings, crypto, RSA, forensics, stego, pwn, probes │ ├── orchestrate.py # assess_web, attack_surface │ ├── integrations.py # Burp, OWASP ZAP, DefectDojo │ └── report.py # findings, Markdown/HTML/SARIF/generic JSON, CVSS, remediation └── tests/ # 64 tests: scope, gates, redaction, CVSS, SARIF, JWT, # integrations, CLI, installer, CTF Development pip install -e ".[dev]" pytest See CONTRIBUTING.md for the ground rules (gate integrity, redaction, tests) and CHANGELOG.md for release history. Probe the tool surface without an agent:
npx @modelcontextprotocol/inspector $(which pentest-mcp) Usage restrictions This plugin is for security assessments that are authorised in writing. Testing systems without authorization is a criminal offence in most jurisdictions, including under Indonesia's ITE Law. The in-code scope gates limit accidental damage, but legal responsibility stays with the operator and their organisation.
Both files in this release have provenance metadata.
agent mcp osint pentest security vulnerability-scanning
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




