豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 7e279f1

Browse files
authored
feat: enable usage statistics by default with opt-out (#855)
## **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. The code determining statistics that are collected is in here https://github.com/ChromeDevTools/chrome-devtools-mcp/tree/main/src/telemetry.
1 parent 65e186e commit 7e279f1

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ allowing them to inspect, debug, and modify any data in the browser or DevTools.
2727
Avoid sharing sensitive or personal information that you don't want to share with
2828
MCP clients.
2929

30+
## **Usage statistics**
31+
32+
Google collects usage statistics (such as tool invocation success rates, latency, and environment information) to improve the reliability and performance of Chrome DevTools MCP.
33+
34+
Data collection is **enabled by default**. You can opt-out by passing the `--no-usage-statistics` flag when starting the server:
35+
36+
```json
37+
"args": ["-y", "chrome-devtools-mcp@latest", "--no-usage-statistics"]
38+
```
39+
40+
Google handles this data in accordance with the [Google Privacy Policy](https://policies.google.com/privacy).
41+
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+
3044
## Requirements
3145

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

467+
- **`--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.
469+
- **Type:** boolean
470+
- **Default:** `true`
471+
453472
<!-- END AUTO GENERATED OPTIONS -->
454473

455474
Pass them via the `args` property in the JSON configuration. For example:

src/cli.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ export const cliOptions = {
206206
},
207207
usageStatistics: {
208208
type: 'boolean',
209-
// Marked as `false` until the feature is ready to be enabled by default.
210-
default: false,
211-
hidden: true,
209+
default: true,
212210
describe:
213211
'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.',
214212
},
@@ -295,6 +293,10 @@ export function parseArguments(version: string, argv = process.argv) {
295293
'$0 --auto-connect --channel=canary',
296294
'Connect to a canary Chrome instance (Chrome 144+) running instead of launching a new instance',
297295
],
296+
[
297+
'$0 --no-usage-statistics',
298+
'Do not send usage statistics https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics.',
299+
],
298300
]);
299301

300302
return yargsInstance

tests/cli.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ describe('cli args parsing', () => {
2121
categoryNetwork: true,
2222
'auto-connect': undefined,
2323
autoConnect: undefined,
24-
'usage-statistics': false,
25-
usageStatistics: false,
24+
'usage-statistics': true,
25+
usageStatistics: true,
2626
};
2727

2828
it('parses with default args', async () => {
@@ -252,9 +252,9 @@ describe('cli args parsing', () => {
252252
});
253253

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

259259
// Test enabling it
260260
const enabledArgs = parseArguments('1.0.0', [

0 commit comments

Comments
 (0)