Unagi-cq/cdp-bridge-mcp
MCP server that bridges clients to a real browser through CDP and a companion extension.
What it solves
CDP Bridge MCP allows Large Language Models (LLMs) and AI agents to interact with a user's actual, active browser session. Unlike traditional headless browser automation (like Playwright), it avoids the need to manage separate browser instances or manually transfer cookies and login states, as it connects directly to pages the user has already opened and authenticated.
How it works
The system consists of three parts: an MCP server (written in Python), a Chromium browser extension, and an MCP-compatible client (like Claude Desktop).
- Connection: The MCP client connects to the server via
stdioorstreamable-http. Simultaneously, the browser extension connects to the server via WebSocket. - Routing: The server uses tokens to map a specific MCP client to a specific browser profile/session, allowing for multi-user or multi-account isolation on the same machine.
- Execution: When the LLM calls a tool, the server sends the command to the extension, which executes JavaScript in the browser page using
chrome.scriptingor the Chrome DevTools Protocol (CDP) and returns the result.
Who it’s for
- AI Agent Developers: Those building products that need to perform actions on behalf of a user in their own browser.
- Power Users: Individuals who want an LLM to analyze, scrape, or automate tasks on websites where they are already logged in.
- Ops/Support Teams: Teams needing to coordinate multiple browser accounts or remote browser sessions for data collection or customer service.
Highlights
- Session Reuse: Leverages existing browser login states, cookies, and page states.
- Lighter Token Usage: Includes a
browser_scantool that simplifies HTML to reduce token waste while preserving structural information. - Multi-Tenant Support: Supports multiple browser profiles and multiple users across different computers via token-based isolation.
- Flexible Deployment: Can be run locally via
stdioor deployed as a remote service usingstreamable-http. - Comprehensive Toolset: Provides 12 tools for tab management, page observation, element interaction (click/fill), JS execution, screenshots, and navigation.
Related
- Project
- Project
- Project
- Project