chrome-devtools-mcp 1.3.0 → 1.4.0
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 +37 -2
- package/build/src/bin/check-latest-version.js +1 -0
- package/build/src/bin/chrome-devtools-mcp-cli-options.js +2 -2
- package/build/src/formatters/NetworkFormatter.js +3 -1
- package/build/src/third_party/THIRD_PARTY_NOTICES +3 -3
- package/build/src/third_party/bundled-packages.json +3 -3
- package/build/src/third_party/devtools-heap-snapshot-worker.js +13 -0
- package/build/src/third_party/index.js +1522 -230
- package/build/src/utils/check-for-updates.js +1 -0
- package/build/src/version.js +1 -1
- package/package.json +7 -6
- package/skills/a11y-debugging/SKILL.md +89 -0
- package/skills/a11y-debugging/references/a11y-snippets.md +92 -0
- package/skills/chrome-devtools/SKILL.md +72 -0
- package/skills/chrome-devtools-cli/SKILL.md +153 -0
- package/skills/chrome-devtools-cli/references/installation.md +14 -0
- package/skills/debug-optimize-lcp/SKILL.md +121 -0
- package/skills/debug-optimize-lcp/references/elements-and-size.md +27 -0
- package/skills/debug-optimize-lcp/references/lcp-breakdown.md +23 -0
- package/skills/debug-optimize-lcp/references/lcp-snippets.md +79 -0
- package/skills/debug-optimize-lcp/references/optimization-strategies.md +38 -0
- package/skills/memory-leak-debugging/SKILL.md +50 -0
- package/skills/memory-leak-debugging/references/common-leaks.md +33 -0
- package/skills/memory-leak-debugging/references/compare_snapshots.js +109 -0
- package/skills/memory-leak-debugging/references/memlab.md +29 -0
- package/skills/troubleshooting/SKILL.md +98 -0
package/README.md
CHANGED
|
@@ -553,14 +553,17 @@ The Chrome DevTools MCP server supports the following configuration option:
|
|
|
553
553
|
- **`--browserUrl`/ `--browser-url`, `-u`**
|
|
554
554
|
Connect to a running, debuggable Chrome instance (e.g. `http://127.0.0.1:9222`). For more details see: https://github.com/ChromeDevTools/chrome-devtools-mcp#connecting-to-a-running-chrome-instance.
|
|
555
555
|
- **Type:** string
|
|
556
|
+
- **Default:** `false`
|
|
556
557
|
|
|
557
558
|
- **`--wsEndpoint`/ `--ws-endpoint`, `-w`**
|
|
558
559
|
WebSocket endpoint to connect to a running Chrome instance (e.g., ws://127.0.0.1:9222/devtools/browser/<id>). Alternative to --browserUrl.
|
|
559
560
|
- **Type:** string
|
|
561
|
+
- **Default:** `false`
|
|
560
562
|
|
|
561
563
|
- **`--wsHeaders`/ `--ws-headers`**
|
|
562
564
|
Custom headers for WebSocket connection in JSON format (e.g., '{"Authorization":"Bearer token"}'). Only works with --wsEndpoint.
|
|
563
565
|
- **Type:** string
|
|
566
|
+
- **Default:** `false`
|
|
564
567
|
|
|
565
568
|
- **`--headless`**
|
|
566
569
|
Whether to run in headless (no UI) mode.
|
|
@@ -570,87 +573,108 @@ The Chrome DevTools MCP server supports the following configuration option:
|
|
|
570
573
|
- **`--executablePath`/ `--executable-path`, `-e`**
|
|
571
574
|
Path to custom Chrome executable.
|
|
572
575
|
- **Type:** string
|
|
576
|
+
- **Default:** `false`
|
|
573
577
|
|
|
574
578
|
- **`--isolated`**
|
|
575
579
|
If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to false.
|
|
576
580
|
- **Type:** boolean
|
|
581
|
+
- **Default:** `false`
|
|
577
582
|
|
|
578
583
|
- **`--userDataDir`/ `--user-data-dir`**
|
|
579
584
|
Path to the user data directory for Chrome. Default is $HOME/.cache/chrome-devtools-mcp/chrome-profile$CHANNEL_SUFFIX_IF_NON_STABLE
|
|
580
585
|
- **Type:** string
|
|
586
|
+
- **Default:** `false`
|
|
581
587
|
|
|
582
588
|
- **`--channel`**
|
|
583
589
|
Specify a different Chrome channel that should be used. The default is the stable channel version.
|
|
584
590
|
- **Type:** string
|
|
585
591
|
- **Choices:** `canary`, `dev`, `beta`, `stable`
|
|
592
|
+
- **Default:** `false`
|
|
586
593
|
|
|
587
594
|
- **`--logFile`/ `--log-file`**
|
|
588
595
|
Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.
|
|
589
596
|
- **Type:** string
|
|
597
|
+
- **Default:** `false`
|
|
590
598
|
|
|
591
599
|
- **`--viewport`**
|
|
592
600
|
Initial viewport size for the Chrome instances started by the server. For example, `1280x720`. In headless mode, max size is 3840x2160px.
|
|
593
601
|
- **Type:** string
|
|
602
|
+
- **Default:** `false`
|
|
594
603
|
|
|
595
604
|
- **`--proxyServer`/ `--proxy-server`**
|
|
596
605
|
Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.
|
|
597
606
|
- **Type:** string
|
|
607
|
+
- **Default:** `false`
|
|
598
608
|
|
|
599
609
|
- **`--acceptInsecureCerts`/ `--accept-insecure-certs`**
|
|
600
610
|
If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.
|
|
601
611
|
- **Type:** boolean
|
|
612
|
+
- **Default:** `false`
|
|
602
613
|
|
|
603
614
|
- **`--experimentalPageIdRouting`/ `--experimental-page-id-routing`**
|
|
604
615
|
Whether to expose pageId on page-scoped tools and route requests by page ID (useful for concurrent agent sessions).
|
|
605
616
|
- **Type:** boolean
|
|
617
|
+
- **Default:** `false`
|
|
606
618
|
|
|
607
619
|
- **`--experimentalDevtools`/ `--experimental-devtools`**
|
|
608
620
|
Whether to enable automation over DevTools targets
|
|
609
621
|
- **Type:** boolean
|
|
622
|
+
- **Default:** `false`
|
|
610
623
|
|
|
611
624
|
- **`--experimentalVision`/ `--experimental-vision`**
|
|
612
625
|
Whether to enable coordinate-based tools such as click_at(x,y). Usually requires a computer-use model able to produce accurate coordinates by looking at screenshots.
|
|
613
626
|
- **Type:** boolean
|
|
627
|
+
- **Default:** `false`
|
|
614
628
|
|
|
615
629
|
- **`--memoryDebugging`/ `--memory-debugging`, `-experimentalMemory`**
|
|
616
630
|
Whether to enable memory debugging tools.
|
|
617
631
|
- **Type:** boolean
|
|
632
|
+
- **Default:** `false`
|
|
618
633
|
|
|
619
634
|
- **`--experimentalStructuredContent`/ `--experimental-structured-content`**
|
|
620
635
|
Whether to output structured formatted content.
|
|
621
636
|
- **Type:** boolean
|
|
637
|
+
- **Default:** `false`
|
|
622
638
|
|
|
623
639
|
- **`--experimentalIncludeAllPages`/ `--experimental-include-all-pages`**
|
|
624
640
|
Whether to include all kinds of pages such as webviews or background pages as pages.
|
|
625
641
|
- **Type:** boolean
|
|
642
|
+
- **Default:** `false`
|
|
626
643
|
|
|
627
644
|
- **`--experimentalScreencast`/ `--experimental-screencast`**
|
|
628
645
|
Exposes experimental screencast tools (requires ffmpeg). Install ffmpeg https://www.ffmpeg.org/download.html and ensure it is available in the MCP server PATH.
|
|
629
646
|
- **Type:** boolean
|
|
647
|
+
- **Default:** `false`
|
|
630
648
|
|
|
631
649
|
- **`--experimentalFfmpegPath`/ `--experimental-ffmpeg-path`**
|
|
632
650
|
Path to ffmpeg executable for screencast recording.
|
|
633
651
|
- **Type:** string
|
|
652
|
+
- **Default:** `false`
|
|
634
653
|
|
|
635
654
|
- **`--categoryExperimentalWebmcp`/ `--category-experimental-webmcp`**
|
|
636
655
|
Set to true to enable debugging WebMCP tools. Requires Chrome 149+ with the following flags: `--enable-features=WebMCP,DevToolsWebMCPSupport`
|
|
637
656
|
- **Type:** boolean
|
|
657
|
+
- **Default:** `false`
|
|
638
658
|
|
|
639
659
|
- **`--chromeArg`/ `--chrome-arg`**
|
|
640
660
|
Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.
|
|
641
661
|
- **Type:** array
|
|
662
|
+
- **Default:** `false`
|
|
642
663
|
|
|
643
664
|
- **`--blockedUrlPattern`/ `--blocked-url-pattern`**
|
|
644
|
-
Restricts network access by blocking specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Silently detaches from targets with blocked URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.
|
|
665
|
+
Restricts browser's network access by blocking specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Silently detaches from targets with blocked URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.
|
|
645
666
|
- **Type:** array
|
|
667
|
+
- **Default:** `false`
|
|
646
668
|
|
|
647
669
|
- **`--allowedUrlPattern`/ `--allowed-url-pattern`**
|
|
648
|
-
Restricts network access by allowing only specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Requires Chrome 149+. Silently detaches from targets with unallowed URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.
|
|
670
|
+
Restricts browser's network access by allowing only specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Requires Chrome 149+. Silently detaches from targets with unallowed URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.
|
|
649
671
|
- **Type:** array
|
|
672
|
+
- **Default:** `false`
|
|
650
673
|
|
|
651
674
|
- **`--ignoreDefaultChromeArg`/ `--ignore-default-chrome-arg`**
|
|
652
675
|
Explicitly disable default arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.
|
|
653
676
|
- **Type:** array
|
|
677
|
+
- **Default:** `false`
|
|
654
678
|
|
|
655
679
|
- **`--categoryEmulation`/ `--category-emulation`**
|
|
656
680
|
Set to false to exclude tools related to emulation.
|
|
@@ -691,22 +715,27 @@ The Chrome DevTools MCP server supports the following configuration option:
|
|
|
691
715
|
Override the default output format used by take_screenshot when the caller does not specify one. JPEG and WebP are ~3-5x smaller than PNG, which helps reduce context size in AI conversations. Unset preserves the existing default ("png").
|
|
692
716
|
- **Type:** string
|
|
693
717
|
- **Choices:** `jpeg`, `png`, `webp`
|
|
718
|
+
- **Default:** `false`
|
|
694
719
|
|
|
695
720
|
- **`--screenshotQuality`/ `--screenshot-quality`**
|
|
696
721
|
Override the default compression quality (0-100) used by take_screenshot for JPEG and WebP when the caller does not specify one. Lower values mean smaller files. Ignored for PNG. Unset preserves the Puppeteer default.
|
|
697
722
|
- **Type:** number
|
|
723
|
+
- **Default:** `false`
|
|
698
724
|
|
|
699
725
|
- **`--screenshotMaxWidth`/ `--screenshot-max-width`**
|
|
700
726
|
Maximum width in pixels for screenshots. If the captured image is wider, it is downscaled (preserving aspect ratio) before being returned. Reduces context size in AI conversations. Unset means no resize.
|
|
701
727
|
- **Type:** number
|
|
728
|
+
- **Default:** `false`
|
|
702
729
|
|
|
703
730
|
- **`--screenshotMaxHeight`/ `--screenshot-max-height`**
|
|
704
731
|
Maximum height in pixels for screenshots. If the captured image is taller, it is downscaled (preserving aspect ratio) before being returned. Can be combined with --screenshot-max-width; the smaller scale factor wins. Unset means no resize.
|
|
705
732
|
- **Type:** number
|
|
733
|
+
- **Default:** `false`
|
|
706
734
|
|
|
707
735
|
- **`--slim`**
|
|
708
736
|
Exposes a "slim" set of 3 tools covering navigation, script execution and screenshots only. Useful for basic browser tasks.
|
|
709
737
|
- **Type:** boolean
|
|
738
|
+
- **Default:** `false`
|
|
710
739
|
|
|
711
740
|
- **`--redactNetworkHeaders`/ `--redact-network-headers`**
|
|
712
741
|
If true, redacts some of the network headers considered sensitive before returning to the client.
|
|
@@ -929,3 +958,9 @@ Please consult [these instructions](./docs/debugging-android.md).
|
|
|
929
958
|
## Known limitations
|
|
930
959
|
|
|
931
960
|
See [Troubleshooting](./docs/troubleshooting.md).
|
|
961
|
+
|
|
962
|
+
## Integrating as a browser subagent
|
|
963
|
+
|
|
964
|
+
If you are developing agentic tooling and want to provide an integrated browser subagent as part of your product, we recommend building on top of Chrome DevTools for agents.
|
|
965
|
+
|
|
966
|
+
For a reference implementation, see the [Gemini CLI browser agent documentation](https://geminicli.com/docs/core/subagents/#browser-agent).
|
|
@@ -193,12 +193,12 @@ export const cliOptions = {
|
|
|
193
193
|
},
|
|
194
194
|
blockedUrlPattern: {
|
|
195
195
|
type: 'array',
|
|
196
|
-
describe:
|
|
196
|
+
describe: "Restricts browser's network access by blocking specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Silently detaches from targets with blocked URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.",
|
|
197
197
|
conflicts: ['allowedUrlPattern'],
|
|
198
198
|
},
|
|
199
199
|
allowedUrlPattern: {
|
|
200
200
|
type: 'array',
|
|
201
|
-
describe:
|
|
201
|
+
describe: "Restricts browser's network access by allowing only specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Requires Chrome 149+. Silently detaches from targets with unallowed URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.",
|
|
202
202
|
conflicts: ['blockedUrlPattern'],
|
|
203
203
|
},
|
|
204
204
|
ignoreDefaultChromeArg: {
|
|
@@ -226,7 +226,9 @@ function converNetworkRequestDetailedToStringDetailed(data) {
|
|
|
226
226
|
if (redirectChain?.length) {
|
|
227
227
|
response.push(`### Redirect chain`);
|
|
228
228
|
let indent = 0;
|
|
229
|
-
|
|
229
|
+
// `redirectChain` is already ordered by toJSONDetailed(); don't reverse it
|
|
230
|
+
// again here or the text output contradicts structuredContent (the JSON).
|
|
231
|
+
for (const request of redirectChain) {
|
|
230
232
|
response.push(`${' '.repeat(indent)}${convertNetworkRequestConciseToString(request)}`);
|
|
231
233
|
indent++;
|
|
232
234
|
}
|
|
@@ -324,7 +324,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
|
|
|
324
324
|
|
|
325
325
|
Name: semver
|
|
326
326
|
URL: git+https://github.com/npm/node-semver.git
|
|
327
|
-
Version: 7.8.
|
|
327
|
+
Version: 7.8.5
|
|
328
328
|
License: ISC
|
|
329
329
|
|
|
330
330
|
The ISC License
|
|
@@ -867,14 +867,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
867
867
|
|
|
868
868
|
Name: puppeteer-core
|
|
869
869
|
URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
|
|
870
|
-
Version: 25.
|
|
870
|
+
Version: 25.2.0
|
|
871
871
|
License: Apache-2.0
|
|
872
872
|
|
|
873
873
|
-------------------- DEPENDENCY DIVIDER --------------------
|
|
874
874
|
|
|
875
875
|
Name: @puppeteer/browsers
|
|
876
876
|
URL: https://github.com/puppeteer/puppeteer/tree/main/packages/browsers
|
|
877
|
-
Version: 3.0.
|
|
877
|
+
Version: 3.0.5
|
|
878
878
|
License: Apache-2.0
|
|
879
879
|
|
|
880
880
|
-------------------- DEPENDENCY DIVIDER --------------------
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
3
3
|
"@toon-format/toon": "^2.2.0",
|
|
4
|
-
"chrome-devtools-frontend": "1.0.
|
|
4
|
+
"chrome-devtools-frontend": "1.0.1650035",
|
|
5
5
|
"core-js": "3.49.0",
|
|
6
6
|
"debug": "4.4.3",
|
|
7
|
-
"lighthouse": "13.
|
|
7
|
+
"lighthouse": "13.4.0",
|
|
8
8
|
"semver": "^7.7.4",
|
|
9
9
|
"urlpattern-polyfill": "^10.1.0",
|
|
10
10
|
"yargs": "18.0.0",
|
|
11
|
-
"puppeteer-core": "25.
|
|
11
|
+
"puppeteer-core": "25.2.0"
|
|
12
12
|
}
|
|
@@ -7334,6 +7334,12 @@ class HeapSnapshot {
|
|
|
7334
7334
|
}
|
|
7335
7335
|
};
|
|
7336
7336
|
switch (filterName) {
|
|
7337
|
+
case 'objectsRetainedByContexts':
|
|
7338
|
+
traverse((_node, edge) => {
|
|
7339
|
+
return !this.isContextObject(edge.node());
|
|
7340
|
+
});
|
|
7341
|
+
markUnreachableNodes();
|
|
7342
|
+
return (node) => !getBit(node);
|
|
7337
7343
|
case 'objectsRetainedByDetachedDomNodes':
|
|
7338
7344
|
traverse((_node, edge) => {
|
|
7339
7345
|
return edge.node().detachedness() !== 2 ;
|
|
@@ -7477,6 +7483,9 @@ class HeapSnapshot {
|
|
|
7477
7483
|
isUserRoot(_node) {
|
|
7478
7484
|
return true;
|
|
7479
7485
|
}
|
|
7486
|
+
isContextObject(_node) {
|
|
7487
|
+
return false;
|
|
7488
|
+
}
|
|
7480
7489
|
calculateShallowSizes() {
|
|
7481
7490
|
}
|
|
7482
7491
|
calculateDistances(isForRetainersView, filter) {
|
|
@@ -9011,6 +9020,10 @@ class JSHeapSnapshot extends HeapSnapshot {
|
|
|
9011
9020
|
isUserRoot(node) {
|
|
9012
9021
|
return node.isUserRoot() || node.isDocumentDOMTreesRoot();
|
|
9013
9022
|
}
|
|
9023
|
+
isContextObject(node) {
|
|
9024
|
+
const name = node.rawName();
|
|
9025
|
+
return name === 'system / Context' || name.startsWith('system / Context / ');
|
|
9026
|
+
}
|
|
9014
9027
|
userObjectsMapAndFlag() {
|
|
9015
9028
|
return { map: this.flags, flag: this.nodeFlags.pageObject };
|
|
9016
9029
|
}
|