Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ allowing them to inspect, debug, and modify any data in the browser or DevTools.
Avoid sharing sensitive or personal information that you don't want to share with
MCP clients.

## **Usage statistics**

Google collects usage statistics (such as tool invocation success rates, latency, and environment information) to improve the reliability and performance of Chrome DevTools MCP.

Data collection is **enabled by default**. You can opt-out by passing the `--no-usage-statistics` flag when starting the server:

```json
"args": ["-y", "chrome-devtools-mcp@latest", "--no-usage-statistics"]
```

Google handles this data in accordance with the [Google Privacy Policy](https://policies.google.com/privacy).

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.

## Requirements

- [Node.js](https://nodejs.org/) v20.19 or a newer [latest maintenance LTS](https://github.com/nodejs/Release#release-schedule) version.
Expand Down Expand Up @@ -450,6 +464,11 @@ The Chrome DevTools MCP server supports the following configuration option:
- **Type:** boolean
- **Default:** `true`

- **`--usageStatistics`/ `--usage-statistics`**
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.
- **Type:** boolean
- **Default:** `true`

<!-- END AUTO GENERATED OPTIONS -->

Pass them via the `args` property in the JSON configuration. For example:
Expand Down
8 changes: 5 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ export const cliOptions = {
},
usageStatistics: {
type: 'boolean',
// Marked as `false` until the feature is ready to be enabled by default.
default: false,
hidden: true,
default: true,
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.',
},
Expand Down Expand Up @@ -295,6 +293,10 @@ export function parseArguments(version: string, argv = process.argv) {
'$0 --auto-connect --channel=canary',
'Connect to a canary Chrome instance (Chrome 144+) running instead of launching a new instance',
],
[
'$0 --no-usage-statistics',
'Do not send usage statistics https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics.',
],
]);

return yargsInstance
Expand Down
8 changes: 4 additions & 4 deletions tests/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ describe('cli args parsing', () => {
categoryNetwork: true,
'auto-connect': undefined,
autoConnect: undefined,
'usage-statistics': false,
usageStatistics: false,
'usage-statistics': true,
usageStatistics: true,
};

it('parses with default args', async () => {
Expand Down Expand Up @@ -252,9 +252,9 @@ describe('cli args parsing', () => {
});

it('parses usage statistics flag', async () => {
// Test default (should be false)
// Test default (should be true).
const defaultArgs = parseArguments('1.0.0', ['node', 'main.js']);
assert.strictEqual(defaultArgs.usageStatistics, false);
assert.strictEqual(defaultArgs.usageStatistics, true);

// Test enabling it
const enabledArgs = parseArguments('1.0.0', [
Expand Down