chrome-bridge-mcp 1.15.0 → 1.16.0
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 +33 -13
- package/extension/lib/download-state.js +43 -0
- package/extension/manifest.json +2 -2
- package/extension/service-worker.js +627 -55
- package/install.sh +12 -1
- package/package.json +5 -2
- package/server/audit.js +155 -0
- package/server/cache-check.js +41 -0
- package/server/cli.js +118 -5
- package/server/consent.js +96 -0
- package/server/csv-fill.js +75 -0
- package/server/evidence.js +88 -0
- package/server/index.js +5 -2
- package/server/playwright-export.js +75 -0
- package/server/protocol.js +9 -1
- package/server/redirects.js +62 -0
- package/server/resources.js +54 -0
- package/server/sourcemaps.js +56 -0
- package/server/stub-server.js +7 -4
- package/server/tools.js +488 -298
- package/server/trackers.js +85 -0
- package/skills/chrome-bridge/SKILL.md +350 -0
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# Chrome Bridge
|
|
2
2
|
|
|
3
|
-
       [](https://chromewebstore.google.com/detail/chrome-bridge-for-claude/bioknpaeahidbelaljjohjofiloeodmb)
|
|
4
4
|
|
|
5
5
|
**An MCP server that gives Claude Code your real, logged-in Chrome — measured
|
|
6
6
|
2.75× fewer turns and 2.28× lower cost than the official "Claude in Chrome"
|
|
7
7
|
extension on a form-filling task, with ~3× the toolset and no paid plan.**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
59 web-development tools (navigation, DOM inspection, visual regression, audits,
|
|
10
10
|
network mocking) over a local WebSocket bridge, plus a headless instance for CI.
|
|
11
11
|
Self-hosted, local-only.
|
|
12
12
|
|
|
13
|
+

|
|
14
|
+
|
|
13
15
|
## Quickstart
|
|
14
16
|
|
|
15
17
|
**Requires** Node.js 18+ and Chrome 135+.
|
|
@@ -25,7 +27,7 @@ cd chrome-bridge && ./install.sh
|
|
|
25
27
|
|
|
26
28
|
Then ask for something like *"open localhost:3000, run an accessibility audit
|
|
27
29
|
and find the Sign Up button"*: Claude Code calls `navigate`,
|
|
28
|
-
`
|
|
30
|
+
`audit` and `find_text`. Because `navigate` already returns
|
|
29
31
|
element refs, `click(ref="n1")` follows with no discovery turn in between.
|
|
30
32
|
|
|
31
33
|
> **On ChromeOS/Crostini** install from the [Chrome Web
|
|
@@ -43,11 +45,11 @@ Chrome Bridge → Details (on Chrome 135-137, enable Developer Mode instead).
|
|
|
43
45
|
| | Chrome Bridge | Claude in Chrome | Chrome DevTools MCP | Playwright MCP |
|
|
44
46
|
|---|---|---|---|---|
|
|
45
47
|
| **ChromeOS / Crostini** | **Yes** (real host) | No | Container only | Container only |
|
|
46
|
-
| **Tools** | **
|
|
48
|
+
| **Tools** | **59** (38 core) | ~20 | ~50 | 23 core (71 total) |
|
|
47
49
|
| **Requires paid plan** | **No** | Yes (Pro+) | No | No |
|
|
48
50
|
| **Network mocking** | **Yes** (stub/headers) | No | No | Yes |
|
|
49
51
|
| **Visual regression** | **Yes** (`screenshot_diff`) | No | No | No |
|
|
50
|
-
| **Audits (a11y/SEO/sec)** | **Yes** (
|
|
52
|
+
| **Audits (a11y/SEO/sec)** | **Yes** (one call, report on disk) | No | Partial | No |
|
|
51
53
|
| **Headless / CI** | **Yes** | No | Yes | Yes |
|
|
52
54
|
| **GIF / video** | No | **Yes** | Partial | No |
|
|
53
55
|
| **Breakpoints / heap** | No | No | **Yes** | No |
|
|
@@ -60,10 +62,22 @@ The full benchmark — method, every raw run including the unfavourable ones, an
|
|
|
60
62
|
what the harness can't measure — is in
|
|
61
63
|
[docs/EFFICIENCY.md](docs/EFFICIENCY.md).
|
|
62
64
|
|
|
65
|
+

|
|
66
|
+
|
|
63
67
|
## Using it
|
|
64
68
|
|
|
69
|
+
The **skill** in [`skills/chrome-bridge/SKILL.md`](skills/chrome-bridge/SKILL.md)
|
|
70
|
+
is what makes the tools discoverable: recipes with the phrase that triggers
|
|
71
|
+
each one ("verify the email arrives", "test the checkout with a test card",
|
|
72
|
+
"which plugin slows the page", "what fires before consent"), the tool sequence,
|
|
73
|
+
and the zero-token CLI commands the model would otherwise never see.
|
|
74
|
+
`install.sh` copies it to `~/.claude/skills/chrome-bridge`; do the same by
|
|
75
|
+
hand for other clients.
|
|
76
|
+
|
|
65
77
|
Beyond the MCP tools, two lanes keep work away from the model entirely.
|
|
66
78
|
|
|
79
|
+

|
|
80
|
+
|
|
67
81
|
**CLI** — batch operations, piped through `grep` or `jq` before anything reaches
|
|
68
82
|
the context:
|
|
69
83
|
|
|
@@ -87,23 +101,27 @@ user-script toggle isn't available.
|
|
|
87
101
|
|
|
88
102
|
## Tools
|
|
89
103
|
|
|
90
|
-
|
|
104
|
+
59 in total, in seven groups. Only `core` (38 tools) loads by default; the rest
|
|
91
105
|
are opt-in via `--caps`.
|
|
92
106
|
|
|
107
|
+

|
|
108
|
+
|
|
93
109
|
| Group | N | What's in it |
|
|
94
110
|
|---|---|---|
|
|
95
|
-
| Core & Navigation |
|
|
111
|
+
| Core & Navigation | 13 | tabs, windows, `navigate`, `screenshot`, `tile_windows` |
|
|
96
112
|
| Interaction | 11 | `click`, `fill_form`, `upload_file`, dialogs, clipboard |
|
|
97
|
-
| DOM & Inspection |
|
|
98
|
-
| Debugging & Network |
|
|
99
|
-
| Visual & Responsive |
|
|
100
|
-
| Audits |
|
|
113
|
+
| DOM & Inspection | 10 | `read_page`, `extract`, `query_dom`, `watch_dom` |
|
|
114
|
+
| Debugging & Network | 8 | `execute_js`, console, network log, mocking, `track_events` |
|
|
115
|
+
| Visual & Responsive | 5 | `screenshot_diff`, viewport and zoom, media emulation |
|
|
116
|
+
| Audits | 2 | `audit` (a11y, keyboard, SEO, security, links, vitals, css, resources, cache in one call), `cookie_audit` |
|
|
101
117
|
| State, Storage & Files | 9 | storage, fixtures, MHTML, recording, `assert` |
|
|
102
118
|
|
|
103
119
|
Every tool, with the notes that matter: [docs/TOOLS.md](docs/TOOLS.md).
|
|
104
120
|
|
|
105
121
|
## How it works
|
|
106
122
|
|
|
123
|
+

|
|
124
|
+
|
|
107
125
|
```
|
|
108
126
|
Claude Code <--stdio--> MCP Server <--WebSocket :8765--> Chrome Extension
|
|
109
127
|
(server/) (extension/, MV3)
|
|
@@ -153,7 +171,7 @@ paste into a chat.
|
|
|
153
171
|
|
|
154
172
|
## Documentation
|
|
155
173
|
|
|
156
|
-
- [docs/TOOLS.md](docs/TOOLS.md) — all
|
|
174
|
+
- [docs/TOOLS.md](docs/TOOLS.md) — all 59 tools, by group
|
|
157
175
|
- [docs/EFFICIENCY.md](docs/EFFICIENCY.md) — the benchmark and the design behind it
|
|
158
176
|
- [bench/RESULTS.md](bench/RESULTS.md) — raw runs and inclusion rule
|
|
159
177
|
- [CHANGELOG.md](CHANGELOG.md)
|
|
@@ -161,7 +179,9 @@ paste into a chat.
|
|
|
161
179
|
## Tests
|
|
162
180
|
|
|
163
181
|
`npm test` (Chrome-free, ~22s) · `npm run test:e2e` (needs Chrome and a
|
|
164
|
-
connected extension
|
|
182
|
+
connected extension; with a bridge already on 8765:
|
|
183
|
+
`CHROME_BRIDGE_PORT=8799 node test/test-devtools.js --launch`, which opens
|
|
184
|
+
its own Chromium with `extension/`) · `npm run measure` (schema cost).
|
|
165
185
|
|
|
166
186
|
## License
|
|
167
187
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legge lo stato reale di un download.
|
|
3
|
+
*
|
|
4
|
+
* `chrome.downloads.download()` restituisce un id e basta: dire "started: true"
|
|
5
|
+
* e fermarsi lì è come fidarsi di un HTTP 200 senza guardare il corpo. Su
|
|
6
|
+
* ChromeOS, con l'impostazione «Chiedi dove salvare ogni file» attiva, Chrome
|
|
7
|
+
* ignora `saveAs: false` e apre il selettore: il file viene scaricato per intero
|
|
8
|
+
* ma non viene scritto da nessuna parte finché un umano non sceglie.
|
|
9
|
+
*
|
|
10
|
+
* La firma di quella condizione è precisa e verificata dal vivo:
|
|
11
|
+
* `state: 'in_progress'`, `filename: ''`, `bytesReceived === totalBytes`.
|
|
12
|
+
* Senza distinguerla, un agente aspetta un file che non arriverà mai da solo.
|
|
13
|
+
*/
|
|
14
|
+
export function classifyDownload(item) {
|
|
15
|
+
if (!item) return { state: 'unknown', done: false, reason: 'download not found' };
|
|
16
|
+
|
|
17
|
+
const { state, filename, bytesReceived = 0, totalBytes = 0, error } = item;
|
|
18
|
+
|
|
19
|
+
if (state === 'complete') return { state: 'complete', done: true, filename };
|
|
20
|
+
if (state === 'interrupted') {
|
|
21
|
+
return { state: 'interrupted', done: true, error: error || 'interrupted', filename };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Nessuna destinazione decisa: il selettore è aperto e aspetta una persona.
|
|
25
|
+
if (!filename) {
|
|
26
|
+
const fetched = totalBytes > 0 && bytesReceived >= totalBytes;
|
|
27
|
+
return {
|
|
28
|
+
state: 'waiting_for_user',
|
|
29
|
+
done: false,
|
|
30
|
+
bytes: { received: bytesReceived, total: totalBytes },
|
|
31
|
+
reason: fetched
|
|
32
|
+
? 'bytes fetched, but Chrome is asking where to save — the "Ask where to save each file" setting overrides saveAs:false'
|
|
33
|
+
: 'no destination chosen yet — Chrome is showing the save dialog',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
state: 'in_progress',
|
|
39
|
+
done: false,
|
|
40
|
+
filename,
|
|
41
|
+
bytes: { received: bytesReceived, total: totalBytes },
|
|
42
|
+
};
|
|
43
|
+
}
|
package/extension/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "Chrome Bridge for Claude Code",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"description": "Bridge your browser to Claude Code:
|
|
4
|
+
"version": "1.16.0",
|
|
5
|
+
"description": "Bridge your browser to Claude Code: 59 token-efficient web-dev automation tools over a local WebSocket. ChromeOS included.",
|
|
6
6
|
"homepage_url": "https://github.com/frsorrentino/chrome-bridge",
|
|
7
7
|
"minimum_chrome_version": "135",
|
|
8
8
|
"permissions": [
|