Chrome Bridge
MCP server + Chrome extension that drive the user's real, logged-in Chrome over a local WebSocket. 59 token-efficient web-dev tools: compact element refs instead of screenshots, server-side table filtering, visual regression, accessibility/SEO/security audits, network mocking. Also runs on ChromeOS/Crostini.
README
Chrome Bridge
Chrome Bridge is an MCP server that connects Claude Code to your real, logged-in Chrome browser — 2.3–2.8× more token-efficient and ~3× the toolset of the official "Claude in Chrome" extension, with no paid plan.
By using a local WebSocket bridge and a specialized Chrome extension, Chrome Bridge provides 59 web-development tools (navigation, DOM inspection, visual regression, audits, network mocking) and a dedicated headless instance for CI. It is self-hosted, local-only, and requires no paid plan.
Why Chrome Bridge?
Chrome Bridge is designed to be both more efficient and more powerful than Anthropic's official browser extension.
1. Directional Efficiency Benchmark
In a same-model, two-task benchmark (Claude Sonnet 5, headless, July 2026, n=2 per cell), Chrome Bridge used 2.3–2.8× fewer turns, tokens, and dollars than Claude in Chrome.
| Task | Chrome Bridge | Claude in Chrome | Savings |
|---|---|---|---|
| Form fill task | 6.0 turns / $0.21 | 16.5 turns / $0.48 | ~2.3x |
| 1500-row table lookup | 4.0 turns / $0.18 | 11.0 turns / $0.41 | ~2.3x |
Why it wins:
- Compact References: The agent acts on short element handles (e.g.,
n1,n2) returned bynavigateorget_interactivesinstead of the slow screenshot → read-coordinates → click loop. - Server-Side Processing: Filtering and paginating large tables happens server-side (
extract_tablewithwhere). The extension-to-model payload is the token bottleneck; Chrome Bridge moves the heavy lifting to localhost. - Full method and data available in bench/RESULTS.md.
2. Feature Comparison
Chrome Bridge ships 59 specialized tools (30 core by default) compared to ~20 in Claude in Chrome. It is also the only automation that drives the real host Chrome on ChromeOS/Crostini.
| Chrome Bridge | Claude in Chrome | Chrome DevTools MCP | Playwright MCP | |
|---|---|---|---|---|
| ChromeOS / Crostini | Yes (real host) | No | Container only | Container only |
| Tools | 59 (30 core) | ~20 | ~50 | 23 core (71 total) |
| Requires Paid Plan | No | Yes (Pro+) | No | No |
| Network Mocking | Yes (stub/headers) | No | No | Yes |
| Visual Regression | Yes (screenshot_diff) |
No | No | No |
| Audits (A11y/SEO/Sec) | Yes (Full suite) | No | Partial | No |
| Headless / CI | Yes | No | Yes | Yes |
| GIF / Video | No | Yes | Partial | No |
| Breakpoints / Heap | No | No | Yes | No |
Quickstart
git clone git@github.com:frsorrentino/chrome-bridge.git && cd chrome-bridge && ./install.sh
- Load the extension: Open
chrome://extensions, enable Developer mode, click Load unpacked, and select theextension/folder. - Restart Claude Code.
On ChromeOS/Crostini, install the published extension from the Chrome Web Store instead of loading it unpacked — a filesystem-loaded extension is dropped on every reboot (the container isn't mounted when Chrome starts). See the project homepage for the store link.
Example Session
"Open localhost:3000, run an accessibility audit, and find the 'Sign Up' button"
Claude Code calls navigate (returning clickable element refs), accessibility_audit, and find_text. Because navigate returns refs like n1, the agent can immediately call click(ref="n1") without a discovery turn.
Token-Efficient Design
- Compact Schemas: 30 core tools use ≈3.9k tokens of schemas (vs Playwright MCP's ~4.6k). Specialized groups (audits, visual, network, storage, dom, files) are opt-in via
--caps. - Act-from-Result: Tools attach a capped preview of interactive elements with short refs. Actions only report a
page_changeddelta when the URL or title actually changes. - Optimized Media: Screenshots are downscaled to ≤1568px. Full-page captures are sliced into readable segments.
- Zero-Token Escape Hatches: The CLI skips MCP schemas entirely, and recorded flows replay without any model in the loop.
Highlights
- Launch Mode: Start a dedicated Chromium instance with an ephemeral profile for isolated sessions or CI.
- Network Mocking: Block/redirect requests, rewrite headers, or stub response bodies with synthetic data.
- Visual Regression: Use
screenshot_diffto compare current pages against named baselines. - Structured Extraction: One-call
extractfor repeated data andextract_tablewith server-sidewherefiltering.
Architecture
Claude Code <--stdio--> MCP Server <--WebSocket :8765--> Chrome Extension
(server/) (extension/, MV3)
The MCP Server (Node.js) handles the protocol and tool logic. The Chrome Extension (MV3) executes commands via Chrome APIs. User scripts (execute_js) run via chrome.userScripts.execute(), requiring the "Allow user scripts" toggle in extension settings.
Tools (59 total)
Core & Navigation (7)
get_status, get_tabs, create_tab, navigate, tab_action, get_frames, screenshot.
Interaction (11)
click, type_text, fill_form, hover, press_key, scroll, drag_and_drop, upload_file, dismiss_overlays, handle_dialogs, clipboard.
DOM & Inspection (11)
read_page, extract, get_page_info, query_dom, modify_dom, find_text, get_interactives, inject_css, highlight_elements, watch_dom, measure_spacing.
Debugging & Network (8)
execute_js, read_console, monitor_network, monitor_websocket, network_rules (block/redirect/stub/headers), get_performance, web_vitals, list_event_listeners.
Visual & Responsive (7)
element_screenshot, full_page_screenshot, screenshot_diff, viewport_resize, set_zoom, emulate_media, set_geolocation.
Audits (6)
accessibility_audit, seo_audit, security_headers, check_links (server-side verification), unused_css, extract_table (with where filtering).
State, Storage & Files (9)
get_storage, set_storage, session_fixture, http_auth, save_page (MHTML), manage_downloads, session_record, wait_for, assert.
Install
Requirements: Node.js 18+, Chrome 135+.
From Source
git clone git@github.com:frsorrentino/chrome-bridge.git
cd chrome-bridge
./install.sh
install.sh registers the MCP server in Claude Code (--scope user).
Manual Registration
claude mcp add --scope user chrome-bridge node /path/to/server/index.js
Note: For execute_js, you must enable "Allow user scripts" in chrome://extensions → Chrome Bridge → Details. On Chrome 135-137, enable Developer Mode instead.
Configuration
Configure the server via environment variables:
CHROME_BRIDGE_PORT: Default8765.CHROME_BRIDGE_TOKEN: Optional shared secret for WebSocket security.CHROME_BRIDGE_CAPS: Tool groups to load (core,audits,visual,network,storage,dom,files, orall).
CLI
The CLI allows batch operations and pipes output through grep or jq before it reaches the model:
chrome-bridge navigate --url https://example.com
chrome-bridge read_console --level error | head -20
chrome-bridge assert --selector "#success" --text "Done"
chrome-bridge replay --file ./recordings/login.jsonl
Launch Mode (Headless / CI)
Launch mode starts a dedicated Chromium instance with an ephemeral profile:
node server/index.js --launch --headless
Perfect for CI smoke tests using session_record + replay. Note: execute_js uses a new Function fallback in launch mode if the user-script toggle is unavailable.
Security
- Origin Validation: Extension connections are only accepted from the
chrome-extension://origin. - Relay Security: Secondary MCP instances (relays) must connect via loopback.
- Shared Token: Use
CHROME_BRIDGE_TOKENto gate access on untrusted networks (especially on Crostini where the server binds0.0.0.0).
Tests
- Unit:
npm run test:unit(95 tests). - E2E:
node test/test-devtools.js(25 tests, requires Chrome).
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。