Skip to content
MCP server

MCP Cdp

Safe-by-default MCP server that drives Electron and Chrome apps over DevTools Protocol

Runs locally

MCP Cdp is an open-source MCP server for browser automation. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, macOS, Windows
Runs
Locally
Version
0.3.1
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add mcp-cdp -- npx -y @dockndevai/mcp-cdp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "mcp-cdp": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-cdp"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-cdp": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-cdp"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-cdp": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-cdp"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "mcp-cdp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-cdp"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add mcp-cdp -- npx -y @dockndevai/mcp-cdp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.mcp-cdp]
command = "npx"
args = ["-y", "@dockndevai/mcp-cdp"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-cdp": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-cdp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user mcp-cdp npx -- -y @dockndevai/mcp-cdp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "mcp-cdp": {
          "command": "npx",
          "args": [
            "-y",
            "@dockndevai/mcp-cdp"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • CDP_PORTThe --remote-debugging-port your app/browser exposes (default 9222).
  • CDP_HOSTHost serving the DevTools endpoint (default 127.0.0.1; non-loopback needs CDP_ALLOW_REMOTE).
  • CDP_MODEAccess mode: read-only | read-write | admin. Starts read-only; interactions need read-write.
  • CDP_ALLOW_EVALSet true to allow the evaluate tool (arbitrary JS) — admin mode only. Default false.
  • CDP_TARGET_ALLOWLISTComma-separated URL patterns; interactions are confined to matching targets. Empty = all.
  • CDP_DRY_RUNSet true to log interactions without dispatching them to the browser.

About MCP Cdp

Rather than steering a desktop app by screenshots, this server attaches to the --remote-debugging-port of an Electron or Chrome/Chromium app and gives the agent the rendered DOM, console output and network requests. The README argues this exposes more than a picture does, shows the exception or failed request behind a broken test, and lets parallel agents each use their own port, for example one per git worktree.

It starts read-only: listing targets, DOM snapshots, CSS-selector queries, console logs, network requests (headers never captured) and screenshots. Read-write mode adds click, type_text, press_key and navigate. The evaluate tool, which runs arbitrary JavaScript, needs admin mode plus CDP_ALLOW_EVAL and a human confirmation.

Other guards include a target URL allowlist, protected targets (sign-in pages and browser internals are protected by default), dry-run, loopback-only endpoints unless CDP_ALLOW_REMOTE is set, and an optional laya-guard classifier for evaluate expressions.

Tools this server provides (11)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 11 tools read data; 9 names don't say.

From the server's own tool labels and tool names; not verified by us.

list_targetsName suggests: reads
List pages, webviews and Electron windows
dom_snapshot
Rendered HTML of a page or subtree
query_domName suggests: reads
Outer HTML of elements matching a CSS selector
console_logs
Recent console output and uncaught exceptions
network_requests
Recent requests with method, URL, status and mime type
screenshot
PNG of the viewport
click
Click the first element matching a selector
type_text
Type into the page
press_key
Press Enter, Tab, Escape, Backspace, Delete or arrow keys
navigate
Navigate a target to a URL
evaluate
Run a JavaScript expression in the page (admin, gated)

What it does

DOM, console and network
Read rendered HTML, console output and recent requests instead of screenshots.
Per-agent debugging ports
Each agent attaches to its own port, so parallel agents do not collide.
Gated interaction
Click, type, press keys and navigate only in read-write mode.
Guarded JavaScript evaluation
Needs admin mode, an explicit flag and human confirmation.
Protected targets
Sign-in pages and browser internals can be inspected but not interacted with.
Header privacy
Request and response headers are never captured; sensitive URL values are redacted.

Good for

  • Debug why a UI test failed using console and network data
  • Inspect an Electron app's rendered DOM
  • Run parallel agents against separate dev builds
  • Automate a web flow headlessly on a server
  • Review page state without risking clicks, in read-only mode

Pricing

Open source

MIT licence

MCP Cdp FAQ

How do I point MCP Cdp at my app?

Start the app with --remote-debugging-port (default expected is 9222) and set CDP_PORT.

Can MCP Cdp run arbitrary JavaScript?

Only via evaluate, which needs admin mode, CDP_ALLOW_EVAL=true and a confirmation prompt.

Does MCP Cdp work on Windows and Linux?

The README says CDP works identically on macOS, Linux and Windows.

Can MCP Cdp connect to a remote browser?

Only if CDP_ALLOW_REMOTE=true; otherwise endpoints must be loopback.

Is MCP Cdp free?

Yes. MCP Cdp is open source, so you can use and self-host it for free.

How do I add MCP Cdp to Claude Code?

Run this command in your terminal: claude mcp add mcp-cdp -- npx -y @dockndevai/mcp-cdp

What are the best alternatives to MCP Cdp?

The closest alternatives to MCP Cdp are REA, Browser Use, Scrapling MCP Server, Context7 and Chrome DevTools MCP.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers