ZAP
HTTP-SSE向AI代理暴露OWASP ZAP安全扫描的MCP服务器
向AI代理暴露OWASP ZAP安全扫描的MCP服务器
IMPORTANT This project is a work in progress and is not yet production-ready. It is intended for educational purposes and to demonstrate the capabilities of the Model Context Protocol (MCP) with OWASP ZAP.
NOTE This project is not affiliated with or endorsed by OWASP or the OWASP ZAP project. It is an independent implementation of the Model Context Protocol (MCP) for use with OWASP ZAP.
A Spring Boot application exposing OWASP ZAP as an MCP (Model Context Protocol) server. It lets any MCP‑compatible AI agent (e.g., Claude Desktop, Cursor) orchestrate ZAP actions—spider, active scan, import OpenAPI specs, and generate reports.
flowchart LR subgraph "DOCKER COMPOSE" direction LR ZAP["OWASP ZAP (container)"] MCPZAP["MCP ZAP Server"] MCPFile["MCP File System Server"] Client["MCP Client (Open Web-UI)"] Juice["OWASP Juice-Shop"] Petstore["Swagger Petstore Server"] end MCPZAP <-->|HTTP/SSE + MCPO| Client MCPFile <-->|STDIO + MCPO| Client MCPZAP -->|ZAP REST API| ZAP ZAP -->|scan, alerts, reports| MCPZAP ZAP -->|spider/active-scan| Juice ZAP -->|Import API/active-scan| Petstore
git clone https://github.com/dtkmn/mcp-zap-server.git cd mcp-zap-server export LOCAL_ZAP_WORKPLACE_FOLDER=$(pwd)/zap-workplace # or any other folder you want to use as ZAP's workspace docker-compose up -d

Open http://localhost:3000 in your browser, and you should see the Open Web-UI interface.


Once it is done, you can check the Prompt Examples section to see how to use the MCP ZAP server with your AI agent.
docker-compose logs -f
docker-compose logs -f <service_name>
zap${LOCAL_ZAP_WORKPLACE_FOLDER} to the container path /zap/wrk.open-webuimcpohttp://mcp-server:7456/sse.mcp-serverzap service.${LOCAL_ZAP_WORKPLACE_FOLDER} to /tmp to allow file access.mcpo-filesystemopen-webuijuice-shoppetstoreTo stop and remove all the containers, run:
docker-compose down
./gradlew clean build
{ "mcpServers": { "zap-mcp-server": { "command": "java", "args": [ "-Dspring.ai.mcp.server.stdio=true", "-Dspring.main.web-application-type=none", "-Dlogging.pattern.console=", "-jar", "/PROJECT_PATH/mcp-zap-server/build/libs/mcp-zap-server-0.1.0-SNAPSHOT.jar" ] } } }
{ "mcpServers": { "zap-mcp-server": { "protocol": "mcp", "transport": "http", "url": "http://localhost:7456/sse" } } }


