Wraps OWASP ZAP in an MCP interface so agents can run web security scans without writing glue scripts. Ships with Docker Compose for self-hosting, includes guided tools for spider, active scan, passive scan, API imports, and report generation, plus lower-level ZAP context and user controls when you need them. Uses API key or JWT auth by default, enforces rate limits and URL validation to block private networks, and stores scan history in Postgres for multi-replica deployments. Reach for this when you want Claude to orchestrate security testing workflows against authorized targets with operator guardrails, not full ZAP API access.
Give AI agents a safe, self-hosted OWASP ZAP operator for guided web security scans, findings, reports, and production guardrails.
Note This project is not affiliated with or endorsed by OWASP or the OWASP ZAP project. It is an independent implementation.
mcp-zap-server exposes OWASP ZAP through MCP over streamable HTTP so agentic tools can run operator-controlled security workflows without brittle glue scripts or unsafe scanner access.
Use it when you want:
Full documentation: danieltse.org/mcp-zap-server
Watch the demo: browser demo or YouTube
Prerequisites:
docker compose)git clone https://github.com/dtkmn/mcp-zap-server.git
cd mcp-zap-server
./bin/bootstrap-local.sh
./dev.sh
./bin/self-serve-doctor.sh
Those scripts are the supported local happy path, not hidden magic:
bootstrap-local.sh creates .env, generates local API keys, and prepares the ZAP workspace.dev.sh starts the Docker Compose stack with the faster JVM image.self-serve-doctor.sh checks Docker, auth, MCP initialize, tools/list, guided tools, and a harmless tool call.Then open:
http://localhost:3000http://localhost:7456/mcpexamples/cursor/mcp.jsonWhen scanning the bundled demo targets, use the container URLs that ZAP can reach from inside Compose:
http://juice-shop:3000http://petstore:8080The default Compose stack publishes host ports on 127.0.0.1 only. Set MCP_ZAP_BIND_ADDRESS=0.0.0.0 only when you intentionally expose the stack behind trusted network controls.
Client setup:
This repository includes MCP Registry metadata in .mcp/server.json. The v0.9.0 Docker images are labeled with the MCP server name expected by registry and catalog tooling.
Docker Compose remains the easiest installation path because the MCP server is designed to operate with an OWASP ZAP sidecar and explicit auth keys. The OCI package metadata is for advanced standalone installs where OWASP ZAP is already running and reachable from the MCP container.
zap_policy_dry_run and policy-mode configuration.v0.9.0 adds:
mcp-gateway-spring-webflux 0.5.10Read the full notes:
The default posture is intentionally conservative:
api-key mode is the base runtime default.none mode is for explicit local dev/test only.Production and shared deployments should review:
flowchart LR
Client["Open WebUI / MCP Client"] -->|"MCP over Streamable HTTP"| MCP["MCP ZAP Server"]
MCP -->|"ZAP API"| ZAP["OWASP ZAP"]
ZAP -->|"scan"| Target["Authorized target app"]
MCP -->|"reports / findings / history"| Evidence["Evidence + reports"]
For multi-replica queueing, durable Postgres state, claim recovery, and ingress affinity, use the operations docs instead of this README:
ZAP is the first scanner engine, not the whole product boundary. The current public extension work is intentionally small:
mcp-zap-extension-api packages selected policy, protection, evidence, and
metadata contracts without gateway runtime internals.This is not runtime multi-engine support yet. Additional scanner engines need an adapter design and explicit fail-closed capability boundaries before they become product claims.
Start here:
Scanning:
Operations:
mcp-zap-server is the Apache-2.0-licensed open-source core. It is intended to be useful on its own for self-hosted MCP and OWASP ZAP workflows.
Private or enterprise capabilities may be built as separate extensions around this core. Those extensions are not required to run the OSS project, and enterprise implementation code is not shipped in this repository.
The boundary is intentional:
If this project saves you time or becomes part of your security workflow, you can sponsor the maintainer to support ongoing maintenance.
Agentic Lab offers optional paid support for teams adopting the public core in production. Commercial support is separate from the Apache-2.0-licensed OSS distribution, and the public core should remain usable without private extensions or paid services.
Apache License 2.0. Copyright 2025-2026 Daniel Tse. See LICENSE.
ZAP_API_URLdefault: mcp-zap-zapHostname or URL of a separately running OWASP ZAP daemon reachable from this container.
ZAP_API_PORTdefault: 8090OWASP ZAP API port.
ZAP_API_KEY*secretAPI key configured on the OWASP ZAP daemon.
MCP_API_KEY*secretAPI key clients must send as X-API-Key.
MCP_SERVER_TOOLS_SURFACEdefault: guidedTool surface to expose. Use guided for the safer default workflow, or expert when clients need raw ZAP tools such as zap_report_read.
MCP_SECURITY_MODEMCP_SECURITY_ENABLEDMCP_SECURITY_ALLOW_PLACEHOLDER_API_KEYcom.exploit-intel/eip-mcp
dmontgomery40/pentest-mcp
pantheon-security/notebooklm-mcp-secure
cyanheads/pentest-mcp-server
io.github.akhilucky/ai-firewall-mcp