# MCP Cdp

> MCP Cdp is an open-source MCP server for browser automation. Safe-by-default MCP server that drives Electron and Chrome apps over DevTools Protocol. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Windows, Linux
- **Repository:** https://github.com/dockndevai/mcp-cdp
- **MCP Registry name:** io.github.dockndevai/mcp-cdp
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

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

### Cursor (~/.cursor/mcp.json)

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

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

### VS Code (~/.copilot/mcp-config.json)

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

### Codex: Add with the CLI (Terminal)

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

### Codex: Or add to config.toml (~/.codex/config.toml)

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

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

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

### Devin Desktop (~/.config/devin/mcp_config.json)

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

### Cline (cline_mcp_settings.json)

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

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

### Zed (Zed settings.json)

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

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

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

### Kiro (~/.kiro/settings/mcp.json)

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

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

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_targets` (name suggests: reads): List pages, webviews and Electron windows
- `dom_snapshot`: Rendered HTML of a page or subtree
- `query_dom` (name 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)

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

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Browser Use](https://ai-powered.com/mcp/browser-use): Browser Use is a freemium MCP server for browser automation.
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): Scrapling MCP Server is an open-source MCP server for web search and scraping.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-cdp
