
OWASP ZAP MCP Server
io.github.pierre3Published by GitHub account pierre3v1.1.0Updated Oct 25, 2026
MCP server for OWASP ZAP vulnerability scanning with Docker management
Overview
MCP server that lets an AI assistant drive OWASP ZAP vulnerability scans, including spidering, active scans, alerts and reports, with built-in Docker management
- What you can do
- Start, stop, check status and read logs of a ZAP container through Docker Compose tools, or connect to an existing ZAP instance by URL and API key. Crawl targets with the standard and Ajax spiders, including as a specific logged-in user, and monitor scan progress. Run active and passive scans and stop them when needed. Read alerts by risk level with pagination and generate HTML, JSON or XML reports. Manage contexts, authentication methods, users, credentials and forced-user mode for authenticated scans.
- When to use it
- Useful when you want an assistant to run web application security scans against sites you are authorized to test, from a quick passive check to an authenticated active scan with a written report. It suits developers and testers who already use OWASP ZAP and want the scan workflow driven from a chat client.
- Requirements
- Runs locally as a .NET tool, so the .NET 10 SDK is required. Docker with docker compose support is needed for the built-in ZAP container management; otherwise point it at an existing ZAP instance with the ZAP_BASE_URL and ZAP_API_KEY environment variables. The API key is auto-generated when the container is started through the tool.
Installation
In SourceWeft
- Open OWASP ZAP MCP Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
dotnet-zap-mcp
[NuGet] [NuGet Downloads] [Release]
MCP (Model Context Protocol) server for OWASP ZAP. Enables AI agents (Claude, GitHub Copilot, etc.) to drive ZAP vulnerability scanning via MCP.
Features
- 45 MCP tools for controlling OWASP ZAP (scanning, alerts, spider, ajax spider, context, authentication, reports, etc.)
- Built-in Docker Compose management (start/stop ZAP with a single tool call)
- Zero-config setup: auto-generates API keys and extracts Docker assets
- Works with any MCP-compatible client (Claude Desktop, VS Code, etc.)
Installation
Prerequisites
- .NET 10 SDK
- Docker (Docker Engine or Docker Desktop) with
docker composesupport (for built-in ZAP container management)
Configuration
Zero-config (recommended)
No configuration needed. The agent calls DockerComposeUp which automatically:
- Extracts Docker assets to
~/.zap-mcp/docker/ - Generates a random API key
- Starts the ZAP container on
localhost:8090 - Waits for ZAP to become healthy
Data persistence
The ZAP container uses two Docker named volumes:
On the first launch, the template config.xml is copied into zap-home. On subsequent launches, only the API key is updated — any changes made through ZAP (contexts, authentication settings, scan policies, etc.) are preserved.
The zap-data volume contains:
reports/— generated scan reportssessions/— saved ZAP sessionscontexts/— exported context files
Claude Desktop / Claude Code
Add to your MCP configuration:
VS Code (Copilot)
Add to .vscode/mcp.json:
With existing ZAP instance
If you already have a ZAP instance running, pass connection details via environment variables:
Available Tools
Docker Management
ZAP Core
Spider
Active Scan
Passive Scan
Alerts
Reports
Context Management
Authentication
Users
Forced User
Ajax Spider
Typical Workflow
- Agent calls
DockerComposeUpto start ZAP - Configure browser/Playwright to use ZAP as proxy (
http://127.0.0.1:8090) - Browse the target application through the proxy
- Agent calls
StartSpiderto crawl the application, thenGetSpiderStatusto monitor progress - Agent calls
GetPassiveScanStatusto wait for passive scan completion - Agent calls
StartActiveScanon key pages, thenGetActiveScanStatusto monitor progress - Agent calls
GetAlertsSummaryandGetAlertsto retrieve vulnerability findings - Agent calls
GetHtmlReportorGetJsonReportto generate a scan report - Agent calls
DockerComposeDownwhen done
Note: ZAP settings (contexts, authentication, scan policies) are persisted in the
zap-homeDocker volume. You can stop and restart the container without losing configuration.
Try It Out (with the included vulnerable app)
This repository includes an intentionally vulnerable web application for trying out ZAP scanning. The app contains common vulnerabilities (XSS, SQL Injection, CSRF, Open Redirect) so ZAP can detect real findings.
Setup
Then configure your MCP client to connect to this ZAP instance:
The vulnerable app is accessible at
http://targetfrom within the Docker network (used by ZAP), and athttp://localhost:8080from your host machine.
Example 1: Quick Scan
Prompt to agent:
Scan http://target for vulnerabilities. Run a spider crawl, wait for the passive scan to finish, then show me the alert summary and generate an HTML report.
Expected tool flow:
ZAP will discover pages like /search, /login, /users, /about, /contact, and the passive scan will report issues such as missing security headers and CSRF vulnerabilities.
Example 2: Authenticated Scan
The /admin page requires login (username: admin, password: password). An authenticated scan lets ZAP access protected pages.
Prompt to agent:
Set up an authenticated scan for http://target. The login form is at /login with fields "username" and "password" (credentials: admin / password). The logged-in indicator is "Welcome, admin". After configuring authentication, spider the site as the authenticated user and run an active scan.
Expected tool flow:
With authentication configured, ZAP can access /admin and test for vulnerabilities behind the login.
Example 3: Full Vulnerability Assessment
Prompt to agent:
Perform a full vulnerability assessment of http://target. Crawl the site, run an active scan, then give me a detailed breakdown of all discovered vulnerabilities grouped by risk level.
Expected tool flow:
The active scan will detect vulnerabilities including:
- High: SQL Injection (
/users?id=), Cross Site Scripting (/search?q=) - Medium: CSRF (missing tokens on
/login), Open Redirect (/redirect?url=) - Low/Informational: Missing security headers, cookie issues, etc.
Cleanup
License
Source: README.md at commit e9c2b67
Tools
0Version history
1- v1.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts