Commit Graph
13 Commits
Author SHA1 Message Date
Alex Rudenko 8953ea5159 feat: implement ffmpeg-free screencast tools enabled by default (#3123)
Make screencast_start/screencast_stop available by default using
Puppeteer's ffmpeg-free page.record() API, which always writes mp4. The
legacy ffmpeg-based implementation remains available behind
--experimental-screencast.

Rename --experimental-screencast-fps to --screencast-fps and keep the
old name as an alias. The fps flag no longer requires
--experimental-screencast.
2026-10-14 14:38:28 +00:00
Nikolay Vitkov d5d2f08a31 docs: fix some reported issues (#3099)
Fixes #3032, 
Fixes #3012
Fixes #3007
Fixes #2992
Fixes #2965
Fixes #2911

Issue | Summary | Evaluation | Fix Applied
-- | -- | -- | --
#3032 | evaluate_script args description does not say that strings are
snapshot element UIDs | Valid & Confirmed. The
outer zod.array(...).describe(...) on args in evaluateScript only
said "An optional list of arguments to pass to the function.", omitting
that each string is an element uid from the page content snapshot (which
caused both docs/tool-reference.md and src/config/cli-options.ts to omit
this). | Updated the args schema description in src/tools/script.ts and
regenerated docs/tool-reference.md and src/config/cli-options.ts.
#3012 | debug-optimize-lcp skill's resourceTypes: ["Image",
"Font"] filter is rejected by list_network_requests | Valid &
Confirmed. list_network_requests validates resourceTypes against
lowercase values ("image", "font", etc.), so capitalized values fail
input validation. | Updated Step 4
in skills/debug-optimize-lcp/SKILL.md to use resourceTypes: ["image",
"font"].
#3007 | Four chrome-devtools-cli skill examples fail as written | Valid
& Confirmed. In skills/chrome-devtools-cli/SKILL.md: (1) navigate_page 1
--handleBeforeUnload "accept" lacked --type or --url;
(2) performance_analyze_insight 1 "1" "LCPBreakdown" used "1" instead of
a valid insightSetId like "NAVIGATION_0"; (3) get_network_request 1
--responseFilePath "res.md" lacked --reqid; (4) list_network_requests 1
--resourceTypes Fetch used capitalized Fetch instead of fetch. | Updated
all four examples in skills/chrome-devtools-cli/SKILL.md.
#2992 | --allowUnrestrictedPaths help says only file-writing tools are
restricted, but file-reading upload_file is restricted too | Valid &
Confirmed. validateToolFiles in ToolHandler restricts local file-reading
parameters (such
as upload_file's filePaths and evaluate_script's sourcePath) as well as
file-writing tools when no MCP roots are configured. | Updated the
option description in src/config/mcp-options.ts, the startup warning
in src/index.ts, the comment in McpContextOptions, and
regenerated docs/configuration.md.
#2965 | A later emulate call silently clears the
earlier viewport, userAgent and colorScheme, which the tool description
does not say | Valid & Confirmed. McpPage.emulate() resets all omitted
emulation settings on every call (except extraHttpHeaders),
but emulate did not mention this in the tool description or
on userAgent, colorScheme, media features, or viewport, and the CLI
skill listed separate emulate calls without noting that each replaces
previous settings. | Updated the tool and parameter descriptions
in src/tools/emulation.ts, added a note and updated comments
in skills/chrome-devtools-cli/SKILL.md, and
regenerated docs/tool-reference.md and src/config/cli-options.ts.
#2911 | troubleshooting skill searches files that do not hold MCP server
configuration | Valid & Confirmed. Step 1
of skills/troubleshooting/SKILL.md searched .claude/settings.json and .vscode/launch.json instead
of .vscode/mcp.json (VS Code workspace MCP config)
and ~/.claude.json (Claude Code user/local MCP config). | Updated Step 1
in skills/troubleshooting/SKILL.md to
search .mcp.json, .vscode/mcp.json, gemini-extension.json, .gemini/settings.json,
and ~/.claude.json.
2026-10-13 13:17:48 +00:00
yulunz ec372b0552 docs: fix inaccurate examples in skills and CLI docs (#2922)
Fixes several skill and CLI doc examples that don't match the current
tool schemas or CLI arguments. Each corrected example was checked
against a local build of main (MCP `tools/list` / `tools/call` and the
built `chrome-devtools` CLI).

- **cookie-debugging**: `navigate_page` reloads with `type: "reload"`,
not `reload: true` (#2906). Documents that page-scoped tools require
`pageId` (on by default via `--pageIdRouting`) and adds it to the
`list_console_messages` example (#2920).
- **chrome-devtools-cli**: `--geolocation` takes `<lat>,<lon>` (#2907);
`install_pwa` needs `<manifestId> <installUrlOrBundleUrl>` (#2908);
`get_heapsnapshot_details` takes only `<filePath>` (#2919) and now comes
before `get_heapsnapshot_class_nodes`, which takes a numeric class ID
from the details output (#2918).
- **troubleshooting**: verbose logs use `NODE_DEBUG=*`, not `DEBUG=*`
(#2910); the read-only symptom now lists tools that are actually
`readOnlyHint: true` and no longer hard-codes a tool count (#2912);
`--slim` also exposes `evaluate` (#2913).
- **docs/cli.md**: verbose CLI logs need `NODE_DEBUG=*` plus restarting
the daemon with `--logFile`, because the daemon's stdio is discarded
(#2921).

Fixes #2906
Fixes #2907
Fixes #2908
Fixes #2910
Fixes #2912
Fixes #2913
Fixes #2918
Fixes #2919
Fixes #2920
Fixes #2921
2026-10-07 12:04:53 +00:00
achideal 9cf47a4455 feat: support evaluating scripts from local files (#2606)
## Summary
- extend `evaluate_script` with `sourcePath` for loading JavaScript from
the MCP server filesystem
- add `format: function | script` while preserving existing function
calls, output redirection, and CLI positional syntax
- validate local source paths through MCP roots and cover page, service
worker, and CLI execution

Supersedes #1772.
Fixes #1775.

## Test plan
- [x] `npm run gen`
- [x] `npm run test tests/tools/script.test.ts
tests/e2e/chrome-devtools-commands.test.ts`
- [ ] `npm run test` (feature-related tests pass; the local Windows run
has unrelated existing failures: symlink creation requires additional OS
privileges, one extension-page timeout, and the large full-page
screenshot exceeds Chrome's limit)
2026-10-01 06:19:24 +00:00
Samiya Caur 3c12a91c38 docs: update documentation and SKILL for get_css_styles tool (#2824)
This is an attempt to get agent to prefer `get_css_styles` (over
`evaluate_script`) for style debugging usecases
2026-09-24 09:23:45 +00:00
Samiya CaurandSamiya Caur 4454ae0a8a feat: add get_css_style tool (#2612)
Add `get_css_styles` tool which exposes matched styles and the CSS
cascade to empower accurate CSS debugging workflows.

It integrates `CssFormatter` into `McpPage` and `McpResponse`, adding
container query resolution and rule pagination support.

Co-authored-by: Samiya Caur <samiyac@chromium.org>
2026-09-11 07:51:16 +00:00
Dominik Inführ 2dc104ce1b feat: Add --allow-unrestricted-paths by default for CLI (#2618) 2026-08-26 14:04:11 +00:00
50a16fae69 feat: make pageId required for page-scoped tools by default (#1777)
Removes `--experimental-page-id-routing` making it the default behavior.
To go back to the previous behavior, pass `--pageIdRouting=false` when
starting the server.

---------

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
Co-authored-by: Samiya Caur <samiyac@google.com>
2026-08-24 16:54:06 +00:00
Alex Rudenko 0e108ea8c6 fix(cli): update the CLI skill (#2569)
Updates the commands and clarifies permissions.
2026-08-13 07:01:44 +00:00
Alex Rudenko da0441d425 docs: extract WebMCP into its own category (#1993)
Extracting WebMCP tools into a separate category for better grouping in
the docs. This changes `--experimentalWebmcp` to
`--categoryExperimentalWebmcp` to align with other experimental
categories. Debugging category was not a good fit since the tools
provided by WebMCP are not necessarily used for debugging.

cc @beaufortfrancois
2026-05-05 12:50:42 +00:00
Nicholas Roscino b2b3e99d67 feat(cli): generate commands for conditional tools (#1962)
This PR adds all tools in the CLI interface. When a tool is not enabled
the server responds with an error guiding the user on how to enable the
category or the experiment.

Closes:
https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1933
2026-04-30 07:59:08 +00:00
Guy Owenandojonesjr 92368345dd docs: fix skill and reference documentation issues (#1249)
## Summary

This PR fixes several documentation and skill-reference issues across
the repo to improve accuracy and reduce confusion in implementation and
troubleshooting workflows.

## Changes

- corrected CLI examples in skill docs
- fixed the documented argument order for `performance_analyze_insight`
- updated the memory leak fallback script path
- corrected generated tool reference wording by updating the
source-of-truth tool descriptions

---------

Co-authored-by: ojonesjr <50652264+ojonesjr@users.noreply.github.com>
2026-04-02 19:28:12 +00:00
Alex RudenkoandMathias Bynens 1ac574e715 feat: experimental chrome-devtools CLI (#1100)
This PR enables an alternative CLI interface for Chrome DevTools MCP.
`chrome-devtools` can be used in shell scripts to automate the Chrome
DevTools MCP session running as a daemon process. Currently, a single
session is shared between all `chrome-devtools` calls. All tools
available by default are included into the CLI.

Examples:

```bash
❯ chrome-devtools navigate_page --url https://example.com
Successfully navigated to https://example.com.
## Pages
1: https://example.com/ [selected]

❯ chrome-devtools lighthouse_audit
## Lighthouse Audit Results
Mode: navigation
Device: desktop
URL: https://example.com/
### Category Scores
- Accessibility: 96 (accessibility)
- Best Practices: 96 (best-practices)
- SEO: 80 (seo)
### Audit Summary
Passed: 30
Failed: 4
Total Timing: 4107.22ms
### Reports
- /var/folders/hq/m1wr43z9665g5pghys7gkc2w00r23k/T/chrome-devtools-mcp-l5LRIT/report.json
- /var/folders/hq/m1wr43z9665g5pghys7gkc2w00r23k/T/chrome-devtools-mcp-3o6rcM/report.htm
```

```sh
❯ chrome-devtools lighthouse_audit --format=json | jq
{
  "lighthouseResult": {
    "summary": {
      "mode": "navigation",
      "device": "desktop",
      "url": "https://example.com/",
      "scores": [
        {
          "id": "accessibility",
          "title": "Accessibility",
          "score": 0.96
        },
        {
          "id": "best-practices",
          "title": "Best Practices",
          "score": 0.96
        },
        {
          "id": "seo",
          "title": "SEO",
          "score": 0.8
        }
      ],
      "audits": {
        "failed": 4,
        "passed": 30
      },
      "timing": {
        "total": 3754.87
      }
    },
    "reports": [
      "/var/folders/hq/m1wr43z9665g5pghys7gkc2w00r23k/T/chrome-devtools-mcp-nbLj82/report.json",
      "/var/folders/hq/m1wr43z9665g5pghys7gkc2w00r23k/T/chrome-devtools-mcp-VTp35b/report.html"
    ]
  }
}
```

To test:

```sh
npm ci
npm run clean
npm run bundle
npm pack
npm i chrome-devtools-mcp-0.18.1.tgz -g # to install globally
```

---------

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2026-03-11 09:42:12 +01:00