@vibebrowser/chrome-devtools-mcp 0.26.1 → 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 CHANGED
@@ -1,6 +1,67 @@
1
- # Chrome DevTools for Agents
1
+ # Chrome DevTools MCP — Multi-Agent Fork
2
2
 
3
- [![npm chrome-devtools-mcp package](https://img.shields.io/npm/v/chrome-devtools-mcp.svg)](https://npmjs.org/package/chrome-devtools-mcp)
3
+ [![npm @vibebrowser/chrome-devtools-mcp](https://img.shields.io/npm/v/@vibebrowser/chrome-devtools-mcp.svg)](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
@@ -11,8 +11,7 @@ import { createMcpServer, logDisclaimers } from '../index.js';
11
11
  import { logger, saveLogsToFile } from '../logger.js';
12
12
  import { ClearcutLogger } from '../telemetry/ClearcutLogger.js';
13
13
  import { computeFlagUsage } from '../telemetry/flagUtils.js';
14
- import { StdioServerTransport, StreamableHTTPServerTransport, } from '../third_party/index.js';
15
- import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';
14
+ import { StdioServerTransport, StreamableHTTPServerTransport, isInitializeRequest, } from '../third_party/index.js';
16
15
  import { checkForUpdates } from '../utils/check-for-updates.js';
17
16
  import { VERSION } from '../version.js';
18
17
  import { cliOptions, parseArguments } from './chrome-devtools-mcp-cli-options.js';
@@ -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' && tailscale) {
241
- installTailscale(port);
242
- }
243
- else if (action === 'install') {
244
- printMcpConfig(`http://localhost:${port}/mcp`);
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
@@ -186288,5 +186288,5 @@ const snapshot = snapshot$1;
186288
186288
  const navigation = navigation$1;
186289
186289
  const generateReport = generateReport$1;
186290
186290
 
186291
- export { Browser as BrowserEnum, CDPSessionEvent, Client$1 as Client, mcp as DevTools, KnownDevices, ListRootsRequestSchema, ListRootsResultSchema, Locator, McpServer, PipeTransport, PredefinedNetworkConditions, RootsListChangedNotificationSchema, SetLevelRequestSchema, StdioClientTransport, StdioServerTransport, StreamableHTTPServerTransport, ajv, debug$2 as debug, detectBrowserPlatform, generateReport, hideBin, navigation, puppeteer, resolveDefaultUserDataDir, semver, snapshot, Yargs as yargs, z$1 as zod };
186291
+ export { Browser as BrowserEnum, CDPSessionEvent, Client$1 as Client, mcp as DevTools, KnownDevices, ListRootsRequestSchema, ListRootsResultSchema, Locator, McpServer, PipeTransport, PredefinedNetworkConditions, RootsListChangedNotificationSchema, SetLevelRequestSchema, StdioClientTransport, StdioServerTransport, StreamableHTTPServerTransport, ajv, debug$2 as debug, detectBrowserPlatform, generateReport, hideBin, isInitializeRequest, navigation, puppeteer, resolveDefaultUserDataDir, semver, snapshot, Yargs as yargs, z$1 as zod };
186292
186292
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibebrowser/chrome-devtools-mcp",
3
- "version": "0.26.1",
3
+ "version": "0.26.3",
4
4
  "description": "Chrome DevTools MCP server with Streamable HTTP transport for multi-agent sharing",
5
5
  "type": "module",
6
6
  "bin": {