PluginBench
MCP Server
Active
Apache-2.0

MCP ZAP Server MCP Server

io.github.dtkmn/mcp-zap-server

Safe, self-hosted OWASP ZAP operator for AI-guided web security scans with operator control and production guardrails.

What is the MCP ZAP Server MCP server?

The MCP ZAP Server is an MCP server that exposes OWASP ZAP through a secure, self-hosted interface for agentic security scanning. It provides guided workflows for spider, active scan, passive scan, API imports, findings, and reports—all with operator control through API-key or JWT authentication, tool scopes, and runtime policy bundles.

MCP ZAP Server lets AI agents run operator-controlled web security scans without brittle glue scripts or unsafe scanner access. It combines safe agentic scanning with expert ZAP control, self-hosted Docker Compose or Kubernetes deployment, and production guardrails like rate limits, workspace quotas, and audit events. Use it to automate security assessments while maintaining operator oversight and compliance.

How to install MCP ZAP Server

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • ZAP_API_URL

    Hostname or URL of a separately running OWASP ZAP daemon reachable from this container.

  • ZAP_API_PORT

    OWASP ZAP API port.

  • ZAP_API_KEY
    required
    secret

    API key configured on the OWASP ZAP daemon.

  • MCP_API_KEY
    required
    secret

    API key clients must send as X-API-Key.

  • MCP_SERVER_TOOLS_SURFACE

    Tool surface to expose. Use guided for the safer default workflow, including report readback. Use expert only when clients need raw ZAP tools outside the guided surface.

  • MCP_SECURITY_MODE
  • MCP_SECURITY_ENABLED
  • MCP_SECURITY_ALLOW_PLACEHOLDER_API_KEY
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcp-zap-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/dtkmn/mcp-zap-server:v0.11.0",
        "--network",
        "mcp-zap-network",
        "--user",
        "1000:1000",
        "-p",
        "127.0.0.1:7456:7456",
        "-v",
        "mcp-zap-wrk:/zap/wrk"
      ],
      "env": {
        "ZAP_API_URL": "<YOUR_ZAP_API_URL>",
        "ZAP_API_PORT": "<YOUR_ZAP_API_PORT>",
        "ZAP_API_KEY": "<YOUR_ZAP_API_KEY>",
        "MCP_API_KEY": "<YOUR_MCP_API_KEY>",
        "MCP_SERVER_TOOLS_SURFACE": "<YOUR_MCP_SERVER_TOOLS_SURFACE>",
        "MCP_SECURITY_MODE": "<YOUR_MCP_SECURITY_MODE>",
        "MCP_SECURITY_ENABLED": "<YOUR_MCP_SECURITY_ENABLED>",
        "MCP_SECURITY_ALLOW_PLACEHOLDER_API_KEY": "<YOUR_MCP_SECURITY_ALLOW_PLACEHOLDER_API_KEY>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • Guided Spider — Intent-first tool for web crawling and site discovery
  • Active Scan — Automated active vulnerability scanning
  • Passive Scan — Passive analysis of discovered content
  • API Imports — Import and scan API schemas
  • Findings — Query and summarize security findings
  • Reports — Generate and retrieve HTML security reports
  • Scan History — Access queued and completed scan history
  • Expert ZAP Control — Lower-level tools for advanced ZAP context, user, scan, and report workflows
  • Client Spider — Browser-based crawling for JavaScript applications with optional guided login
  • AJAX Spider — Specialized crawling for AJAX-heavy applications

Use cases

  • Automated security scanning of web applications with AI guidance and operator oversight
  • Crawling and passive analysis of target applications to discover vulnerabilities before active scanning
  • Importing and scanning REST or GraphQL APIs from OpenAPI/Swagger schemas
  • Generating security assessment reports and findings summaries for compliance and remediation
  • Authenticated scanning of login-protected applications using managed credential profiles

MCP ZAP Server MCP server FAQ

What is the MCP ZAP Server?

It is an MCP server that wraps OWASP ZAP to let AI agents like Claude run guided security scans with operator control, self-hosted deployment, and production guardrails.

Is it free?

Yes, MCP ZAP Server is Apache-2.0-licensed open source. Optional commercial support is available separately from Agentic Lab.

How do I install it in Cursor or Claude?

Deploy the Docker Compose stack locally, then configure your MCP client with the endpoint `http://localhost:7456/mcp` and the `X-API-Key` header from the generated `.env` file. Example Cursor config is in `examples/cursor/mcp.json`.

What authentication is required?

API-key mode is the default (send `X-API-Key` header). Optional JWT mode with refresh and revocation is available for production. Target authentication is optional and managed separately via credential profiles.

Can I scan production applications?

Yes, but only with explicit authorization. URL validation blocks localhost and private networks by default. Review the Security Modes and Production Readiness Checklist documentation before scanning production.

Does it require ZAP to be pre-installed?

No. The Docker Compose stack includes ZAP as a sidecar. For standalone OCI deployment, ZAP must already be running and reachable from the MCP container.

README (reference)

Source of truth, from the repository.

<p align="center"> <img src="images/brand.png" alt="MCP ZAP Server logo" width="180"> </p> <h1 align="center">MCP ZAP Server</h1> <p align="center"> Give AI agents a safe, self-hosted ZAP operator for guided web security scans, findings, reports, and production guardrails. </p> <p align="center"> <img src="https://img.shields.io/github/stars/dtkmn/mcp-zap-server?style=social" alt="GitHub stars"> <img src="https://img.shields.io/github/forks/dtkmn/mcp-zap-server?style=social" alt="GitHub forks"> <img src="https://img.shields.io/github/v/tag/dtkmn/mcp-zap-server" alt="GitHub tag"> <img src="https://img.shields.io/github/license/dtkmn/mcp-zap-server" alt="GitHub license"> </p>

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:

  • safe agentic scanning with guided defaults for spider, active scan, passive scan, API imports, findings, and reports
  • operator control through API-key or JWT auth, tool scopes, runtime policy bundles, rate limits, and audit events
  • self-hosted deployment with Docker Compose for local adoption and Helm for Kubernetes
  • expert ZAP access when you intentionally need lower-level ZAP context, user, scan, and report controls

Full documentation: danieltse.org/mcp-zap-server

Watch the demo: browser demo or YouTube

<a href="https://www.youtube.com/watch?v=9_9VqsL0lNw" target="_blank" rel="noopener noreferrer"> <img src="https://img.youtube.com/vi/9_9VqsL0lNw/hqdefault.jpg" alt="MCP ZAP Server demo video thumbnail" width="480"> </a>

Quick Start

Prerequisites:

  • Docker 20.10+
  • Docker Compose v2 (docker compose)
  • your own MCP client with Streamable HTTP and custom-header support
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:

The 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:

  • Juice Shop scan target: http://juice-shop:3000
  • Petstore scan target: http://petstore:8080

After 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.

Discovery Metadata

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.

What You Get

  • Guided scans: intent-first tools for spider, active scan, passive scan, API imports, findings, reports, and scan history.
  • Expert ZAP control: optional lower-level tools for advanced ZAP context, user, scan, and report workflows.
  • Authentication: API key mode by default, optional JWT mode with refresh and revocation support.
  • Runtime policy bundles: dry-run and enforcement support through zap_policy_dry_run and policy-mode configuration.
  • Scan queue and history: queued active, traditional spider, AJAX Spider, and Client Spider jobs with claim-based recovery, durable Postgres state, and evidence export.
  • Extension contracts: experimental policy, protection, evidence metadata, and extension metadata APIs with sample extension packaging.
  • Operational guardrails: request body limits, rate limits, workspace quotas, tool-scope authorization, structured logs, metrics, and audit events.
  • Deployment paths: local Docker Compose, published JVM container images, and Helm charts for Kubernetes.

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.

Version 0.13.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.

Security Defaults

The default posture is intentionally conservative:

  • api-key mode is the base runtime default.
  • none mode is for explicit local dev/test only.
  • Docker Compose binds published ports to loopback by default.
  • The Java 25 JVM image uses a digest-pinned distroless runtime with no shell or package manager; debug it through logs, metrics, and external diagnostic containers rather than installing tools into the application container.
  • URL validation blocks localhost, private networks, and link-local targets by default.
  • Target authentication is optional and profiles default to an empty list. When enabled, guided auth binds an exact server-side credential reference and login settings to one approved origin; callers provide only profileId and targetUrl.
  • Public auth exchange endpoints are rate-limited.
  • MCP request bodies have a hard early size cap.

Production and shared deployments should review:

Architecture

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:

Extension Model

ZAP is the first scanner engine, not the whole product boundary. The current public extension work is intentionally small:

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.

Documentation Map

Start here:

Scanning:

Operations:

Open Source Core And Extension Model

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:

  • this repository remains the public OSS distribution
  • extension points should be documented and kept stable where practical
  • private extensions must not weaken the security, licensing, or usability of the OSS core
  • security scanning and open-source program entitlements for this repository apply only to this public project

Contributing And Support

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.

Contact Agentic Lab

License

Apache License 2.0. Copyright 2025-2026 Daniel Tse. See LICENSE.

Related MCP servers

ENENTRA Jobs logo

Verified AI/tech jobs from company ATSs: search, fit matching, salary stats; employer job posting

0
TypeScript
MIT
View repository →

Explore Weav customer service pricing, features, comparisons, signup, and demos. No auth required.

View repository →

GitLab MCP server for AI agents to review code, manage merge requests, and enforce code review rules.

9
TypeScript
MIT
View repository →

Google Trends, YouTube, Ads Transparency and Play reviews over plain HTTP. No API key.

0
Python
View repository →

Find local service providers — plumbers, tutors, translators — and estimate provider earnings.

View repository →