claude-chrome-android 1.1.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,40 +1,72 @@
1
1
  # claude-chrome-android
2
2
 
3
- Browser bridge for Claude Code on Android — connects the Claude Code CLI in Termux to Chrome/Edge via WebSocket.
3
+ Browser bridge for Claude Code on Android — connects the Claude Code CLI in Termux to Chrome/Edge via WebSocket + MCP.
4
4
 
5
5
  ## Quick Start
6
6
 
7
7
  ```bash
8
- # In Termux:
9
- npx claude-chrome-android --setup # one-time setup
10
- npx claude-chrome-android # start bridge
8
+ # In Termux — one-time setup:
9
+ npx claude-chrome-android --setup
10
+
11
+ # Start the bridge (must be running BEFORE opening Claude Code):
12
+ npx claude-chrome-android
13
+
14
+ # Then open a Claude Code session — browser tools are available as mcp__cfc-bridge__*
11
15
  ```
12
16
 
13
17
  ## Requirements
14
18
 
15
19
  - Android device with [Termux](https://termux.dev)
16
- - Chrome or Edge browser with the Claude Code Bridge extension (CRX)
20
+ - Chrome or Edge browser with the Claude Code Bridge extension
17
21
  - Node.js 18+ or Bun
18
22
 
19
23
  ## Usage
20
24
 
21
25
  ```bash
22
26
  claude-chrome-android # start the bridge server
27
+ claude-chrome-android --mcp # MCP server mode (spawned by Claude Code)
23
28
  claude-chrome-android --stop # stop a running bridge
24
- claude-chrome-android --setup # configure Termux URL opener + dependencies
29
+ claude-chrome-android --setup # register MCP + install CRX extension
25
30
  claude-chrome-android --version # show version
31
+ claude-chrome-android --help # show help
26
32
  ```
27
33
 
28
34
  ## How It Works
29
35
 
30
36
  1. The bridge runs a WebSocket server on `ws://127.0.0.1:18963`
31
37
  2. The browser extension connects and relays page content to Claude Code
32
- 3. Claude Code MCP tools interact with the browser through the bridge
38
+ 3. Claude Code spawns `--mcp` as a thin MCP relay per session (~5MB)
39
+ 4. Multiple Claude Code sessions share one bridge via a FIFO tool queue
40
+
41
+ ```
42
+ Claude Code session 1 ─→ cli.js --mcp ─┐
43
+ Claude Code session 2 ─→ cli.js --mcp ─┤─→ HTTP POST /tool ─→ bridge (WS) ─→ extension
44
+ Claude Code session N ─→ cli.js --mcp ─┘
45
+ ```
46
+
47
+ ## Setup Details
33
48
 
34
- ## Extension Install
49
+ `--setup` performs three steps:
50
+
51
+ 1. **Registers MCP server** in `~/.claude/settings.json` as `cfc-bridge` — Claude Code spawns `cli.js --mcp` per session
52
+ 2. **Creates `~/bin/termux-url-opener`** — handles `cfcbridge://start` URLs to auto-start the bridge
53
+ 3. **Installs CRX extension** — serves the bundled CRX over HTTP and opens Edge for installation (requires ADB)
54
+
55
+ ## Important
56
+
57
+ The bridge **must be running before** starting a Claude Code session. MCP tools are registered at session startup — if the bridge is down, the tools won't appear.
58
+
59
+ ## Extension
35
60
 
36
61
  The bridge serves the CRX at `http://127.0.0.1:18963/ext/crx` — open this URL in Edge to install or update the extension.
37
62
 
63
+ ## Environment Variables
64
+
65
+ | Variable | Default | Description |
66
+ |----------|---------|-------------|
67
+ | `BRIDGE_PORT` | `18963` | WebSocket/HTTP server port |
68
+ | `BRIDGE_URL` | `http://127.0.0.1:18963` | Bridge URL for MCP relay |
69
+
38
70
  ## License
39
71
 
40
72
  MIT
Binary file