Safe, self-hosted ZAP operator for guided AI security scans and reports.
Note This project is not affiliated with or endorsed by the ZAP project. It is an independent implementation.
mcp-zap-server exposes 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.The JVM image remains Java 25 end to end: source compilation, bytecode, and
runtime all target Java 25. Its final runtime is distroless, so it intentionally
contains no shell, package manager, or curl. A small built-in HTTP probe keeps
the normal Docker Compose health status; docker compose ps still reports the
MCP service as (healthy) after startup.
Connect your MCP client:
http://localhost:7456/mcpMCP_API_KEY from .env in the X-API-Key headerexamples/cursor/mcp.jsonThe stack runs the MCP server, ZAP, and demo targets. Install and configure your preferred MCP client separately.
When scanning the bundled demo targets, use the container URLs that ZAP can reach from inside Compose:
http://juice-shop:3000http://petstore:8080After connecting, try this first prompt:
Use the guided ZAP tools to crawl http://juice-shop:3000. Wait for the crawl
and passive analysis to finish, show a findings summary, generate an HTML
report, and read it back through MCP. Do not run an active scan.
Expect a completed crawl, a findings summary, and a report the client can read. Finding counts vary; a connection or scan error is not a clean result.
The 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:
There are two independent authentication layers. The API key or JWT lets Cursor call MCP ZAP Server. An optional target-auth profile lets ZAP log in to an application you are authorized to scan. Most first runs need only the MCP API key; never put a target website password in Cursor or an MCP prompt.
This repository includes MCP Registry metadata in .mcp/server.json.
Use metadata from the same version as the image you deploy. The image includes
the MCP server name expected by registry and catalog tooling. Check
GitHub Releases and the
release workflow before installing a versioned image or publishing its package
metadata; repository metadata alone is not proof of image availability.
Docker Compose remains the easiest installation path because the MCP server is designed to operate with a ZAP sidecar and explicit auth keys. The OCI package metadata is for advanced standalone installs where ZAP is already running and reachable from the MCP container.
zap_policy_dry_run and policy-mode configuration.In v0.13.0, Client Spider and browser authentication profiles support direct and queued browser crawling. See the Client Spider guide for setup, authenticated crawling, and reports. These features are not included in v0.12.0.
See GitHub Releases for the latest published version and its publication date. Version-specific documentation describes that version's behavior; it does not announce image availability. Deploy only after the corresponding release workflow succeeds and the versioned image is available in your registry.
In v0.13.0, Client Spider explores JavaScript applications in direct and
queued workflows, with optional guided browser login and automatic session
detection for cookies and header tokens. Upgrade all workers sharing a queue
before submitting Client Spider jobs, and review the browser prerequisites and
timeout settings in the release notes. Preparing or merging this version does
not publish its release or container images.
The default posture is intentionally conservative:
api-key mode is the base runtime default.none mode is for explicit local dev/test only.profileId and targetUrl.Production and shared deployments should review:
flowchart LR
Client["Your MCP Client"] -->|"MCP over Streamable HTTP"| MCP["MCP ZAP Server"]
MCP -->|"ZAP API"| ZAP["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 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.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
docker run -i --rm ghcr.io/dtkmn/mcp-zap-server:v0.14.0Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-dtkmn-mcp-zap-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/dtkmn/mcp-zap-server:v0.14.0"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceghcr.io/dtkmn/mcp-zap-server:v0.14.0dockerMCP ZAP Server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.