Skip to content
Back to search

open-claude-in-chrome

Claude in Chrome, reverse-engineered and open-source. No domain blocklist. Any Chromium browser. Same 18 MCP tools, same performance.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/noemica-io--open-claude-in-chrome/badge.svg)](/listings/noemica-io--open-claude-in-chrome)

HTML

<a href="/listings/noemica-io--open-claude-in-chrome"><img src="/api/listings/noemica-io--open-claude-in-chrome/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

One flow, top to bottom, turns everything on — all 21 browser tools, `execute_code`, and the imitation-learning recorder.

Prerequisites

- **Node.js** v18+ - **Any Chromium browser** (Chrome, Edge, Brave, Arc, Opera, Vivaldi, etc.) - **Claude Code** v2.1.80+ (the recorder needs channels; browser automation alone works on v2.0.73+) - **An OpenAI API key** (used to transcribe recording narration)

Step 1: Install dependencies

npm install --prefix host
npm install --prefix host/codemode/worker

The second one is not optional: it provisions the sandbox that `execute_code` runs in. Skip it and the server falls back to fetching wrangler over the network on every cold start, which is the most common reason `execute_code` fails to come up.

Step 2: Load the extension

1. Go to `chrome://extensions` (or `brave://extensions` / `edge://extensions`) 2. Enable **Developer mode** 3. Click **Load unpacked** and select the `extension/` directory 4. Copy the **extension ID** shown under the extension name

Step 3: Register native messaging

./install.sh <your-extension-id>

If you use multiple browsers, pass all IDs: `./install.sh <chrome-id> <brave-id> <arc-id>`

Step 4: Restart your browser

Close **all** windows and reopen. The browser reads native messaging host configs on startup.

Step 5: Set your OpenAI key and enable the microphone

Right-click the extension icon → **Options**. Both of these are required before recording:

- Paste your **OpenAI key** and click **Save & validate** (transcribes your narration). - Click **Enable microphone** and allow the browser prompt. The recorder captures audio in a background page that can't show a permission prompt itself, so you grant mic access once here; otherwise recordings capture no voice.

Step 6: Add the server to Claude Code

The **hybrid** server exposes everything: all 21 tools directly, `execute_code` alongside (the model picks per call), and the recording channel.

claude mcp add open-claude-in-chrome-hybrid -- node /absolute/path/to/host/codemode/server-hybrid.js

Find the absolute path with `echo "$(pwd)/host"`.

Step 7: Launch with recording enabled

Channels are a research preview, so start Claude Code with the development flag (the name is the server from step 6):

claude --dangerously-load-development-channels server:open-claude-in-chrome-hybrid

Accept the one-time prompt and keep the session open — channels inject into a live interactive session, not `claude -p`. That's it: browser automation and recording are both on.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 676 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="extension/icons/icon128.png" width="96" alt="Open Claude in Chrome">
  3. </p>
  4. <h1 align="center">Open Claude in Chrome</h1>
  5. <p align="center">
  6. <em>Official Claude in Chrome gives you 58 blocked domains and two browsers.<br/>
  7. <strong>Open Claude in Chrome gives you the whole web.</strong></em>
  8. <br/>
  9. <sub>Clean-room reimplementation of Anthropic's browser extension. No blocklist. Any Chromium browser. 100% feature &amp; performance parity.</sub>
  10. <br/>
  11. <sub>by <a href="https://noemica.io">noemica</a></sub>
  12. </p>
  13. <p align="center">
  14. <a href="#whats-different">What's different</a> ·
  15. <a href="#installation">Install</a> ·
  16. <a href="#imitation-learning-recording">Imitation learning</a> ·
  17. <a href="#architecture">Architecture</a> ·
  18. <a href="https://youtu.be/n4-2fjOsGhw">Demo</a> ·
  19. <a href="https://www.noemica.io/blog/reverse-engineered-claude-in-chrome">How I built it</a>
  20. </p>
  21. ---
  22. <p align="center">
  23. <a href="https://youtu.be/n4-2fjOsGhw">
  24. <img src="https://img.youtube.com/vi/n4-2fjOsGhw/maxresdefault.jpg" alt="Demo — Claude on Tinder, Reddit, and Robinhood" width="820"/>
  25. </a>
  26. <br/>
  27. <sub><em>Watch Claude navigate Tinder, Reddit, and Robinhood — sites the official extension can't reach.</em></sub>
  28. </p>
  29. ---
  30. The official [Claude in Chrome](https://code.claude.com/docs/en/chrome) extension gives Claude Code full browser automation — as long as you stay within Anthropic's allowlist of "safe" sites. Open Claude in Chrome is a clean-room reimplementation that strips the restrictions while keeping all 21 MCP tools and matching the official extension's performance.
  31. ## What's Different
  32. | | Claude in Chrome | Open Claude in Chrome |
  33. |---|---|---|
  34. | **Domain blocklist** | 58 blocked domains across 11 categories | No blocklist. Navigate anywhere. |
  35. | **Browser support** | Chrome and Edge only | Any Chromium browser (Chrome, Edge, Brave, Arc, Opera, Vivaldi, etc.) |
  36. | **Source code** | Closed source | Open source (MIT) |
  37. | **Tools** | 21 MCP tools | Same 21 MCP tools |
  38. | **Performance** | Baseline | Identical |
  39. ### Blocked Domains in the Official Extension
  40. | Category | Blocked Sites |
  41. |----------|--------------|
  42. | Banking | Chase, BofA, Wells Fargo, Citibank |
  43. | Investing/Brokerage | Schwab, Fidelity, Robinhood, E-Trade, Wealthfront, Betterment |
  44. | Payments/Transfers | PayPal, Venmo, Cash App, Zelle, Stripe, Square, Wise, Western Union, MoneyGram, Adyen, Checkout.com |
  45. | BNPL | Klarna, Affirm, Afterpay |
  46. | Neobanks/Fintech | SoFi, Chime, Mercury, Brex, Ramp |
  47. | Crypto | Coinbase, Binance, Kraken, MetaMask |
  48. | Gambling | DraftKings, FanDuel, Bet365, Bovada, PokerStars, BetMGM, Caesars |
  49. | Dating | Tinder, Bumble, Hinge, Match, OKCupid |
  50. | Adult | Pornhub, XVideos, XNXX |
  51. | News/Media | NYT, WSJ, Barron's, MarketWatch, Bloomberg, Reuters, Economist, Wired, Vogue |
  52. | Social Media | Reddit |
  53. Open Claude in Chrome has **none of these restrictions**.
  54. ## Does it actually match the official extension?
  55. Yes — and rather than assert it, here is a benchmark. **[Read the full study →](benchmark/writeup/writeup.md)**
  56. <p align="center">
  57. <img src="docs/img/parity.png" alt="Turns per task against suite latency: the official extension and this harness cold are ringed together as statistically indistinguishable, with an arrow to this harness's best method showing 23% fewer turns and 15% less time" width="820">
  58. </p>
  59. 17 arms, each run over the same 12 held-out tasks from the
  60. [REAL](https://github.com/agi-inc/REAL) web-agent benchmark, same model and
  61. effort throughout (Sonnet, medium). What it found:
  62. - **Parity, out of the box.** The official extension and this harness, both cold,
  63. are statistically indistinguishable: 2.04 vs 1.95 min/task and 31.4 vs 32.6
  64. turns, at p=0.44 and p=0.67 on a paired permutation test, with identical
  65. accuracy. They differ only in per-action overhead — **0.31s vs 0.12s** per
  66. browser action, 2.7× less.
  67. - **A higher ceiling.** The best method in the study lands **23% fewer turns and
  68. 15% less time** than the official extension, at 11/12 tasks passed against
  69. 8/12. Distil prior runs into a short per-site recipe, put it in the task
  70. prompt, and start from a warmed-up session.
  71. - **What actually helps.** Mounting raw prior experience on disk costs more than
  72. it returns (the agent spends 3.5× longer before its first browser action);
  73. compressing it into the prompt is what pays. Context is the dominant latency
  74. term at **+1.9s per turn per 100k tokens**, so more context is not free.
  75. - **Recordings.** This harness records raw, four-track browser traces and defers
  76. the analysis; Claude Cowork analyses each recording at capture time and keeps
  77. only the result. Distilled the same way by the same model, the raw recordings
  78. win both regimes — **6.6 fewer turns and 6.4 fewer minutes** when the material
  79. has to fit in a prompt (p=0.012, p=0.008).
  80. Caveats are in the writeup, not hidden: the task set saturates, one task's
  81. grading is ambiguous, and repeat runs of an identical configuration vary by
  82. 10–20%, so treat single-digit differences as noise.
  83. ## Architecture
  84. Default:
  85. ```
  86. Claude Code <--stdio MCP--> mcp-server.js <--TCP--> native-host.js <--native messaging--> Extension <--> Browser
  87. ```
  88. Code mode / hybrid (additive — `mcp-server.js` is reused unchanged as the upstream):
  89. ```
  90. Claude Code <--stdio MCP--> server-{codemode,hybrid}.js
  91. | spawns + proxies via MCP
  92. v
  93. mcp-server.js (child) <--TCP--> native-host.js <--native messaging--> Extension <--> Browser
  94. ^
  95. | HTTP tool-callback
  96. |
  97. workerd (wrangler dev sidecar)
  98. | Worker Loader → V8 isolate
  99. v
  100. sandboxed Worker runs LLM-written code
  101. ```
  102. Three components:
  103. 1. **Extension** — Manifest V3 with CDP-based browser automation (all 21 tools)
  104. 2. **MCP Server** — Node.js process started by Claude Code, exposes tools via MCP
  105. 3. **Native Messaging Host** — Bridge between the MCP server and the extension
  106. The codemode and hybrid servers add a fourth piece — a `wrangler dev` subprocess hosting a Cloudflare Worker that runs the LLM-generated code in a V8 isolate. The Worker calls back to the proxy over HTTP for actual tool execution, which is forwarded to the unchanged upstream `mcp-server.js`.
  107. ## Installation
  108. One flow, top to bottom, turns everything on — all 21 browser tools,
  109. `execute_code`, and the imitation-learning recorder.
  110. ### Prerequisites
  111. - **Node.js** v18+
  112. - **Any Chromium browser** (Chrome, Edge, Brave, Arc, Opera, Vivaldi, etc.)
  113. - **Claude Code** v2.1.80+ (the recorder needs channels; browser automation alone works on v2.0.73+)
  114. - **An OpenAI API key** (used to transcribe recording narration)
  115. ### Step 1: Install dependencies
  116. ```bash
  117. npm install --prefix host
  118. npm install --prefix host/codemode/worker
  119. ```
  120. The second one is not optional: it provisions the sandbox that `execute_code`
  121. runs in. Skip it and the server falls back to fetching wrangler over the network
  122. on every cold start, which is the most common reason `execute_code` fails to
  123. come up.
  124. ### Step 2: Load the extension
  125. 1. Go to `chrome://extensions` (or `brave://extensions` / `edge://extensions`)
  126. 2. Enable **Developer mode**
  127. 3. Click **Load unpacked** and select the `extension/` directory
  128. 4. Copy the **extension ID** shown under the extension name
  129. ### Step 3: Register native messaging
  130. ```bash
  131. ./install.sh <your-extension-id>
  132. ```
  133. If you use multiple browsers, pass all IDs: `./install.sh <chrome-id> <brave-id> <arc-id>`
  134. ### Step 4: Restart your browser
  135. Close **all** windows and reopen. The browser reads native messaging host configs on startup.
  136. ### Step 5: Set your OpenAI key and enable the microphone
  137. Right-click the extension icon → **Options**. Both of these are required before
  138. recording:
  139. - Paste your **OpenAI key** and click **Save & validate** (transcribes your narration).
  140. - Click **Enable microphone** and allow the browser prompt. The recorder captures
  141. audio in a background page that can't show a permission prompt itself, so you
  142. grant mic access once here; otherwise recordings capture no voice.
  143. ### Step 6: Add the server to Claude Code
  144. The **hybrid** server exposes everything: all 21 tools directly, `execute_code`
  145. alongside (the model picks per call), and the recording channel.
  146. ```bash
  147. claude mcp add open-claude-in-chrome-hybrid -- node /absolute/path/to/host/codemode/server-hybrid.js
  148. ```
  149. Find the absolute path with `echo "$(pwd)/host"`.
  150. ### Step 7: Launch with recording enabled
  151. Channels are a research preview, so start Claude Code with the development flag
  152. (the name is the server from step 6):
  153. ```bash
  154. claude --dangerously-load-development-channels server:open-claude-in-chrome-hybrid
  155. ```
  156. Accept the one-time prompt and keep the session open — channels inject into a
  157. live interactive session, not `claude -p`. That's it: browser automation and
  158. recording are both on.
  159. ## Verification
  160. Start a new Claude Code session and run both checks.
  161. **1. Browser control** — confirms the extension, native host and MCP server are wired up:
  162. ```
  163. Navigate to reddit.com and take a screenshot
  164. ```
  165. Reddit loads. No domain restriction.
  166. **2. The `execute_code` sandbox** — confirms the wrangler sidecar is live:
  167. ```
  168. In a single execute_code call: create a new tab, navigate to reddit.com, click
  169. the first post, then go back to the listing and give me every post title except
  170. the top three.
  171. ```
  172. You should get the titles back from **one** tool call rather than a
  173. click-screenshot-click sequence. If the first attempt reports the sandbox is
  174. still starting, wait a few seconds and ask again — the sidecar boots in the
  175. background and the first call can arrive before it is ready. If it never comes
  176. up, see [Keeping `execute_code` running](#keeping-execute_code-running).
  177. ## Keeping `execute_code` running
  178. **Where it runs.** `execute_code` evaluates your JavaScript in a Cloudflare
  179. Worker (a V8 isolate) hosted by a `workerd` sidecar that the MCP server starts
  180. with `wrangler dev`. That sidecar is a **child process of the MCP server**,
  181. which Claude Code itself spawns. There is no separate daemon, nothing to start
  182. by hand, and nothing that outlives Claude Code. It binds `127.0.0.1` on a free
  183. port, runs out of `host/codemode/worker`, and keeps its state in a per-variant,
  184. per-PID directory under your temp dir so the codemode and hybrid servers can run
  185. at the same time without racing each other.
  186. **Its lifetime is the MCP server's lifetime.** It is spawned in the background
  187. at server start so MCP startup never blocks on it (budget: 60s to boot,
  188. typically 3–5s), and it is torn down on SIGTERM/SIGINT/exit and when Claude Code
  189. closes the stdio pipe. So restarting or reconnecting the MCP server always gives
  190. you a fresh sidecar.
  191. **There is no health check and no auto-restart.** If the sidecar dies
  192. mid-session, `execute_code` stays down until the MCP server restarts. That is
  193. the behaviour to recognise: browser tools still work, only `execute_code` fails.
  194. To keep it reliable:
  195. 1. **Install the worker's dependencies** (Step 1, or `./install.sh`). Without
  196. `host/codemode/worker/node_modules` the server falls back to
  197. `npx --yes wrangler`, which needs the network on every cold start. This is
  198. the single most common cause of a sandbox that "sometimes isn't there".
  199. 2. **Recover with `/mcp`** in Claude Code. Reconnecting restarts the MCP server,
  200. which respawns the sidecar.
  201. 3. **If that doesn't take, clear strays and reconnect:**
  202. ```bash
  203. pkill -f "server-hybrid|server-codemode"; pkill -f wrangler
  204. ```
  205. 4. **Confirm it's up.** The server logs `[wrangler] Ready on http://127.0.0.1:<port>`
  206. and then `sandbox prewarmed in <n>ms`. `pgrep -fl wrangler` should show one
  207. process per registered codemode/hybrid server.
  208. 5. **Expect partial degradation, not failure.** If the sandbox never comes up the
  209. 21 passthrough tools keep working and only `execute_code` errors, so a broken
  210. sidecar looks like "code mode stopped working", not "the browser stopped
  211. working".
  212. ## Server variants
  213. The hybrid server from Step 6 is the superset and the one the install steps
  214. assume. Two leaner variants exist if you want them, and they can coexist —
  215. register more than one.
  216. **Default** — the 21 tools, nothing else:
  217. ```bash
  218. claude mcp add open-claude-in-chrome -- node /absolute/path/to/host/mcp-server.js
  219. ```
  220. **Code mode** — three tools: `execute_code`, `screenshot`, `zoom`. The model writes JS that calls `chrome.*` (the typed API for all 21 tools) in a sandboxed Cloudflare Worker, collapsing multi-step flows into one round trip:
  221. ```bash
  222. claude mcp add open-claude-in-chrome-codemode -- node /absolute/path/to/host/codemode/server-codemode.js
  223. ```
  224. Both of these carry the same sandbox as hybrid, so [Keeping `execute_code` running](#keeping-execute_code-running) applies to them too. Recording is only on the hybrid server.
  225. ## Imitation Learning (Recording)
  226. Teach Claude Code a browser task by doing it once. The extension records an
  227. expert rollout in two synchronized tracks — **what you did** (clicks, typing,
  228. scrolling, resolved to durable element anchors) and **why** (your spoken
  229. narration, transcribed) — across every tab, then hands the recording to a live
  230. Claude Code session over a [channel](https://code.claude.com/docs/en/channels).
  231. Claude reads the rollout and carries out the task, extrapolating to sister
  232. tasks. Enabled by the [Installation](#installation) flow above. Full design:
  233. [`docs/imitation-learning-alignment.html`](docs/imitation-learning-alignment.html).
  234. ### Record
  235. 1. Tell the session you're about to teach it something.
  236. 2. **Click the toolbar icon** to start. The badge walks a fixed pipeline:
  237. `…` (booting the mic, ~2.5s) → `REC` (talk now). Clicks during `…` are
  238. ignored.
  239. 3. Act and narrate out loud. Hold **Alt** while clicking to demonstrate an
  240. action *without* it firing (override/mask mode).
  241. 4. **Click the icon again** to stop. The badge shows `…` while the recording
  242. is transcribed and saved — clicks are ignored until the **paste-able
  243. reference lands on your clipboard** and the icon shows 📋. Only then is the
  244. icon live again. Paste the reference into Claude Code to point it at the
  245. recording. (If a Claude session with the channel is connected, it's also
  246. notified automatically and the tooltip says so — but the clipboard copy
  247. happens either way.)
  248. Recorded sessions are browsable under the extension's **Options** page (all
  249. captured data, disclosed in layers), each with its own **Copy reference** button.
  250. ### Verify recording works
  251. The minimum end-to-end check, the recorder's equivalent of the reddit test
  252. above. Do it in a session launched per step 7.
  253. 1. In the Claude Code session, say: *"I'm going to teach you something — wait for my signal."*
  254. 2. **Click the toolbar icon** (badge shows `REC`). Navigate to any page, click a
  255. couple of things, and **say two or three sentences out loud** about what
  256. you're doing. **Click the icon again** to stop.
  257. 3. Confirm:
  258. - The icon shows a **📋** and the reference is on your clipboard (paste it
  259. anywhere to check — it points at the recording folder).
  260. - **Options → Recorded sessions** shows the session with events > 0,
  261. **utterances > 0**, a working **audio player**, a **frame count**, and your
  262. words under **Narration**.
  263. - `trace.json` and `images/` exist under
  264. `~/.config/open-claude-in-chrome/recordings/<recording_id>/`.
  265. - If a channel session is connected: a `<channel … event="recording_complete" …>`
  266. message appears and Claude acknowledges it and reads the trace.
  267. If utterances is 0 or there's no audio, the mic wasn't enabled — redo
  268. Installation step 5. If nothing saved (no 📋), the native host isn't running —
  269. rerun `./install.sh <extension-id>` and restart the browser. If no channel
  270. message appears, the session wasn't launched with the flag in step 7 (or a
  271. stale MCP server is running — `pkill -f "server-hybrid"` and reconnect with
  272. `/mcp`).
  273. **The real test** (beyond the minimum): one narrated rollout of a task, then a
  274. *sister task* — same shape, different specifics — that Claude completes unaided
  275. from the recording. That's the proof the trace teaches rather than replays.
  276. ### Status & limitations
  277. The MCP channel, the `recording_ack` round-trip, the primary→client event
  278. routing, the transcription + track merge, and the native-host file writes are
  279. validated outside the browser; the in-browser capture, mic, and stop pipeline
  280. are wired and awaiting your live pass above. Known v1 choices:
  281. - The bundle is written by the **native host** (a Node process with filesystem access) to `~/.config/open-claude-in-chrome/recordings/<id>/` — `trace.json`, `SCHEMA_v0.md`, and `images/`. No `chrome.downloads`, so no OS save dialog, and it saves whether or not Claude is connected.
  282. - **Four tracks**: behavior (discrete actions), cursor (raw trajectory), images (240p frames captured on events, ≤1/sec), narration. All references and files are just data; the agent reads what it wants.
  283. - The viewer keeps small copies of the audio and frames in IndexedDB (the Options page can't read the on-disk files). Long recordings accumulate; a "keep last N" cleanup is a later refinement.
  284. - The capture layer is purpose-built (anchors + effects + heuristics), not a vendored rrweb.
  285. ## Code Mode Test Client
  286. A self-explanatory in-browser test suite for comparing default / code-mode / hybrid behavior across the kinds of flow they each should excel at. Lives in `scratch/test-form/`.
  287. ### Serve it
  288. ```bash
  289. cd scratch/test-form
  290. python3 -m http.server 8765
  291. ```
  292. Open `http://localhost:8765/`. The page is a four-challenge suite the agent works through end-to-end:
  293. 1. **Single-Screen Form** — everything visible in one screenshot. A model that captures the layout once should be able to batch all clicks + types + submit into a single round trip.
  294. 2. **Multi-Step Wizard** — three steps where step 2's fields depend on step 1's choice. Forces screenshot → action → screenshot, no batching across steps.
  295. 3. **Repeat Submissions** — the same Challenge 1 form, submitted three times with different values. Coordinates don't change; this is where pre-planned batching pays off most.
  296. 4. **Click Sequence** — a 3×3 grid plus a randomly-generated ordering. Every coordinate is visible at once; the model can batch nine sequential clicks from one screenshot.
  297. Completion is non-ambiguous: the suite ends on a green "All Challenges Complete" banner with a per-challenge wall-clock table. A sticky progress header on every page shows the current challenge number and a ✓ for each completed one.
  298. ### Run the experiment
  299. ```
  300. YOU MUST NOT USE THE FOLLOWING TOOLS IN ANY CAPACITY: form_input || javascript_tool
  301. TASK:
  302. Open http://localhost:8765/ on a new tab and complete every challenge on the page. Follow the on-page instructions until you reach the "All Challenges Complete" banner.
  303. For the MCP use only (not any of the other ocic MCPs): open-claude-in-chrome||open-claude-in-chrome-codemode||open-claude-in-chrome-hybrid
  304. ```
  305. What to look for across the three MCP variants:
  306. - Challenge 1: ratio of screenshots to actions. Default tends to look-act-look-act; code-mode/hybrid should look once then batch.
  307. - Challenge 2: all three should look comparable — visual feedback is required between steps regardless of MCP.
  308. - Challenge 3: this is where the gap should open. One screenshot up front, then three batched form-fills in code-mode/hybrid vs. fresh look-act loops in default.
  309. - Challenge 4: similar. Coordinates fixed, sequence visible. Code mode batches the nine clicks; default clicks one at a time.
  310. If the model still uses direct tools on the second submission, that's a signal the `execute_code` description needs tuning — see `host/codemode/common.js` (`buildExecuteCodeDescription`) and the per-server `EXTRA_NOTES`.
  311. #### Results
  312. #### Final Results Table
  313. ## Available Tools
  314. Every tool, its purpose, and its parity with the official Claude in Chrome extension:
  315. - **✓** — in parity with Claude in Chrome (same interface, same behavior)
  316. - **✗** — present but diverges (a stub, or a capability gap — see the notes)
  317. - *(blank)* — a new tool with no Claude in Chrome equivalent
  318. | Tool | Purpose | Parity |
  319. |------|---------|:------:|
  320. | `tabs_context_mcp` | Get tab group context | ✓ |
  321. | `tabs_create_mcp` | Create a new tab | ✓ |
  322. | `tabs_close_mcp` | Close a tab | ✓ |
  323. | `navigate` | Navigate to URL, back, forward | ✓ |
  324. | `computer` | Mouse, keyboard, screenshot, zoom | ✓ |
  325. | `read_page` | Accessibility tree with element refs | ✓ |
  326. | `get_page_text` | Extract article/main text | ✓ |
  327. | `find` | Find elements by text/attributes | ✓ |
  328. | `form_input` | Set form values by ref | ✓ |
  329. | `javascript_tool` | Execute JS in page context | ✓ |
  330. | `read_console_messages` | Console output (filtered) | ✓ |
  331. | `read_network_requests` | Network activity | ✓ |
  332. | `resize_window` | Resize browser window | ✓ |
  333. | `file_upload` | Attach local file(s) to a file input (by ref) | ✓ |
  334. | `upload_image` | Attach a captured screenshot to a file input (by ref) | ✗ |
  335. | `gif_creator` | GIF recording | ✗ |
  336. | `shortcuts_list` | List shortcuts | ✗ |
  337. | `shortcuts_execute` | Run a shortcut | ✗ |
  338. | `switch_browser` | Hand off automation to another Chromium browser | ✗ |
  339. | `execute_code` | Run sandboxed JS that drives every tool via `chrome.*` | |
  340. | `update_plan` | Present a plan for approval | |
  341. | `set_tab_focus` | Surface a tab: select it, optionally raise its window | |
  342. | `get_config` | Read automation settings and the catalog of what they do | |
  343. | `set_config` | Change a setting, globally or for one tab | |
  344. | `recording_ack` | Confirm an imitation-learning recording event | |
  345. | `retranscribe_recording` | Re-run transcription for a failed recording | |
  346. | `debug` | Read what the extension actually did — the detail tool results omit | |
  347. | `debug_timings` | Per-call timing diagnostics | |
  348. Notes on the divergences (✗):
  349. - `file_upload` matches Claude in Chrome's interface (`paths`, `ref`, `tabId`) but does **not** restrict sources to session-shared paths — any absolute path on this machine is accepted.
  350. - `upload_image` is file-input-only (target it by `ref`); Claude in Chrome additionally supports dropping an image at a `coordinate` (e.g. Google Docs).
  351. - `gif_creator`, `shortcuts_list`, and `shortcuts_execute` are stubs.
  352. - `switch_browser` releases the shared runtime for ~15s so another browser can take over, in place of Claude in Chrome's `list_connected_browsers` / `select_browser` pair.
  353. ## Humanized input
  354. Browser automation normally dispatches input the shortest way possible: the
  355. cursor teleports to a target, the button is pressed and released instantly, a
  356. scroll arrives as one jump. That is efficient, and it looks nothing like a
  357. person.
  358. Turn `humanize` on and input is driven the way a hand drives it — curved cursor
  359. paths with acceleration and overshoot, clicks that land off-centre with a real
  360. press dwell, scrolls decomposed into momentum ticks, and typing with
  361. human-shaped inter-key timing:
  362. ```
  363. set_config({ key: "humanize", value: true })
  364. ```
  365. Measured on an instrumented page, the same three clicks produce **3 mouse-move
  366. events with it off and 41 with it on** (2 vs 39 distinct points) — while clicks,
  367. mousedowns and mouseups come out identical. That is the guarantee: randomisation
  368. changes *where inside a target* you land, *how* the cursor gets there, and
  369. *when* — never *what happens*. Same element, same text, same scroll position.
  370. Realism costs wall-clock, so the time affordance is a setting:
  371. | `humanize_speed` | |
  372. |---|---|
  373. | `fastest` | The shape of human motion, compressed — for getting through a lot |
  374. | `fast` *(default)* | Fewer path samples and shorter pauses |
  375. | `natural` | Genuine human cadence |
  376. | `relaxed` | Unhurried motion (typing stays near natural — see below) |
  377. Every tier keeps movement before the click, real key events and identical
  378. outcomes; faster tiers use fewer path samples and shorter pauses, never none.
  379. Typing is scaled separately from motion, because its cost is per *character*
  380. rather than per action: the slow tier stretches cursor movement but barely
  381. stretches typing, since an unhurried person still types at their own speed.
  382. For reference, `humanize` off takes ~0.2s to type 15 characters, which is the
  383. floor imposed by CDP dispatch itself. The ceiling is deliberate too — a slower
  384. tier measured at ~4.2s for the same text was cut, because a setting nobody
  385. would pick is a trap rather than an option.
  386. Settings can be scoped to one tab (`set_config({ key, value, tabId })`),
  387. and `get_config` returns the catalog of recognised settings so the current set
  388. is always discoverable rather than documented only here.
  389. Note that typing emits real `keydown`/`keyup` events **regardless** of this
  390. setting — that is parity with Claude in Chrome, which does the same, not a
  391. humanization extra. `humanize` only changes the timing between them.
  392. ## Auditing agent sessions
  393. Watch back what an agent did in the browser, instead of asking the session to
  394. describe its own work. Off by default:
  395. ```js
  396. set_config({ key: "audit_mode", value: "audit" })
  397. ```
  398. With it on, the first action against a tab starts an [rrweb](https://rrweb.io)
  399. DOM recording in it, and the extension stitches those into **one timeline per
  400. Claude Code session**, under **Audits** on the options page. Press play once and
  401. the replay runs start to finish, switching tabs on its own.
  402. It is a *mode* rather than a flag because a later `teach` mode wants the
  403. opposite masking default — an audit should mask what a person types, while
  404. training data is exactly that text.
  405. **How a session is attributed.** The native host already namespaces every
  406. request as `h{clientId}_{id}` so replies route back to the client that asked,
  407. and the extension echoes that id back untouched. Reading the prefix is enough to
  408. know which Claude Code session performed an action, so two agents driving two
  409. tabs produce two independent audits rather than one interleaved mess.
  410. **Streams and segments.** rrweb node ids are integers scoped to a single
  411. snapshot, so two tabs' event streams can never be concatenated — the ids would
  412. collide and both replays would corrupt. A **stream** is therefore one recording
  413. in one tab, living until its document does, and a **segment** is a run of
  414. consecutive actions in one tab. Returning to a tab opens a *new* segment over
  415. the *same* stream. Continuity is built at the timeline layer, never in the data.
  416. A stream costs almost nothing while idle, because rrweb is event driven, but
  417. restarting one costs a full DOM snapshot — so the policy favours keeping streams
  418. alive: a 30-minute idle reaper and a 40MB cap exist only to stop a runaway page.
  419. Hitting the cap marks the stream `truncated` rather than silently stopping,
  420. since a replay that just ends looks identical to a session that ended there.
  421. **What it does and does not capture.** Recording runs in the extension's
  422. isolated world, so the page cannot observe it — no web API exposes content
  423. scripts — where a main-world injection would have to patch natives and could be
  424. spotted with a `toString` check. Canvas recording stays off: it is the one rrweb
  425. feature touching natives (`toDataURL`/`getImageData`) that anti-fingerprinting
  426. sweeps already watch.
  427. The cost of that choice is real and worth knowing before relying on a replay:
  428. | Captured | Not captured |
  429. |---|---|
  430. | DOM structure, text, attributes, ARIA | Video and audio content (elements and play/pause only; `blob:`/MSE sources will not replay) |
  431. | Mutations, input, scroll, mouse | Canvas and WebGL |
  432. | Open shadow roots, adopted stylesheets | Closed shadow roots created before recording started |
  433. | Same-origin CSS (inlined) | Cross-origin CSS — CORS-blocked, cannot be inlined |
  434. | | Assets behind auth or short TTLs, which are referenced by URL and re-fetched at replay |
  435. In short it is excellent for anything marked up and blind to anything *painted*,
  436. which is why the recorder's own image track is not replaced by it.
  437. ### Claude in Chrome tools not yet supported in Open Claude in Chrome
  438. - `browser_batch` — run several tool calls in one round trip. Open Claude in Chrome instead offers `execute_code`, which runs arbitrary JS driving the same tools in one call.
  439. - `list_connected_browsers` — enumerate attached browsers.
  440. - `select_browser` — pick which browser drives automation.
  441. - `upload_image` drop-at-coordinate — Open Claude in Chrome's `upload_image` attaches to a file input by `ref` only.
  442. ## Updating After Code Changes
  443. No build step. All files are plain JavaScript. After pulling or editing code:
  444. | What changed | What to do |
  445. |---|---|
  446. | `extension/background.js`, `extension/content.js`, `extension/manifest.json`, or `extension/recorder/*` | Reload the extension: `brave://extensions` > click the reload icon |
  447. | `host/mcp-server.js` | Kill stale servers and reconnect: `pkill -f "node.*mcp-server"` then `/mcp` in Claude Code |
  448. | `host/codemode/*.js` or `host/codemode/worker/*` | Kill the codemode server: `pkill -f "server-codemode\|server-hybrid"` and `pkill -f wrangler`, then `/mcp` in Claude Code |
  449. | `host/native-host.js` | Restart the browser (close all windows, reopen) |
  450. | `install.sh` or native host name changed | Re-run `./install.sh <extension-id>`, restart browser, re-add MCP |
  451. ### Quick reset (nuclear option)
  452. If things are broken and you're not sure why:
  453. ```bash
  454. # 1. Kill all MCP servers
  455. pkill -f "node.*mcp-server"
  456. # 2. Re-run install
  457. ./install.sh <your-extension-id>
  458. # 3. Restart browser (close all windows, reopen)
  459. # 4. Reload extension in brave://extensions
  460. # 5. Reconnect in Claude Code
  461. # /mcp
  462. ```
  463. ## Multiple Sessions
  464. Multiple Claude Code sessions can share the same browser extension. The first session becomes the "primary" (owns the TCP port), and subsequent sessions connect as clients through the primary. All sessions can use the browser simultaneously.
  465. If a session disconnects, kill stale servers and reconnect:
  466. ```bash
  467. pkill -f "node.*mcp-server"
  468. # then /mcp in each Claude Code session
  469. ```
  470. ## Community
  471. Questions, ideas, or something broken? **[Join the Discord](https://discord.gg/F4HBKAEbNg)** — good place to ask
  472. before filing an issue, and where feature discussion happens.
  473. ## Troubleshooting
  474. ### Extension not connecting
  475. 1. Verify the extension is loaded and enabled
  476. 2. Check that `./install.sh` was run with the correct extension ID
  477. 3. Restart the browser completely (all windows)
  478. 4. Verify the native messaging host manifest exists:
  479. - **Chrome (macOS)**: `~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.open_claude_in_chrome.json`
  480. - **Brave (macOS)**: `~/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/com.anthropic.open_claude_in_chrome.json`
  481. - **Edge (macOS)**: `~/Library/Application Support/Microsoft Edge/NativeMessagingHosts/com.anthropic.open_claude_in_chrome.json`
  482. ### MCP server not found
  483. Use an absolute path:
  484. ```bash
  485. claude mcp add open-claude-in-chrome -- node /absolute/path/to/host/mcp-server.js
  486. ```
  487. ### "Browser extension is not connected"
  488. The MCP server started but the native host hasn't connected. Try:
  489. 1. Open any webpage (wakes the service worker)
  490. 2. Check service worker logs: `chrome://extensions` > "Inspect views: service worker"
  491. 3. Verify `host/native-host-wrapper.sh` exists
  492. ### Tools fail immediately after reconnect
  493. This used to mean a stale MCP server from an earlier session was holding the
  494. shared port, and the fix was to `pkill` them. That is no longer possible: the
  495. native host owns the bridge, sessions only connect to it, and a leftover
  496. process holds nothing anyone needs.
  497. If tools still fail, the browser side is the place to look — see "Browser
  498. extension is not connected" above.
  499. ### Changing the rendezvous
  500. Sessions and the native host meet on a named pipe (`\\.\pipe\open-claude-in-chrome-<user>`
  501. on Windows, a unix socket under a 0700 directory on macOS and Linux). The name
  502. is derived from your username, so nothing needs configuring and two users on the
  503. same machine cannot collide.
  504. To override it — normally only useful for running an isolated second instance:
  505. 1. Create `~/.config/open-claude-in-chrome/config.json`:
  506. ```json
  507. { "pipe": "/tmp/my-own-bridge.sock" }
  508. ```
  509. 2. Restart the browser and Claude Code
  510. `OCIC_PIPE` does the same thing per-process, which is how the test suite stands
  511. up a whole host + client fleet without touching a live install.
  512. ## License
  513. MIT
  514. Built by [Sebastian Sosa](https://github.com/CakeCrusher) ([Noemica](https://noemica.io))

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.