chrome-mcp-bridge

chrome-mcp-bridge

An ungated reimplementation of the 'Claude in Chrome' MCP bridge that exposes 22 browser-automation tools to any MCP client, driving the official Claude Chrome extension via native messaging without requiring a claude.ai login.

Category
Visit Server

README

chrome-mcp-bridge

An ungated reimplementation of the "Claude in Chrome" MCP bridge. Exposes the same 22 browser-automation tools to any MCP client (Claude Code, Codex, Cursor, …), driving the official Claude Chrome extension via native messaging — no claude.ai login required.

Why this exists

The official "Claude in Chrome" integration is two gated binaries:

Official binary Role Gate
claude.exe --chrome-native-host native host (Chrome-spawned, talks to the extension) account-gated (Vni())
claude --claude-in-chrome-mcp MCP server (MCP-client-spawned, stdio JSON-RPC) account-gated (refuses to engage the bridge without login)

Both were proven gated by reverse-engineering: the native host never connects the extension unless logged in, and the MCP server returns "Browser extension is not connected… logged into claude.ai with the same account" without ever touching the bridge pipe. So the real binaries cannot be reused ungated.

This project replaces both halves with ungated reimplementations. The extension itself is not modified — only its native-messaging host is swapped (a manifest path change) and a permission seed is applied to its chrome.storage.local (reversible).

Architecture

┌─────────────┐  JSON-RPC 2.0 (stdio)   ┌──────────────────┐  named pipe        ┌─────────────────────┐  native messaging   ┌────────────┐
│  MCP client │ ───────────────────────▶ │  src/mcp-server  │ ──────────────────▶│  src/native-host     │ ───────────────────▶│ extension │
│ (Claude etc)│                          │  .mjs (22 tools) │  \\.\pipe\chrome-  │  .mjs (manifest     │  4-byte-LE + JSON   │ (chrome.   │
└─────────────┘                          └──────────────────┘   mcp-bridge-<user>  │  `path`, ungated)   │                     │  debugger) │
                                                                                    └─────────────────────┘                     └────────────┘
  • src/native-host.mjs — Chrome spawns this (via the manifest path) when the extension calls connectNative. Handles the extension handshake (pingpong, get_statusstatus_response, sends mcp_connected), and relays tool_request/tool_response to/from a named-pipe IPC server. One-in-flight dispatch (the extension processes requests sequentially).
  • src/mcp-server.mjs — spawned by the MCP client over stdio. Speaks JSON-RPC 2.0 (protocol 2025-06-18). Exposes all 22 tools (static catalog from tools/list). On tools/call, connects to the IPC pipe, sends a tool_request, awaits the matching tool_response, translates the result to MCP content (text + base64 images).
  • src/protocol.mjs — shared 4-byte-LE-length-prefixed frame codec (used for both native messaging and IPC), message constructors, and extension→MCP content translation.
  • src/tools.mjs — the 22-tool catalog, captured verbatim from the official server's tools/list.

Both wire protocols share the same framing (4-byte little-endian length prefix + UTF-8 JSON), so one codec serves both.

The 22 tools

tabs_context_mcp, tabs_create_mcp, tabs_close_mcp, navigate, computer (left_click/right_click/type/screenshot/wait/scroll/key/left_click_drag/double_click/triple_click/zoom/scroll_to/hover), browser_batch, read_page, find, form_input, javascript_tool, get_page_text, resize_window, read_console_messages, read_network_requests, gif_creator, upload_image, file_upload, shortcuts_list, shortcuts_execute, switch_browser, list_connected_browsers, select_browser.

Schemas are in src/tools.mjs — identical to the official server's.

Install

1. Native host (so Chrome spawns this bridge instead of the gated CLI host)

:: copy the launcher into Chrome's native-host dir
copy install\chrome-native-host-bridge.bat  %USERPROFILE%\.claude\chrome\

:: repoint the manifest `path` to it (edit the JSON at)
::   %APPDATA%\Claude Code\ChromeNativeHost\com.anthropic.claude_code_browser_extension.json
::   "path": "C:\\Users\\<you>\\.claude\\chrome\\chrome-native-host-bridge.bat"

The manifest name must stay com.anthropic.claude_code_browser_extension (the extension looks for that exact native-messaging host name) and allowed_origins must include chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/.

Then reload the Claude extension at chrome://extensions. Chrome spawns chrome-native-host-bridge.batsrc/native-host.mjs, which creates the IPC pipe and completes the extension handshake.

2. Permission seed (one-time, per domain)

The extension's per-domain permission gate (checkPermission) has no auth check — a stored always-allow entry short-circuits to allowed with no prompt and no login. Seed it for any domain you want to navigate/interact with:

// chrome://extensions → Claude extension → "Service Worker" → paste:
// (edit NETLOCS in scripts/seed-permission.js first)

See scripts/seed-permission.js. tabs_context_mcp and tabs_create_mcp need no permission; navigate and most computer actions on a tab need the tab's netloc seeded.

3. MCP client (add this server to your MCP client)

# Claude Code example:
claude mcp add chrome-mcp-bridge -- node C:/Users/<you>/work/chrome-mcp-bridge/src/mcp-server.mjs

Any MCP client that can spawn a stdio command works.

Usage / test

# offline: list the 22 tools (no bridge needed)
node test/drive-mcp-server.mjs list

# end-to-end (bridge must be up = extension reloaded):
node test/drive-mcp-server.mjs tabs                           # tabs_context_mcp
node test/drive-mcp-server.mjs navigate https://example.com   # navigate + screenshot
node test/drive-mcp-server.mjs call computer '{"action":"screenshot","tabId":123,"save_to_disk":true}'

Status

  • ✅ MCP server initialize + tools/list (all 22 tools, protocol 2025-06-18).
  • ✅ Native host: extension handshake (ping/get_status/mcp_connected) + IPC pipe + one-in-flight relay.
  • ✅ End-to-end tools/call flow proven ungated (no claude.ai login): tabs_context_mcpget_page_textjavascript_tool (javascript_exec), all relayed through the bridge.
  • javascript_exec reads SPA page content that get_page_text misses: on a cloud.tencent.com doc page, get_page_text returned 250 chars (marketing shell only); javascript_exec (wait + innerText extract) returned 1011 chars including the real API-action list the SPA loads async. So for JS-rendered pages, prefer javascript_exec.
  • Reversible: restore the manifest path to the original chrome-native-host.bat to return to the gated CLI host; chrome.storage.local.remove("permissionStorage") to undo the seed.

How it was reverse-engineered

See docs/protocol.md. Short version:

  1. Tool catalog — captured verbatim from the official claude --claude-in-chrome-mcp server's tools/list (it's static metadata, returned even with the bridge down).
  2. Extension native-messaging protocol — reverse-engineered from the extension's service worker (service-worker.ts-*.js, mcpPermissions-*.js): pingpong, get_statusstatus_response, {type:"mcp_connected"}, {type:"tool_request",method:"execute_tool",params:{client_id:"claude-code",tool,args}}{type:"tool_response",result:{content:[…]}}. 4-byte-LE-length-prefixed UTF-8 JSON on stdio.
  3. Gate location — proven in both binaries (see above); neither can be reused, so both are reimplemented here.
  4. IPC protocol — our own design (we control both ends), reusing the native-messaging framing for simplicity.

License

MIT. Not affiliated with Anthropic. "Claude" and "Chrome" are trademarks of their owners. This is an independent, ungated reimplementation for authorized automation of your own browser.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured