Labsco
MCP SERVER

CDP Bridge MCP

by Unagi-cq

Work in the Chrome you already have open — read the active tab as stripped-down HTML, run JavaScript, wait on a condition and screenshot it — instead of launching a fresh automated browser.

Browser Automation, Control & ScreenshotsVerified
Summary
Your signed-in browser session is the environment, so pages behind a login need no separate automation story.

A freshly launched automation browser starts with no cookies, no extensions and no session; this one attaches to the Chrome you are already using, which is the difference between scripting a public page and scripting the app you actually work in. Page reads are shaped around what a model can afford rather than fidelity — stripped HTML, plain text, or nothing but the tab list. The flip side is worth saying plainly: it runs inside your real browser session, so connect it only to clients you trust.

What it is

A bridge into a running Chromium browser through a companion extension and the Chrome DevTools Protocol, addressing tabs that are already open rather than a browser it starts for you.

What you get
  • The open tab list with IDs, URLs and titles, and an active-tab switch that leaves the visible Chrome window where it is
  • Page content simplified for a model — scripts, styles and invisible elements stripped — or as plain text, or the tab list alone when you want neither
  • JavaScript executed in the page with the DOM changes it caused captured alongside the return value
  • A wait that polls a JavaScript condition until it is truthy, on your own timeout and interval
  • Raw extension and CDP commands batched into a single request, so a DOM.getDocument and what follows it are one round trip
  • Screenshots as base64 PNG, and a save step that writes them to a path or to a timestamped file in a directory
  • A focus tool that genuinely brings a tab to the front across windows and Spaces when the person needs to see what the agent is doing
  • Browser profiles kept in separate sessions by token, so several signed-in accounts on one machine can be driven in parallel
Requirements

Python 3.10 or newer and uv, since clients start it as uvx cdp-bridge@latest. A Chromium browser with this project's extension loaded unpacked from src/cdp_bridge/tmwd_cdp_bridge; the extension connects back to the server's WebSocket on 127.0.0.1:18765 and keeps retrying about every five seconds, so a refused connection right after loading resolves itself. For a shared or remote setup, start it with --transport streamable-http --port 8000 and give the client's Bearer token and the extension's Token field the same value. MIT.

Setup effort

One command — uvx cdp-bridge@latest