chrome-cdp
Launches and supervises a local Brave browser as a Chrome DevTools Protocol endpoint, allowing CDP clients such as Playwright, Puppeteer, scripts, and MCP tools to share and control the browser.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
chrome-cdp
Supervise a local Chrome or Chromium process over the Chrome DevTools Protocol (CDP), with a built-in stdio MCP bridge. Playwright, Puppeteer, scripts, and MCP agents share one browser process on Linux and macOS.
chrome-cdp start
chrome-cdp statusstart launches Chrome in the background and records its state. Concurrent start or mcp calls wait on an exclusive file lock and reuse the running browser. stop checks process ownership against the recorded profile before signaling the process group, so stale PIDs never touch unrelated processes and no child processes stay behind.
The package uses only the Python 3.10+ standard library. By default it binds to 127.0.0.1, keeps the Chrome sandbox on, sets state directory permissions to 0700 and state files to 0600, rotates chrome.log at 5 MiB, and disables chrome-devtools-mcp telemetry and CrUX requests.
Installation
You need Python 3.10+ and a local Chrome, Chromium, Brave, or Edge binary. The mcp subcommand also needs Node.js (npx) or a local chrome-devtools-mcp binary.
With uv:
uv tool install chrome-cdpFrom source:
git clone https://github.com/ethandong16/chrome-cdp.git
cd chrome-cdp
uv tool install --editable .Related MCP server: chrome-mcp
Commands
chrome-cdp start # Start Chrome in the background (default 127.0.0.1:9222)
chrome-cdp start --console # Run in the foreground; Ctrl-C or SIGTERM stops cleanly
chrome-cdp stop # Stop Chrome and its entire process group
chrome-cdp restart # Stop (if running) and start with new options
chrome-cdp status # Show PID, browser version, endpoints, mode, profile, log
chrome-cdp status --json # Emit machine-readable JSON status
chrome-cdp url # Print the HTTP CDP endpoint (for shell composition)
chrome-cdp url --ws # Print the WebSocket debugger URL
chrome-cdp logs [-n 50] [-f] # Inspect or follow chrome.log
chrome-cdp doctor [--json] # Verify Chrome, state directory, port, and MCP tooling
chrome-cdp mcp # Ensure Chrome is running and exec chrome-devtools-mcp on stdioRun flags (start, restart, mcp)
Flag | Environment variable | Description |
|
| CDP port (default |
|
| Listen address (default |
| — | Show the browser window |
|
| Chrome |
|
| Browser executable path |
| — | Run in the foreground ( |
— |
| Extra Chrome flags (shell-split; use |
— |
| State directory (default |
Connecting clients
Playwright (Python)
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp("http://127.0.0.1:9222")
page = browser.contexts[0].new_page()
page.goto("https://example.com")
print(page.title())
page.close()MCP clients
Works with Claude, Codex, Cursor, OpenCode, and other stdio MCP clients:
{
"mcpServers": {
"chrome-cdp": {
"command": "chrome-cdp",
"args": ["mcp"]
}
}
}chrome-cdp mcp starts the browser if it is not running, then execs chrome-devtools-mcp against it with --no-usage-statistics and --no-performance-crux.
Additional MCP options:
--mcp-package SPECorCHROME_CDP_MCP_PACKAGEoverrides the pinned npm package (defaultchrome-devtools-mcp@1.15.0).CHROME_CDP_MCP_BINpoints to a localchrome-devtools-mcpbinary somcpruns offline withoutnpx.--usage-statisticsand--performance-cruxturn telemetry or CrUX lookups back on.-- <args...>forwards extra arguments tochrome-devtools-mcp.
Async Playwright, Node.js, Puppeteer, SSH tunnels, systemd, macOS launchd, and multi-instance examples are in docs/integration.md.
State files
State lives in ~/.local/state/chrome-cdp/ (mode 0700):
state.json(0600): PID, port, bind address, WebSocket URL, profile, and log path.chrome.log(0600): browser stdout and stderr, rotated tochrome.log.1at 5 MiB.chrome-profile/: isolated Chrome user data directory.
Stop the server and delete this directory to reset everything.
Security
CDP has no authentication. Any process that can reach the port can drive the browser and read cookies from the profile. Keep the default 127.0.0.1 bind and use an SSH tunnel for remote access. See SECURITY.md.
Development
uv sync
uv run pytest
uv run ruff check .
uv run mypyLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unofficial Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
MCP server to assist with JxBrowser development.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to drive individually named Chrome profiles, providing tools for tabs, navigation, page interaction, screenshots, JavaScript evaluation, console logs, and network inspection over stdio without a TCP port.MIT
- AlicenseBqualityCmaintenanceEnables MCP clients to drive a real Chromium browser for automation, including navigation, JavaScript execution, CDP commands, network capture, and multi-tab control.729 PyPIGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables local MCP clients to inspect and interact with Chromium pages, manage isolated workspaces, hand off live tabs, and use scoped account and file grants under explicit human-approved permissions.3Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible agents and HTTP clients to discover, claim, and control Chrome tabs through an authenticated local bridge, including snapshots, actions, approvals, task ownership, screenshots, frames, diagnostics, and cleanup.Apache 2.0