chrome-devtools-mcp 0.15.0 → 0.15.1

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
@@ -41,6 +41,8 @@ Google handles this data in accordance with the [Google Privacy Policy](https://
41
41
 
42
42
  Google's collection of usage statistics for Chrome DevTools MCP is independent from the Chrome browser's usage statistics. Opting out of Chrome metrics does not automatically opt you out of this tool, and vice-versa.
43
43
 
44
+ Collection is disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set.
45
+
44
46
  ## Requirements
45
47
 
46
48
  - [Node.js](https://nodejs.org/) v20.19 or a newer [latest maintenance LTS](https://github.com/nodejs/Release#release-schedule) version.
@@ -465,7 +467,7 @@ The Chrome DevTools MCP server supports the following configuration option:
465
467
  - **Default:** `true`
466
468
 
467
469
  - **`--usageStatistics`/ `--usage-statistics`**
468
- Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics.
470
+ Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics. Disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set.
469
471
  - **Type:** boolean
470
472
  - **Default:** `true`
471
473
 
@@ -551,12 +551,12 @@ export class McpContext {
551
551
  getWaitForHelper(page, cpuMultiplier, networkMultiplier) {
552
552
  return new WaitForHelper(page, cpuMultiplier, networkMultiplier);
553
553
  }
554
- waitForEventsAfterAction(action) {
554
+ waitForEventsAfterAction(action, options) {
555
555
  const page = this.getSelectedPage();
556
556
  const cpuMultiplier = this.getCpuThrottlingRate();
557
557
  const networkMultiplier = getNetworkMultiplierFromString(this.getNetworkConditions());
558
558
  const waitForHelper = this.getWaitForHelper(page, cpuMultiplier, networkMultiplier);
559
- return waitForHelper.waitForEventsAfterAction(action);
559
+ return waitForHelper.waitForEventsAfterAction(action, options);
560
560
  }
561
561
  getNetworkRequestStableId(request) {
562
562
  return this.#networkCollector.getIdForResource(request);
@@ -103,12 +103,12 @@ export class WaitForHelper {
103
103
  });
104
104
  });
105
105
  }
106
- async waitForEventsAfterAction(action) {
106
+ async waitForEventsAfterAction(action, options) {
107
107
  const navigationFinished = this.waitForNavigationStarted()
108
108
  .then(navigationStated => {
109
109
  if (navigationStated) {
110
110
  return this.#page.waitForNavigation({
111
- timeout: this.#navigationTimeout,
111
+ timeout: options?.timeout ?? this.#navigationTimeout,
112
112
  signal: this.#abortController.signal,
113
113
  });
114
114
  }
package/build/src/cli.js CHANGED
@@ -191,7 +191,7 @@ export const cliOptions = {
191
191
  usageStatistics: {
192
192
  type: 'boolean',
193
193
  default: true,
194
- describe: 'Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics.',
194
+ describe: 'Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics. Disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set.',
195
195
  },
196
196
  clearcutEndpoint: {
197
197
  type: 'string',
package/build/src/main.js CHANGED
@@ -20,10 +20,15 @@ import { ToolCategory } from './tools/categories.js';
20
20
  import { tools } from './tools/tools.js';
21
21
  // If moved update release-please config
22
22
  // x-release-please-start-version
23
- const VERSION = '0.15.0';
23
+ const VERSION = '0.15.1';
24
24
  // x-release-please-end
25
25
  export const args = parseArguments(VERSION);
26
26
  const logFile = args.logFile ? saveLogsToFile(args.logFile) : undefined;
27
+ if (process.env['CI'] ||
28
+ process.env['CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS']) {
29
+ console.error("turning off usage statistics. process.env['CI'] || process.env['CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS'] is set.");
30
+ args.usageStatistics = false;
31
+ }
27
32
  let clearcutLogger;
28
33
  if (args.usageStatistics) {
29
34
  clearcutLogger = new ClearcutLogger({
@@ -0,0 +1,8 @@
1
+ {
2
+ "@modelcontextprotocol/sdk": "1.25.3",
3
+ "chrome-devtools-frontend": "1.0.1575174",
4
+ "core-js": "3.48.0",
5
+ "debug": "4.4.3",
6
+ "yargs": "18.0.0",
7
+ "puppeteer-core": "24.36.1"
8
+ }
@@ -92,7 +92,7 @@ export const newPage = defineTool({
92
92
  await page.goto(request.params.url, {
93
93
  timeout: request.params.timeout,
94
94
  });
95
- });
95
+ }, { timeout: request.params.timeout });
96
96
  response.setIncludePages(true);
97
97
  },
98
98
  });
@@ -201,7 +201,7 @@ export const navigatePage = defineTool({
201
201
  }
202
202
  break;
203
203
  }
204
- });
204
+ }, { timeout: request.params.timeout });
205
205
  }
206
206
  finally {
207
207
  page.off('dialog', dialogHandler);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-devtools-mcp",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "MCP server for Chrome DevTools",
5
5
  "type": "module",
6
6
  "bin": "./build/src/index.js",
@@ -22,7 +22,7 @@
22
22
  "test:update-snapshots": "npm run build && node scripts/test.mjs --test-update-snapshots",
23
23
  "prepare": "node --experimental-strip-types scripts/prepare.ts",
24
24
  "verify-server-json-version": "node --experimental-strip-types scripts/verify-server-json-version.ts",
25
- "eval": "npm run build && node --experimental-strip-types scripts/eval_gemini.ts",
25
+ "eval": "npm run build && CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=true node --experimental-strip-types scripts/eval_gemini.ts",
26
26
  "count-tokens": "node --experimental-strip-types scripts/count_tokens.ts"
27
27
  },
28
28
  "files": [