Large language models often need to work with live websites, but traditional automation tools launch fresh browser instances every time. CDP Bridge MCP changes that by connecting directly to your active browser sessions, allowing models to read pages, execute scripts, and capture screenshots while preserving existing logins and session states.
The open-source project bridges MCP clients to real browser sessions through a lightweight Chromium extension. Unlike tools designed for testing or debugging, CDP Bridge MCP focuses on collaboration with your current browsing context—ideal for tasks like reading account-specific content, analyzing rendered pages, or performing quick checks before taking actions.
How CDP Bridge MCP differs from automation tools
Most browser automation frameworks prioritize reproducibility and isolation. Playwright MCP and Chrome DevTools MCP excel at launching new browser instances, scripting repeatable workflows, or debugging protocols. CDP Bridge MCP, however, takes a different approach by integrating with your existing browser tabs—those already logged in, with cookies set and pages rendered.
- Reuse real sessions: Connect to open tabs without re-authenticating. The extension reads cookies, login states, and rendered HTML, eliminating the need to log in again or manually transfer session data.
- Better for interactive tasks: While Playwright shines in automation scripts, CDP Bridge MCP suits real-time interactions like reading dynamic content, analyzing page structures, or executing quick JavaScript snippets before clicking.
- Optimized for LLMs: The
browser_scantool simplifies page HTML by stripping unnecessary scripts, styles, and invisible elements while preserving useful text, controls, and structure. This reduces token overhead for model processing.
- Lightweight setup: Once published to PyPI, the server starts with a single command. The browser only needs the extension loaded—no Playwright scripts or debug configurations required.
If your goal is scripted automation, Playwright MCP is ideal. For debugging or DevTools protocol work, Chrome DevTools MCP fits better. But if you want an LLM to collaborate with your current browsing session, CDP Bridge MCP aligns closest with that use case.
Available tools and their use cases
CDP Bridge MCP exposes several tools via its MCP server, each designed for specific interactions with live browser tabs:
- `browser_get_tabs` – List all connected browser tabs for inspection.
- `browser_scan` – Retrieve simplified HTML or plain text of the active page, optimized for LLM processing.
- `browser_execute_js` – Run JavaScript in the active tab to interact with page logic.
- `browser_switch_tab` – Change the MCP’s active tab without shifting the visible Chrome window.
- `browser_batch` – Execute multiple extension or CDP commands in a single request for complex workflows.
- `browser_wait` – Poll a JavaScript condition until it returns a truthy value or times out.
- `browser_navigate` – Direct the active tab to a new URL.
- `browser_screenshot` – Capture a screenshot of the current page.
- `browser_cookies` – Read cookies from the active tab.
These tools enable models to perform tasks ranging from content extraction to state inspection, all while working within your real browsing environment.
Setting up CDP Bridge MCP in three steps
Getting started requires minimal setup: install the extension, run the MCP server, and configure your client. Here’s how:
1\. Install the browser extension
The extension connects to a local service, so it must be loaded into a Chromium-based browser like Chrome or Edge.
- Navigate to
chrome://extensions/in your browser.
- Enable Developer mode using the toggle in the top-right corner.
- Click Load unpacked and select the extension folder located at
src/cdp_bridge/tmwd_cdp_bridgein the project’s repository.
By default, the extension connects to the local service at 127.0.0.1:18765. No additional configuration is needed at this stage.
2\. Start the MCP server
The server is distributed as a Python package and can be launched via the uvx command, which is part of the uv package manager. Ensure you have Python 3.10 or newer installed.
First, install uv if it’s not already present:
pip install uvThen start the server using the recommended command:
uvx cdp-bridgeFor older uv versions below 0.2.0, use the alternative syntax:
uv tool run cdp-bridgeThe server will initialize and await connections from MCP clients.
3\. Configure your MCP client
CDP Bridge MCP supports multiple configuration methods depending on your client. Here are examples for popular setups:
Claude Code:
claude mcp add cdp-bridge uvx cdp-bridgeGitHub Codex:
codex mcp add cdp-bridge uvx cdp-bridgeOpenCode:
Add this to your ~/.config/opencode/opencode.json:
{
"mcp": {
"cdp-bridge": {
"type": "local",
"command": ["uvx", "cdp-bridge"],
"enabled": true
}
}
}OpenClaw CLI:
openclaw mcp set cdp-bridge '{"command":"uvx","args":["cdp-bridge@latest"]}'Once configured, your MCP client can interact with the server and access the live browser session.
Important considerations and best practices
CDP Bridge MCP operates within your real browser environment, so security and reliability are paramount. Follow these guidelines to ensure safe usage:
- Trust your MCP clients: Since the tool connects to your active session, only use it with clients you fully trust.
- Keep the extension and server running simultaneously: The tools rely on both components. If either is stopped, the MCP server will report that no browser tabs are connected.
- Verify Python compatibility: The project requires Python 3.10 or newer. Older versions are not supported.
- Monitor resource usage: Running automation in a live browser may impact performance, especially with multiple tabs open.
By bridging MCP clients to your existing browser sessions, CDP Bridge MCP offers a practical way for large language models to assist with real-time web tasks without disrupting your workflow. As the project matures, expect broader support for additional browsers and enhanced tooling—making it an increasingly valuable asset for developers integrating LLMs with live web environments.
AI summary
Discover CDP Bridge MCP, the open-source tool that lets large language models interact with your existing browser tabs, preserving logins and session states for real-time web tasks.