Skip to main content
Glama

chrome-mcp-hub

CI npm version License: MIT Docs

A zero-dependency, persistent multi-agent Streamable HTTP & stdio MCP hub for chrome-devtools-mcp (--autoConnect) with a live frosted-glass control dashboard.

Live Docs: saman-taghavi.github.io/chrome-mcp-hub

Approve Chrome's "Allow remote debugging?" dialog once, and share that live browser session safely across Claude Code, Antigravity, Cursor, Windsurf, and multiple concurrent subagents — without repeat popups on every restart.

Why

chrome-devtools-mcp --autoConnect runs over stdio, so every time an AI agent starts or restarts, it spawns a new process and triggers Chrome's remote debugging approval dialog again. When multiple agents run in parallel, they also compete over Chrome's shared active tab.

chrome-mcp-hub solves both:

  • One persistent child process — keeps a single approved chrome-devtools-mcp --autoConnect connection alive across agent restarts.

  • Multi-agent safe — tracks each agent's own selectedPageId per Mcp-Session-Id and serializes tools/call through a FIFO async queue so concurrent agents never hijack each other's active tab.

  • Live Glass Dashboard (http://127.0.0.1:9333/) — real-time SSE feed of connected agents, recent tool calls, open tabs, debug logs, global Pause / Resume kill-switch, Read-Only mode, per-agent Mute / Drop, and Protected Domains blocklist.

  • Zero runtime dependencies — pure Node.js 20+ built-ins (http, child_process, readline, fs, crypto).

Related MCP server: chrome-devtools-mcp-wrapper

Quick Start

Option 1 — One-line AI Agent Setup (fastest)

Paste this single line into Claude Code, Antigravity, Cursor, OpenCode, Codex, Gemini CLI, or Pi:

Read https://saman-taghavi.github.io/chrome-mcp-hub/llms.txt and set up chrome-mcp-hub for all my coding agents.

Option 2 — One-command Terminal Setup

  1. In Chrome (144+), open chrome://inspect/#remote-debugging and toggle Allow remote debugging ON.

  2. Auto-wire all detected harnesses and start the hub:

    npx -y chrome-mcp-hub install && npx -y chrome-mcp-hub

    Useful commands:

    npx -y chrome-mcp-hub install --dry-run   # preview detected configs
    npx -y chrome-mcp-hub status              # check live daemon health & sessions in terminal

    Options:

    • --port <port> (default 9333, or CHROME_MCP_PORT)

    • --channel <stable|canary|dev|beta> (default stable)

    • --read-only (start with mutating browser actions blocked; persisted to ~/.config/chrome-mcp-hub/config.json)

    • --debug (verbose structured logs, or CHROME_MCP_DEBUG=1)

    • --log-file <path> (append NDJSON logs to disk)

  3. Open http://127.0.0.1:9333/ for the live dashboard.

  4. Point your AI clients to http://127.0.0.1:9333/mcp (pass ?client=<name> for clear labels in the dashboard):

Claude Code (~/.claude.json)

{
  "mcpServers": {
    "chrome-devtools": {
      "type": "http",
      "url": "http://127.0.0.1:9333/mcp?client=claude-code"
    }
  }
}

Antigravity (~/.gemini/config/mcp_config.json)

{
  "mcpServers": {
    "chrome-devtools": {
      "url": "http://127.0.0.1:9333/mcp?client=antigravity"
    }
  }
}

OpenCode (opencode.json)

{
  "mcp": {
    "chrome-devtools": {
      "type": "remote",
      "url": "http://127.0.0.1:9333/mcp?client=opencode"
    }
  }
}

Codex CLI (~/.codex/config.toml)

[mcp_servers.chrome-devtools]
url = "http://127.0.0.1:9333/mcp?client=codex"

Cursor / Windsurf / Gemini CLI

{
  "mcpServers": {
    "chrome-devtools": {
      "url": "http://127.0.0.1:9333/mcp?client=cursor"
    }
  }
}

(Windsurf uses "serverUrl"; Gemini CLI uses "httpUrl".)

Pi / OMP (oh-my-pi) / Zed / Cline / any stdio-only harness

Use the built-in --stdio bridge mode so stdio-only harnesses share the exact same live Chrome session:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-mcp-hub", "--stdio", "--client=pi"]
    }
  }
}

Security Model

chrome-mcp-hub never bypasses Chrome's security controls — you still enable chrome://inspect/#remote-debugging and approve Chrome's prompt once, and disabling it in Chrome revokes access immediately.

Built-in guards:

  • Loopback-only binding (127.0.0.1 — never exposed to LAN or the internet).

  • Strict CSRF protection: /mcp rejects any request carrying a browser Origin header (403).

  • DNS-rebinding protection: rejects any Host header other than 127.0.0.1:<port> or localhost:<port> (403).

  • Dashboard API isolation: /api/* requires same-origin localhost + X-Dashboard-Action: 1.

  • Protected Domains: block sensitive domains (email, banking, password managers) from all agent tool calls.

  • Redacted logging: form input values (fill, fill_form, type_text) are never written to call history or debug logs.

Development & Tests

npm test

Runs the full security, CSRF, DNS-rebinding, read-only, pause/mute, protected-domain, and 3-agent concurrent isolation suite using a mock stdio MCP server (no Chrome required in CI).

Author & License

Created by Saman Taghavi Sani (@saman-taghavi).

Licensed under the MIT License — free to use, modify, and distribute with attribution.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Shares one Chrome browser across multiple AI coding sessions via an MCP proxy, adding lifecycle management, tool filtering, and anti-detection while wrapping the upstream chrome-devtools-mcp server.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents and clients to control a real Chromium browser through MCP tool calls, including navigation, clicking, typing, JavaScript evaluation, screenshots, and DOM snapshots. Supports multiple isolated sessions over authenticated HTTP with no disk writes.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to drive a live, persistent self-hosted Chromium session over MCP, running browser actions via Playwright/CDP, capturing page snapshots, screenshots and videos, and managing uploads and downloads in the same tabs and signed-in accounts a human user can take over at any time.
      Apache 2.0