@cyanheads/pentest-mcp-server
Provides WAF bypass payload templates specific to Akamai WAF, referencing public research for each WAF product variant.
Provides WAF bypass payload templates specific to Cloudflare WAF, referencing public research for each WAF product variant.
Provides WAF bypass payload templates specific to Fortinet FortiWeb WAF, referencing public research for each WAF product variant.
Provides WAF bypass payload templates specific to NGINX with ModSecurity, referencing public research for each WAF product variant.
Provides methodology and test cases aligned with the OWASP Testing Guide, including test case IDs in playbooks and technique mapping.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Public Hosted Server: https://pentest.caseyjhand.com/mcp
Authorized use only. This server is designed for penetration testers, red teamers, CTF players, security researchers, and students working on systems they own or have explicit written authorization to test. Users are solely responsible for ensuring their testing is lawful and appropriately scoped. Unauthorized access to computer systems is illegal — this server does not and cannot enforce authorization on your behalf.
Dual-audience design. Every offensive technique is paired with detection indicators and mitigations. Blue teamers, developers, and anyone building detection coverage will find the methodology and ATT&CK data as useful as the red team workflows.
Overview
An offline methodology engine for authorized penetration testing, CTFs, and security research, built on MITRE ATT&CK, the OWASP Testing Guide, and annotated payload templates. Generate a phased test plan, map techniques to a target, analyze HTTP responses for leaks, and generate or encode payloads, each paired with detection and mitigation context.
Tools
Tool | Description |
| Step-by-step authorized-testing methodology playbook for a chosen attack vector, phase-filterable, with detection and mitigation per technique. |
| Analyzes raw HTTP response headers/body from authorized probing for leakage, fingerprinting, and misconfiguration. |
| Looks up a MITRE ATT&CK technique by ID or keyword, with detection data, mitigations, and procedure examples. |
| Looks up a MITRE ATT&CK threat group or software entry by ID or name, with aliases and technique usage. |
| Ranks ATT&CK techniques and OWASP test cases against a target profile (stack, services, auth type, OS). |
| Generates annotated payload templates for a vulnerability category and injection context, with optional WAF bypass variants and encoding. |
| Applies an ordered encoding chain to a payload string with decode-path tracing. |
Related MCP server: Pentest MCP
Capability reference
pentest_get_guide tool
vector:auth_bypass,idor,ssrf,xss,sqli,xxe,path_traversal,cors,csrf,open_redirect,deserialization,race_condition,ssti,command_injection, orjwt_attack;phase:all(default),recon,enumeration,exploitation, orpost_exploitationPlaybook techniques carry
detectionandmitigation, withowasp_references,attack_technique_ids, and context-derivednextToolSuggestionsOptional
target_context(stack,waf,recon_notes) narrows the playbook
pentest_analyze_response tool
Supply
response_headers(≤20,000 characters),response_body(≤10,000 characters), or both; optionalstatus_code(100–599) andcontext(≤2,000 characters). Missing both response fields returnsno_inputFindings carry
category,severity(info/low/medium/high),detection, andremediation, ordered by severity descendingfingerprints(server_software,framework,language,database,cloud_provider,other) andnextToolSuggestionssupport follow-up calls
pentest_lookup_technique tool
Supply an ATT&CK ID (
T1190,T1059.001) or keyword;include_subtechniquesdefaults totrueReturns tactics, platforms, description,
detection(summary,data_sources,indicators), mitigations, procedure examples, andattack_versionReturns
no_matchwhen the ID or keyword resolves to nothing
pentest_lookup_group tool
Supply an ATT&CK group ID (
G0007), software ID (S0002), or name/keyword; returnsno_matchwhen nothing resolvestypedistinguishesgroupfromsoftware; results includealiases,description(≤800 characters), andattack_versiontechniques_usedreturns up to 20 techniques with procedure context andtechnique_idforpentest_lookup_technique
pentest_map_techniques tool
Supply at least one of
stack,services,auth_type(jwt/session_cookie/api_key/oauth2/basic_auth/ntlm/kerberos/none/unknown), oros(linux/windows/macos/unknown); otherwise returnsno_profileranked_techniquescarriesrelevance_score,relevance_rationale,detection_opportunity,mitigation_summary, and optionalpentest_guide_vector;owasp_test_casesreturns up to 10 caseslimitcaps techniques at 1–50 (default 15); enrichment (truncated,shown,cap) discloses the cap
pentest_generate_payloads tool
category:xss,sqli,ssrf,xxe,path_traversal,ssti,command_injection,open_redirect,csrf,deserialization,jwt,ldap_injection,nosql_injection, orhttp_header;injection_context:html_attribute,html_body,js_string,js_template,js_script_block,url_parameter,url_path,sql_where,sql_integer,xml_element,xml_attribute,http_header,json_value,cookie_value,file_name, orgenericcountcaps templates at 1–20 (default 5); each carriesdetection_signatureandmitigation, with optionalencodingapplied to every templatewaf_profile:cloudflare,aws_waf,modsecurity_crs,imperva,akamai,f5_bigip_asm,nginx_modsecurity,fortinet_fortiwaf,none(default), orunknown; profiles other thannoneaddwaf_bypass_note
pentest_encode_payload tool
payloadaccepts up to 10,000 characters;chainapplies 1–6 steps left to right fromurl,double_url,html_entity,unicode,hex,base64,js_escape,null_byte,mixed_case, orcomment_breakReturns
intermediate_stepsanddetection_note;explain(defaulttrue) addsdecode_pathandbypass_rationaleReturns
encoding_errorwhen a transform fails
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Methodology-specific:
Fully offline at runtime — no external API calls, no credentials required; all data loaded at startup, zero I/O during request handling
MITRE ATT&CK Enterprise embedded at build time via
scripts/refresh-attack.tsand indexed in memory by ID/keyword; fails fast with an actionable error if the data file is missingOWASP Testing Guide methodology and payload template library curated as structured TypeScript modules, one per vector/category
WAF bypass variants keyed by WAF product and attack vector, referencing public research
All tools annotated
readOnlyHint: true,openWorldHint: false— deterministic output from a bounded embedded dataset
Agent-friendly output:
authorized_use_reminderrendered as the first line ofcontent[]on every guide/payload/encoding response — consistent framing regardless of which surface a client forwardsTechniques and payloads require detection and mitigation context; response findings require
detectionandremediationattack_versionechoed on every ATT&CK-backed response so callers can reason about data vintagenextToolSuggestionspre-filled with arguments derived from the current context, reducing agent planning overheadpentest-guide supports response-evidence review and ATT&CK detection coverage assessment; available through plugin installs and the MCP resource
skill://pentest-guide/SKILL.md
Build-time data step
The server embeds MITRE ATT&CK Enterprise data (~20 MB JSON) fetched by a one-time script into a gitignored path. Self-hosters and Docker builders must run this step before the server will start:
bun run scripts/refresh-attack.tsThis downloads the latest ATT&CK Enterprise JSON from the MITRE GitHub release endpoint, writes it to src/data/attack/enterprise.json (gitignored), and updates src/data/attack/version.ts with a version string such as Enterprise v16.1. The version file is committed; the JSON is not (too large for git history).
The Dockerfile handles this automatically — the build stage runs scripts/refresh-attack.ts before the TypeScript compile, so docker build produces a self-contained image.
If you clone the repo and skip this step, attack-service will fail fast at startup with an actionable error message pointing to scripts/refresh-attack.ts.
Run the script quarterly (or before each release) to pull the latest ATT&CK version.
Getting started
Connect to the hosted instance:
claude mcp add --transport http pentest-mcp-server https://pentest.caseyjhand.com/mcpOr run it locally:
claude mcp add pentest-mcp-server -- npx -y @cyanheads/pentest-mcp-serverFor other clients, add this to the MCP config file:
{
"mcpServers": {
"pentest-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/pentest-mcp-server"]
}
}
}No API keys required. For Docker or a source build, see Running the server.
Configuration
No API keys required. The server is fully offline at runtime.
Variable | Description | Default |
| Transport: |
|
| Port for HTTP server. |
|
| Auth mode: |
|
| Log level: |
|
| Enable |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry instrumentation (spans, metrics, completion logs). |
|
| Log failed-call arguments and results (key names redacted; free-form values can still contain secrets). |
|
| OTLP log export destination. | — |
See .env.example for the full list of optional overrides.
With PENTEST_ENABLE_PAYLOAD_GENERATION=false, the two payload tools are absent from MCP discovery and calls.
Running the server
Local development
Requires Bun v1.4.0 or higher (or Node.js v24+), with ATT&CK data seeded before startup.
git clone https://github.com/cyanheads/pentest-mcp-server.git
cd pentest-mcp-server && bun install
cp .env.example .envBuild and run:
# Seed ATT&CK data (first time, or to update) bun run scripts/refresh-attack.ts # Build bun run rebuild # Run bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security audit bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions
Docker
# Build — ATT&CK data is fetched during the build stage
docker build -t pentest-mcp-server .
docker run --rm -p 3010:3010 pentest-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/pentest-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them. The ATT&CK data refresh runs automatically in the build stage.
Project structure
Directory / File | Purpose |
|
|
| Published response-evidence and ATT&CK coverage guide, also served as an MCP resource. |
| MITRE ATT&CK service — loads and indexes the embedded enterprise JSON at startup. |
| OWASP Testing Guide methodology service — vector branches for |
| Payload template service — keyed by category and injection context. |
| Encoding chain executor — pure TypeScript transforms. |
| Pattern library for information leakage and fingerprinting detection. |
| Tool definitions ( |
|
|
| Curated OWASP TG v4.2 methodology content as TypeScript modules. |
| Annotated payload templates by vulnerability category. |
| WAF bypass variants keyed by product and attack vector. |
| Encoding transform functions. |
| Regex patterns and metadata for response leakage detection. |
| Downloads ATT&CK Enterprise JSON and updates the version string. Run once after cloning, then quarterly. |
| Copies the seeded ATT&CK dataset into |
| Unit and integration tests mirroring |
| Design document — tool surface, data strategy, and architectural decisions. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw and the framework catches; catch only to translate an owned operational failure into a declared
ctx.failcontractUse
ctx.logfor request-scoped logging and keep request handling stateless and deterministicRegister new tools via the barrel in
src/mcp-server/tools/index.tsExternal source boundary: validate raw data, normalize to a domain type, then return the output schema; never fabricate missing fields
authorized_use_reminderis a required output field on every tool that produces methodology or payload content — render it as the first line of everycontent[]response informat()Keep detection and mitigation context required on techniques and payloads, and
detectionandremediationrequired on response findings
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
MEOK MCP Hardening MCP — automated security red-team for any MCP server. Maps OWASP LLM Top 10
Enrich, search, assess, and manage threat intelligence through 80+ typed MCP tools.
454 OSINT recon tools + server-side entity correlation & person sweeps. Keyless.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables professional penetration testers to run reconnaissance, scanning, brute-force, exploitation, traffic capture, and reporting workflows through a unified MCP interface with STDIO, Streamable HTTP, and deprecated SSE transports plus bearer/OIDC authentication. Supports tools including nmap, gobuster, nikto, JtR, hashcat, subfinder, httpx, ffuf, nuclei, hydra, sqlmap, and wordlist generation.165 npmGPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables professional penetration testers to drive recon and exploitation tooling — nmap, gobuster, nikto, John the Ripper, hashcat, subfinder, httpx, ffuf, nuclei, hydra, sqlmap, and tcpdump — plus wordlist building and traffic capture from an MCP client. It also stores structured engagement records and generates client reports with scope-of-work handling, over stdio or authenticated Streamable HTTP (SSE deprecated).165 npmGPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables professional penetration testers to run reconnaissance, exploitation, brute-force, traffic capture, and reporting workflows through MCP-compatible stdio, HTTP, and SSE transports with integrated tools such as nmap, gobuster, nikto, John the Ripper, hashcat, and wordlist generation.165 npmGPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables professional penetration testers to orchestrate reconnaissance, web/content scanning, brute-force checks, traffic capture, privilege-escalation auditing, wordlist generation, and client reporting through MCP transports with optional bearer/OIDC authentication.165 npmGPL 3.0