
chrome-mcp-bridge
io.github.xiaokillua/chrome-mcp-bridge
Read, scroll, fill forms and inspect developer diagnostics in assigned Chrome tabs.
Documentation
Chrome MCP Bridge
Install step by step · Download v0.1.0 preview · Live benchmark · Self-hosting · MCP Registry · 简体中文
Connect Codex or another MCP client to Chrome tabs you assign. Read pages as structured text, scroll long pages and individual panels, fill forms, and inspect console messages or request timing in your existing Chrome profile.
Each AI session has its own tabs. Tabs in the same Chrome profile still share cookies and sign-in state.
Quick start
Start with the step-by-step installation guide. It shows what to download, what to paste into Terminal or PowerShell, and which buttons to click in Chrome.
The first test opens a new Chrome tab and reads the title Example Domain. There are separate instructions for other AI clients and updating a previous installation.
Connection and usage results
The release checks used a fresh CLI installation, an unpacked extension and a temporary Chrome profile. Once paired, chrome-mcp-bridge doctor reported bridge: true, chrome: true and paused: false.
| Client or connection | What was verified |
|---|---|
| Codex CLI 0.154.0 on macOS · local stdio | The Codex app server discovered 18 tools, opened a tab, filled and submitted a form, then read its confirmation page. The fixture received exactly one POST with the requested text. The test invoked the tools directly through Codex and made zero model requests. |
| Claude Code 2.1.334 on macOS · local stdio | With the generated client configuration and a paired browser, claude mcp list reported Connected. This check covers the handshake. Browser actions were exercised separately through Codex and the MCP SDK. |
| Self-hosted web connection · HTTPS + OAuth | The MCP test client authorized with the test gateway, opened an allowed site in Chrome and read its page over the paired helper’s WSS connection. |
| ChatGPT web and Claude web | Both have setup instructions. Signing in through each vendor’s live connector UI and running a task in that account remain unverified. |
For a first task, ask your client to open a session, visit https://example.com and report its page title. For an existing tab, open a session first and assign the tab in the extension popup. Installation and pairing
Fresh installation on Windows and Ubuntu
On December 2, 2026, three clean GitHub-hosted VMs installed the public v0.1.0 release with Node.js 24.22.3 and the commands in the installation guide. Each paired with stock Google Chrome and reported bridge: true, chrome: true and paused: false.
| Test environment | Google Chrome | Codex CLI 0.154.0 result |
|---|---|---|
| Windows 11 (ARM64) | 158.0.8127.37 | Found 18 tools and read Example Domain in a new tab. |
| Windows Server 2025 (x64) | 158.0.8127.89 | Found 18 tools and read Example Domain in a new tab. |
| Ubuntu 24.04 (x64) | 158.0.8127.36 | Found 18 tools and read Example Domain in a new tab. |
The automated run verified Developer mode, selected the extracted ZIP folder through Chrome's test API, paired through the extension popup, and wrote the generated settings to a fresh Codex CLI profile. Codex invoked the browser tools directly with zero model requests. The separate desktop check opened the native folder chooser on Windows 11 and Ubuntu. The hosted desktop automation stopped at folder confirmation. Passing installation run · Native chooser check
Reddit token comparison
Chrome MCP Bridge returned 53.8% fewer tool-response content tokens than Computer Use in one live Reddit run. Both tools read the same Chrome tab at three points and found the newly visible posts, the original post and its comments.
| Step | Chrome MCP Bridge | Computer Use |
|---|---|---|
| Read the Reddit homepage | 2,109 | 5,410 |
| Read the feed after scrolling down 670 px | 3,170 | 12,698 |
| Read the same post and its comments | 7,062 | 8,617 |
| Total | 12,341 | 26,725 |
Chrome MCP Bridge used viewport snapshots for the first two steps and a full snapshot for the post. Computer Use returned its native accessibility tree for the first step and accessibility diffs for the next two. We counted the returned text with o200k_base. The totals cover the three browser observations. End-to-end chat usage and billing also depend on tool arguments, conversation history, reasoning and the final answer.
Reddit full-turn token comparison
In a separate replay benchmark, Codex reported 59,143 total tokens for Chrome MCP Bridge and 83,712 for Computer Use. Chrome MCP Bridge used 24,569 fewer tokens (29.3%) across the complete model turn.
We recorded both tools' responses in the same Chrome tab on the Reddit homepage, after scrolling 670 px, and on the same discussion. A local script delivered the recorded responses immediately to two fresh Codex turns with the same prompt, tool schema, gpt-6-astra model and medium reasoning effort. Each run made three sequential tool calls and completed in four model responses. Both answers reported the homepage title, a topic from the scrolled feed, and two suggestions from the discussion's comments.
| Codex usage | Chrome MCP Bridge | Computer Use |
|---|---|---|
| Input | 58,968 | 83,539 |
| ↳ Cached input | 36,096 | 34,432 |
| ↳ Uncached input | 22,872 | 49,107 |
| Output | 175 | 173 |
| ↳ Reasoning output | 0 | 0 |
| Full-turn total | 59,143 | 83,712 |
These figures come from Codex's thread/tokenUsage/updated accounting. The totals include input and model output, including tool calls and the final answer. Cached input and reasoning output are included in their parent rows. The browser observations were captured live and replayed without a manual relay during either model turn. This benchmark measures one pair of replayed turns. Live browser latency and billing require separate measurements.
Reddit live run benchmark
In one pair of live Chrome runs, Chrome MCP Bridge used 65.8% fewer total tokens and completed 21.04 seconds sooner (44.8% less elapsed time) than Computer Use.
| Codex measurement | Chrome MCP Bridge | Computer Use |
|---|---|---|
| Full-turn tokens | 120,875 | 353,330 |
| Cached input | 98,944 | 298,752 |
| Uncached input | 21,563 | 54,159 |
| Model output | 368 | 419 |
| Model tool calls | 3 | 6 |
| Elapsed time | 25.94 s | 46.99 s |
Two fresh Codex turns used gpt-6-astra with medium reasoning effort and the same Chrome profile. Each opened Reddit, scrolled the live feed, and read the same discussion and its comments. Tool results flowed back automatically as the browser ran. Elapsed time covers the model turn from start to final answer, including tool waits. The bridge grouped navigation and snapshots into three model calls, Computer Use made six calls, and the live feed and cache hits varied between runs. These figures come from one pair of live turns.
ChatGPT and Claude on the web
Deploy the self-hosted gateway to a domain with HTTPS. Connect the local helper with the deployment’s device credential, add its /mcp URL to your AI account, then authorize access with OAuth. Add each permitted target site’s exact origin in the Chrome extension. The local helper must run while using a web client.
The gateway uses one owner account and one paired computer. Remote tool results transit the gateway. Keep the server and logs under your control, and share only tabs and sites whose data you intend to send to your AI provider.
Tool surface
session_open,session_closemanage browser sessions. After opening a session, reuse itssessionId.browser_tabs,browser_open,browser_navigate,browser_closemanage assigned tabs.browser_snapshot,browser_screenshot,browser_waitread browser state. Use the latest snapshot to obtain element references. Setmode: "controls"to skip page text for click and form tasks. See token use for the comparison with screenshots.browser_click,browser_fill,browser_press,browser_scrollinteract with the page.browser_selectchooses a native dropdown option by label, andbrowser_set_checkedsets a checkbox to the requested state.debug_console,debug_network,debug_performanceexpose selected Chrome developer diagnostics. Enter passwords and verification codes manually.
If a write returns outcome_unknown, inspect the page in Chrome before repeating it. When the local broker receives an uncertain write result from the extension, it ends that session and drops its queued operations. To resume through MCP, open a new session and assign the existing tab to it.
Scrolling and form submission
Use these calls to reach Save or Next near the bottom of a long page.
- Take a
browser_snapshotwithmode: "controls". The default scope gives on-screen controls priority when the list exceeds 100. Usescope: "viewport"to see just the controls in view. - Call
browser_scrollwith a signeddeltaYto scroll the document. For a separately scrolling panel, identify it by name or on-screen bounds inscrollRegionsand pass itsreftobrowser_scroll. CheckmovedByfor the actual distance andatBottomfor the current boundary. If more than eight panels are visible, passnextRegionOffsetback asregionOffsetto list the next group. - Take a fresh snapshot and click the target using its latest
elementsref. If the site adds content asynchronously, wait for the expected text or take another snapshot after it appears. A panel can grow after reaching its current bottom.
To enumerate rendered controls in document order, use scope: "document". If the result includes nextControlOffset, pass it as controlOffset on the next snapshot with the same scope. Restart from offset zero after scrolling or when the list changes. Each response contains up to 100 controls. Full mode also includes up to 12,000 characters of page text. Scrolling works with native document and panel scrollbars. Canvas views driven by wheel gestures, iframes and shadow roots may require manual interaction.
Use browser_fill to enter ordinary values. A successful fill returns verified: true after checking the field text in the page. If a field truncates or rejects the input and its value differs, the tool reports outcome_unknown. To save a verified edit, click the site's Save or Submit button and check the saved record. A text wait can also match a confirmation left over from an earlier save. For repeated edits, verify something specific to the latest update, such as the changed display name after reopening the profile.
Call session_close when a task finishes. If a local client exits without closing its session, the broker can keep the idle session for about an hour. The 32-session limit is shared across clients.
Links that open another tab
When a standard target="_blank" link opens a new tab, browser_click can return its newTabId for the same session. The bridge verifies that Chrome opened the link from the assigned source tab. A remote session must also have access to the final destination origin. If the tab was not assigned, Chrome still shows it and the user can assign it from the extension. JavaScript popups and named windows may require manual assignment. After upgrading an unpacked extension, reload it in chrome://extensions so Chrome picks up the navigation permission.
Chrome developer tools
The extension uses the Chrome debugger API to expose selected DevTools diagnostics as MCP tools.
| Tool | Output |
|---|---|
debug_console | Console messages, levels, timestamps and basic exception messages. Common credential formats are redacted and inspected objects are summarized by type. |
debug_network | Request origin and path, HTTP method, response status, duration and failure flag. The output excludes query strings, fragments, headers and request or response bodies. |
debug_performance | Basic page navigation and paint timings, and the number of recorded resources. |
Use a tab assigned to your AI session and a client with the debug capability. Loopback origins are enabled by default. Add any other site under Remote & developer permissions → Additional developer origins in the extension, including a port if needed. A remote client also needs the origin under Remote allowed origins.
Call debug_console or debug_network before reproducing an issue. Pass the returned nextCursor as cursor to that same tool to check for updates. Navigation clears the capture. For example, ask your AI to start recording on the assigned tab, reproduce a failing action, and report any console errors and the affected request’s status and duration. The preview covers these diagnostics only. Use Chrome DevTools for breakpoints, arbitrary JavaScript, full request inspection, or CPU and memory profiles.
Validation
The v0.1.0 preview passed 66 regression tests and an end-to-end run with Chrome for Testing. The checks use local fixtures, a temporary browser profile and a test certificate.
| Check | Verified coverage |
|---|---|
| MCP schema · 7 tests | Tool arguments, write classification, typed form inputs, text waits, snapshot scope and pagination, scroll targets and pixel bounds, and rejection of unsupported tools and restricted URLs |
| Local bridge · 3 tests | Client and tab-session isolation, queued permission changes, persisted revocation, prevention of queued writes after an uncertain result, and macOS launch configuration generation |
| Extension · 45 tests | Form controls, scrolling, snapshot references and diagnostic redaction. Cancelling debugger access releases that tab. Removing developer permission during a pending operation suppresses the diagnostic result. |
| Gateway · 11 tests | OAuth code and PKCE, token refresh and replay rejection, persisted grants, client-scoped revocation, malformed responses, cancellation on disconnect and validation of persisted credentials |
| Chrome end to end | Pair, open independent tabs, fill and click, capture a PNG, pause and resume, reconnect after broker and browser restarts, and call Chrome through HTTPS, OAuth and WSS |
| Scrolling and submission end to end | Read already rendered content below the fold, scroll to reveal an asynchronously rendered profile form, submit it, and verify both the server’s POST payload and the confirmation page |
| Long document · Chrome 159.0.8154.6 | Read 131 controls in two pages of 100 and 31. Scroll 5,168 px to the bottom, find 保存 (Save) in a fresh default snapshot, click it, and verify one POST and the confirmation page. |
| Independent panels · same Chrome run | With a sidebar covering the former wheel position, scroll the document 600 px while both panels stay put. Scroll the main panel to 1,344 px, find 下一页 (Next), click it, and verify one POST and the updated page text. A further scroll at the sidebar’s bottom moves 0 px and leaves the main panel and document in place. |
| Form controls and new tabs end to end | Select a region, set a checkbox twice without toggling it back, wait for the asynchronous save message, and verify the POST. Click a new-tab link and verify tab isolation, including a remote redirect to an origin the session cannot access. |
| Rejected or truncated text end to end | Request ABCDEF from two fields. Chrome retains ABC in a three-character field and an empty value in a field that rejects input. Both MCP calls report outcome_unknown, and the affected sessions expire immediately. |
| Chrome DevTools end to end | Capture a console message, check a real fixture request’s method, status and duration, read navigation timing and resource count, check the paint timing output, and verify that adding and removing a developer origin changes access |
| Packaging and deployment smoke checks | Install the CLI tarball into a fresh prefix and pair the extracted extension. Build the gateway from clean source on Linux arm64, run its 11 tests on Node 24, and verify HTTPS, OAuth, device communication and credential persistence across a container restart. |
The token comparison records three runs on a simple form and a denser page, with screenshot costs labeled as estimates.
Reproduce from source
pnpm install --frozen-lockfile
pnpm build
pnpm typecheck
pnpm exec playwright install chromium
pnpm test
pnpm test:browser
pnpm package:preview
To include the Codex tool-call check, run CHROME_MCP_TEST_CODEX=codex pnpm test:browser with the Codex CLI on your PATH. To test installed release artifacts, set CHROME_MCP_TEST_CLI to the absolute path of the installed CLI script and CHROME_MCP_TEST_EXTENSION to the unpacked extension directory.
The repository’s CI workflow runs the build, type check, tests, packaging and Docker build on Ubuntu with Node.js 24. On a fresh Linux machine, use pnpm exec playwright install --with-deps chromium to install the browser’s system dependencies.
For development, use node apps/bridge/dist/cli.js setup and load apps/extension/dist as the unpacked extension. Release artifacts and SHA-256 checksums are written to release/. Packaging requires zip. The browser test uses openssl to create an isolated test certificate.
If you try Chrome MCP Bridge, share your browser, client and what happened in GitHub Issues. If it helps your workflow, star the repository to follow updates.
MIT licensed.
No installation packages available.