@vibebrowser/chrome-devtools-mcp 0.26.2 → 0.26.3
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 +63 -2
- package/build/src/bin/install-service.js +60 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
|
-
# Chrome DevTools
|
|
1
|
+
# Chrome DevTools MCP — Multi-Agent Fork
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/@vibebrowser/chrome-devtools-mcp)
|
|
4
|
+
|
|
5
|
+
> **Fork of [ChromeDevTools/chrome-devtools-mcp](https://github.com/ChromeDevTools/chrome-devtools-mcp)** with HTTP transport for multi-agent sharing.
|
|
6
|
+
>
|
|
7
|
+
> The upstream only supports stdio — one agent per process, one CDP connection per browser. This fork adds a persistent HTTP service that multiple agents can connect to simultaneously without resetting each other's sessions.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
Install as a background service (macOS/Linux):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @vibebrowser/chrome-devtools-mcp install --port 9333
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That's it. The service auto-connects to your running Chrome and starts accepting MCP requests at `http://localhost:9333/mcp`.
|
|
20
|
+
|
|
21
|
+
### Add to your agent config
|
|
22
|
+
|
|
23
|
+
Works with OpenCode, Copilot, Claude, Cursor, or any MCP client:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"chrome-devtools": {
|
|
29
|
+
"url": "http://localhost:9333/mcp"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Expose to cloud agents via Tailscale
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx @vibebrowser/chrome-devtools-mcp install --port 9333 --tailscale
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Your browser becomes accessible at `https://your-mac.tailnet.ts.net/mcp` — private, encrypted, no public exposure.
|
|
42
|
+
|
|
43
|
+
### Manage the service
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx @vibebrowser/chrome-devtools-mcp status
|
|
47
|
+
npx @vibebrowser/chrome-devtools-mcp uninstall
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## What's Different From Upstream
|
|
53
|
+
|
|
54
|
+
| | Upstream (`chrome-devtools-mcp`) | This fork (`@vibebrowser/chrome-devtools-mcp`) |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| Transport | stdio only | stdio + HTTP (StreamableHTTP) |
|
|
57
|
+
| Multi-agent | ❌ One agent per process | ✅ Multiple agents, independent sessions |
|
|
58
|
+
| Deployment | Per-invocation via `npx` | Background service (launchd/systemd) |
|
|
59
|
+
| Remote access | None | Tailscale serve integration |
|
|
60
|
+
| Package | `chrome-devtools-mcp` | `@vibebrowser/chrome-devtools-mcp` |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Original README
|
|
4
65
|
|
|
5
66
|
Chrome DevTools for Agents (`chrome-devtools-mcp`) lets your coding agent (such as Gemini, Claude, Cursor or Copilot)
|
|
6
67
|
control and inspect a live Chrome browser. It acts as a Model-Context-Protocol
|
|
@@ -209,6 +209,46 @@ function uninstallTailscale(port) {
|
|
|
209
209
|
// ignore — might not have been configured
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
+
async function healthCheck(port, retries = 10, delayMs = 1000) {
|
|
213
|
+
const url = `http://localhost:${port}/mcp`;
|
|
214
|
+
const body = JSON.stringify({
|
|
215
|
+
jsonrpc: '2.0',
|
|
216
|
+
id: 1,
|
|
217
|
+
method: 'initialize',
|
|
218
|
+
params: {
|
|
219
|
+
protocolVersion: '2024-11-05',
|
|
220
|
+
capabilities: {},
|
|
221
|
+
clientInfo: { name: 'health-check', version: '1.0' },
|
|
222
|
+
},
|
|
223
|
+
});
|
|
224
|
+
process.stdout.write('⏳ Checking service health');
|
|
225
|
+
for (let i = 0; i < retries; i++) {
|
|
226
|
+
await new Promise(r => setTimeout(r, delayMs));
|
|
227
|
+
process.stdout.write('.');
|
|
228
|
+
try {
|
|
229
|
+
const res = await fetch(url, {
|
|
230
|
+
method: 'POST',
|
|
231
|
+
headers: {
|
|
232
|
+
'Content-Type': 'application/json',
|
|
233
|
+
Accept: 'application/json, text/event-stream',
|
|
234
|
+
},
|
|
235
|
+
body,
|
|
236
|
+
});
|
|
237
|
+
if (res.ok) {
|
|
238
|
+
const text = await res.text();
|
|
239
|
+
if (text.includes('"protocolVersion"')) {
|
|
240
|
+
console.log(' ✅ healthy');
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
catch {
|
|
246
|
+
// Service not ready yet
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
console.log(' ❌ failed');
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
212
252
|
// Main
|
|
213
253
|
const { port, action, tailscale } = parseArgs();
|
|
214
254
|
const platform = process.platform;
|
|
@@ -237,10 +277,25 @@ else {
|
|
|
237
277
|
console.error(' Supported: macOS (launchd), Linux (systemd)');
|
|
238
278
|
process.exit(1);
|
|
239
279
|
}
|
|
240
|
-
if (action === 'install'
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
280
|
+
if (action === 'install') {
|
|
281
|
+
const healthy = await healthCheck(port);
|
|
282
|
+
if (!healthy) {
|
|
283
|
+
console.error(`\n⚠️ Service installed but health check failed.`);
|
|
284
|
+
console.error(` Check logs for errors.`);
|
|
285
|
+
if (platform === 'darwin') {
|
|
286
|
+
const logDir = path.join(process.env['HOME'] || '/tmp', 'Library', 'Logs', 'chrome-devtools-mcp');
|
|
287
|
+
console.error(` Logs: cat ${logDir}/chrome-devtools-mcp.stderr.log`);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
console.error(` Logs: journalctl --user -u chrome-devtools-mcp`);
|
|
291
|
+
}
|
|
292
|
+
process.exit(1);
|
|
293
|
+
}
|
|
294
|
+
if (tailscale) {
|
|
295
|
+
installTailscale(port);
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
printMcpConfig(`http://localhost:${port}/mcp`);
|
|
299
|
+
}
|
|
245
300
|
}
|
|
246
301
|
//# sourceMappingURL=install-service.js.map
|