Skip to content

dtkmn/mcp-zap-connect

v0.18.0Apache-2.0

Set up MCP ZAP locally with Codex, Cursor or Claude Code. Check readiness before scans and approve recovery steps when needed.

MCP ZAP Connect

A skills-only plugin by Daniel Tse that guides local MCP ZAP Server setup in Codex, Cursor or Claude Code using the project's Docker Compose release images. It starts or reconnects the same scanner when requested, configures the selected client's private MCP connection and verifies status without starting a scan. Installing the plugin alone does not start Docker or register MCP tools.

Claude Desktop Chat uses the separate MCPB preview with local agent-callable setup tools. It reuses the same Docker scripts and scanner. Install the .mcpb in Desktop Chat; use the plugin below for Claude Code.

Versions and Release Pins

Normal GitHub installations select a published repository tag, not main. Starting with 0.18.0, fresh scanner setup uses the same release as the plugin.

Release tagPlugin versionScanner checkout and image for fresh setup
v0.18.00.18.0v0.18.0
v0.17.10.5.0v0.17.1

Use the 0.18.0 installation commands below once its tag is available in GitHub Releases and the dtkmn/mcp-zap-server:v0.18.0 image is available for your platform on Docker Hub. Until then, use v0.17.1 in the marketplace and checkout commands to install plugin 0.5.0. For that version, give the setup skill the prepared v0.17.1 checkout at commit 02161be8f30cd3d3b18e7eb0a4d3dcd77c0bec7a and select the v0.17.1 image. See the tagged scanner guide.

Requirements

  • A local Codex, Cursor or Claude Code session with permission to execute commands on the scanner's machine.
  • The selected client's installation tools. Codex commands below require the Codex CLI; its desktop app's bundled CLI can be used without another copy. Claude Code commands require claude.
  • Docker with its engine running and Compose supporting --wait and --wait-timeout.
  • Bash, Git, curl and HTTPS access to api.github.com for release verification before setup, recovery or the start of a new scan workflow.

Java and ZAP run in containers, so a separate Java installation is unnecessary. Web-only chats cannot reach the local scanner.

After plugin installation, the setup skill can help install missing scanner prerequisites with your approval, then recheck and continue. Codex CLI and Git must be available for the direct GitHub installation commands below; the CLI is not an additional requirement once the Desktop skill is loaded.

Install

Install the plugin locally in Codex using the steps below. After installation, ask its setup skill to check prerequisites, start or reuse the Docker stack, and configure your private client connection. You normally do not need to edit the client's configuration yourself. Review any permissions requested by the client; scans require a separate request.

Check The Codex CLI

The installation commands use the Codex CLI (codex). On macOS, run this in your terminal, or ask your desktop agent to run it before installing the plugin. It keeps an existing codex command and checks common desktop-app locations only when the command is missing:

if ! command -v codex >/dev/null 2>&1; then
  for codex_dir in \
    "/Applications/ChatGPT.app/Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS" \
    "/Applications/Codex.app/Contents/Resources" \
    "$HOME/Applications/ChatGPT.app/Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS" \
    "$HOME/Applications/Codex.app/Contents/Resources"
  do
    if [ -x "$codex_dir/codex" ]; then
      export PATH="$codex_dir:$PATH"
      break
    fi
  done
fi
codex --version
command -v codex

The PATH change lasts only for this terminal session; use the same terminal for the installation commands below. The block prints the version and CLI path. An agent using separate command sessions should use that executable's full path for subsequent commands, since a PATH change does not carry between shells. It does not edit shell startup files, Codex connections or Docker settings. For an app installed elsewhere, use its bundled CLI directory instead. OpenAI's bundled CLI documentation also describes the older Codex.app location.

If codex is still missing, follow OpenAI's CLI installation instructions to install it, then open a new terminal and run codex --version again. Continue only after it prints a version. If your CLI does not recognize the plugin commands below, update the desktop app or standalone CLI using OpenAI's instructions and retry. This prerequisite comes before plugin installation; the plugin's setup skill is not available to help until it is installed.

Codex Local Installation

First run codex --version. If the command is missing, follow Check The Codex CLI before continuing. It checks the macOS desktop app's bundled CLI before directing you to OpenAI's installation instructions. You can ask your desktop agent to help with this prerequisite before the plugin is installed. Keep the same terminal open if you use the temporary PATH adjustment. If your CLI does not recognize the plugin commands below, update the app or CLI as described there.

Once the matching release and image are available, run these commands from your home directory using your normal Codex installation:

cd "$HOME"
codex plugin marketplace add dtkmn/mcp-zap-server --ref v0.18.0
codex plugin add mcp-zap-connect@mcp-zap-local-preview

Codex downloads the repository and installs the plugin in its managed cache; you do not need to clone the repository manually. mcp-zap-local-preview is the existing marketplace identifier; the installed plugin is MCP ZAP Connect. See OpenAI's Git-backed marketplace instructions.

This pins the marketplace and its relative plugin files to the release. Existing marketplace users should follow Updates instead of removing a marketplace or overwriting client settings. Installing the plugin alone does not start the scanner. This GitHub installation does not require a public-directory listing.

Prepare a Pinned Scanner Checkout

The 0.18.0 setup skill clones the v0.18.0 release into a new directory. If you prepare the checkout yourself, use the same tag and give the skill that directory:

git clone --branch v0.18.0 --single-branch \
  https://github.com/dtkmn/mcp-zap-server.git \
  "$HOME/mcp-zap-server-v0.18.0"

Before running setup helpers, the installed plugin verifies the checkout against the official GitHub tag, checks the setup files and confirms Docker Compose selects dtkmn/mcp-zap-server:v0.18.0. If GitHub cannot verify the tag, restore access and retry. Setup finishes by checking readiness and making an authenticated status call through the selected client.

For an existing scanner, use its checkout and keep its settings, credentials, workspace and reports. If the version differs, the plugin reports the mismatch. To move to v0.18.0, follow the scanner upgrade guide. You can still request status through an existing MCP connection.

Use In Codex

In the desktop app:

  1. Open Plugins, find MCP ZAP Connect among your installed or personal plugins, and open its page.
  2. Confirm it is enabled, then select Try now to invoke its setup skill in a local conversation on this machine.
  3. Send the setup request below.

If the plugin or skill is missing, restart the desktop app and open a new local conversation with the plugin enabled. For CLI use, run codex, use /plugins to confirm the plugin is enabled, then /skills to select setup-local-scanner.

Ask:

Set up MCP ZAP Server in Codex using Docker Compose.
Reuse my existing scanner installation if it matches the release.
For a fresh setup, use the v0.18.0 checkout and scanner image.
Preserve my settings and other MCP connections.
Verify with a status call only; do not run a scan.

The skill preserves unrelated settings and keeps keys in private local configuration. Codex may need reconnection before its tools load. Scanning requires a separate request identifying your authorized target and intended workflow. The packaged local client uses the * grant, which covers active scans, authentication setup and API imports. Run only the requested workflow. Existing settings and scopes are preserved; installing or reconnecting this plugin does not change permissions. See Quick-Start Permissions for optional per-client restrictions. Crawling still sends target traffic. See the first-report guide for the first demo scan after setup.

Check Readiness Before A Crawl Or Scan

For each new scan workflow, select scan-local-target from Codex's /skills, invoke /scan-local-target in Cursor, or invoke /mcp-zap-connect:scan-local-target in Claude Code. Supply your authorized target and intended workflow. For example:

Check my existing local scanner and this client's connection before starting.
If recovery is needed, explain the required action and wait for my approval.
Run only an HTTP crawl against http://juice-shop:3000, wait for passive
analysis, summarize this target's findings, and return its complete HTML report.
Do not start an active attack or change client settings or target restrictions.

With version 0.18.0 of the plugin, you can request a crawl in plain language:

Ask the agentWhat it runs
“Crawl this site.”One HTTP Spider crawl of the authorized URL.
“Crawl this site thoroughly.”An HTTP Spider crawl, then a Client Spider crawl of the same URL to explore pages rendered by JavaScript. The browser pass starts only after the HTTP pass confirms success.

You can also request just HTTP, Client Spider or AJAX Spider. A thorough crawl uses two operations. If you stop the first one or its outcome is uncertain, the agent does not start the second one. For an authenticated site, each pass needs a compatible authorized session. Neither example starts an active scan.

The skill runs ./bin/scanner-readiness.sh from the selected scanner checkout, then verifies the selected connection with one native passive-status call. If Docker is unavailable, the scanner is stopped, ownership conflicts or authentication fails, it stops before starting the requested workflow and explains recovery. Starting Docker or the scanner requires your approval; credentials and client settings are preserved. Recovery does not change Docker's startup-at-login settings. After a successful approved recovery, the skill rechecks readiness and resumes only your original request.

The agent runs these checks when you invoke the skill. The plugin cannot intercept calls sent directly to a separately configured MCP server. Invoke the scan skill to use this flow. A pure status-only request goes directly to the selected client's status tool without setup or recovery.

Claude Code Local Preview

Claude Code uses .claude-plugin/plugin.json in this plugin folder and the same skills/setup-local-scanner/SKILL.md as Codex and Cursor. No MCP server is bundled: the skill first checks the existing scanner's readiness, then configures Claude's separate authenticated connection. Read Anthropic's plugin documentation for supported versions and client policy requirements. This flow requires local Claude Code; Claude web chat and cloud coding sessions cannot reach your Mac's loopback server.

Load From The Local Checkout

Check claude --version first. If it is unavailable, follow the official Claude Code setup instructions before continuing. From the repository root, validate the plugin and marketplace, then load the plugin for a local session:

claude plugin validate ./plugins/mcp-zap-connect
claude plugin validate .
claude --plugin-dir ./plugins/mcp-zap-connect

For a session in another project, pass the absolute path to the plugin folder instead. Session loading does not register a marketplace or install the plugin permanently. Inside Claude Code, invoke:

/mcp-zap-connect:setup-local-scanner

Then ask:

Set up MCP ZAP Server in Claude Code using Docker Compose.
Reuse any existing scanner installation and preserve my Codex and Cursor settings.
Verify with zap_passive_scan_status only; do not run a scan.

The skill reuses healthy containers and existing API keys, checks for conflicting Claude definitions and preserves unrelated settings and permissions. It uses an HTTP entry with type: "http" in private Claude configuration, normally ~/.claude.json. It does not put credentials into shared .mcp.json files or command arguments. If CLAUDE_CONFIG_DIR is set, use that active profile's global configuration rather than creating a second default profile.

Use /mcp to inspect the scanner connection. If tools have not loaded, reconnect that server when the panel offers it, or start a new local Claude Code session. Complete setup with zap_passive_scan_status through that Claude connection. Server readiness and another client's status call do not verify Claude Code. See Claude Code MCP scopes and configuration.

Install From A Marketplace

Once the matching release and image are available, install from the tagged GitHub marketplace:

claude plugin marketplace add 'dtkmn/mcp-zap-server#v0.18.0'
claude plugin install mcp-zap-connect@mcp-zap-connect --scope user

This selects plugin 0.18.0. Its setup skill verifies the v0.18.0 checkout and scanner image. See the Claude Code ref syntax.

For deliberate development from a local checkout instead, register that checkout's root and install its plugin:

claude plugin marketplace add /absolute/path/to/mcp-zap-server
claude plugin install mcp-zap-connect@mcp-zap-connect --scope user

The local path selects that checkout, including its unreleased changes. It is not a release-pinned GitHub installation.

The marketplace index at repository-root .claude-plugin/marketplace.json points to this existing plugin folder. These commands describe distribution through the project's own marketplace; they do not imply an Anthropic directory listing.

Updates

Plugin updates and scanner upgrades are separate decisions. Keep the existing marketplace identity, selected scanner version, credentials, reports and client settings. Do not uninstall a marketplace as an update shortcut: clients can remove its installed plugins and saved plugin data.

  1. Choose a published release and read its plugin/scanner compatibility notes. A pinned tag does not automatically advance to the next release when refreshed.
  2. Follow Select a Different Release for an Existing Marketplace to change the release ref and update MCP ZAP Connect in your client.
  3. Reload the client when required and verify the selected marketplace ref and installed plugin version. A successful catalog refresh alone does not prove the installed files changed.
  4. Reconnect to the existing scanner and check status. If setup compatibility differs, report it and plan the scanner upgrade separately; do not change its image, checkout or credentials automatically.

All three client manifests use the repository release version from build.gradle, without the tag's leading v. Each repository release advances the plugin version too, including server-only releases. A plugin-only fix ships in a new repository release. Claude Code uses the manifest version for updates, so changed files must not reuse a published version. See Claude Code version management.

Updating the plugin leaves your existing scanner in place. To upgrade the scanner as well, follow the 0.18.0 upgrade guide.

Select a Different Release for an Existing Marketplace

Back up the client's private configuration first. Use a verified published tag; use the v0.18.0 examples below once its tag is published. Keep v0.17.1 if you want the older 0.5.0 plugin. Preserve unrelated entries, permissions and plugin enabled states. Managed or project settings can override user configuration; resolve those through the deployment's existing administration process.

For Codex, update only ref in the existing marketplace table in its effective user config.toml (normally ~/.codex/config.toml, or the configured Codex home). Retain its existing source, source_type and any other fields:

[marketplaces.mcp-zap-local-preview]
source_type = "git"
source = "https://github.com/dtkmn/mcp-zap-server.git"
ref = "v0.18.0"

Merge this into the existing table, then refresh that marketplace:

codex plugin marketplace upgrade mcp-zap-local-preview

See the Codex marketplace configuration fields.

For Claude Code, declare the selected ref in its private user settings (normally ~/.claude/settings.json, respecting any CLAUDE_CONFIG_DIR). This is plugin configuration, not the scanner's MCP credential entry. Merge only the named marketplace into extraKnownMarketplaces:

{
  "extraKnownMarketplaces": {
    "mcp-zap-connect": {
      "source": {
        "source": "github",
        "repo": "dtkmn/mcp-zap-server",
        "ref": "v0.18.0"
      }
    }
  }
}

If it already has an equivalent git source, preserve that source object and change only its ref. Keep other marketplace fields and all unrelated settings. See Claude Code marketplace source settings. After selecting the ref, register the same marketplace at its new tag, refresh it, and update the installed plugin. For an existing user-scoped installation, run:

claude plugin marketplace add 'dtkmn/mcp-zap-server#v0.18.0' --scope user
claude plugin marketplace update mcp-zap-connect
claude plugin update mcp-zap-connect@mcp-zap-connect --scope user

The first command refreshes the cached source for the existing marketplace. Editing the ref alone can leave Claude Code unable to find the marketplace during the update. Reload if prompted and verify the installed plugin version before setup.

Cursor Desktop Free

Use a local Cursor Agent chat on the scanner's machine. Free accounts require available Agent allowance; MCP access does not bypass model usage limits.

Cursor Local Preview

Cursor's local development instructions describe copying the complete plugins/mcp-zap-connect folder, including hidden files, into ~/.cursor/plugins/local/mcp-zap-connect. Preserve any existing copy. Use Developer: Reload Window, check Customize → Skills, then invoke /setup-local-scanner in a local Agent chat. Local imports must be allowed by your policy; an installed marketplace plugin with the same name takes precedence.

After setup, follow the first-report guide for the demo crawl and complete report.

Cursor Import Limitations

Cursor repository imports use the repository-root .cursor-plugin/marketplace.json to locate this folder and its .cursor-plugin/plugin.json for Cursor metadata. The portable plugin.json retains Codex metadata; both clients use the same skills/ directory. Keep the shared name, version and description aligned across all three client manifests.

If From Local Repository, Import from Disk, or From GitHub Repository shows an empty catalogue, use the local preview folder route above. Check Customize → Skills for setup-local-scanner and scan-local-target before requesting setup or a new scan workflow.

Cursor Connection Checks

For the Cursor preview, invoke /setup-local-scanner with:

Set up MCP ZAP Server in Cursor using Docker Compose.
Reuse any existing installation and preserve my Codex and Claude settings.
Verify with a status call only; do not run a scan.

After a Docker restart in Cursor, open the scanner under Customize → MCPs, select Reload if reconnection is needed, then verify with the status call. Invoke /scan-local-target for each separately requested crawl or scan after setup succeeds, following the first-report guide.

Privacy, terms, support and license

Settings, keys and reports remain in your installation; prompts and MCP results are processed by your AI provider. Read the privacy policy. The terms of service explain local use, authorized scanning, third-party services and community support. Report problems through GitHub issues with versions and a redacted error. Do not include keys, private configuration or sensitive reports.

Licensed under Apache-2.0. This independent project is not affiliated with or endorsed by ZAP, OpenAI, Cursor or Anthropic.