Skip to content

Commit 5bc3bd0

Browse files
authored
Merge branch 'main' into fix-empty-browserurl
2 parents 8a21061 + 9b4cd8e commit 5bc3bd0

39 files changed

+904
-238
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Conventional Commit'
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
# Defaults
7+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target
8+
- opened
9+
- reopened
10+
- synchronize
11+
# Tracks editing PR title or description, or base branch changes
12+
# https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request
13+
- edited
14+
15+
jobs:
16+
main:
17+
name: '[Required] Validate PR title'
18+
runs-on: ubuntu-latest
19+
permissions:
20+
pull-requests: read
21+
steps:
22+
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/presubmit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
jobs:
1212
check-format:
13+
name: '[Required] Check correct format'
1314
runs-on: ubuntu-latest
1415

1516
steps:
@@ -31,6 +32,7 @@ jobs:
3132
run: npm run check-format
3233

3334
check-docs:
35+
name: '[Required] Check docs updated'
3436
runs-on: ubuntu-latest
3537

3638
steps:

.github/workflows/run-tests.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- windows-latest
2121
- macos-latest
2222
node:
23-
- 22.12.0
23+
- 20
2424
- 22
2525
- 23
2626
- 24
@@ -34,19 +34,34 @@ jobs:
3434
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3535
with:
3636
cache: npm
37-
node-version: ${{ matrix.node }}
37+
node-version: 22 # build works only with 22+.
3838

3939
- name: Install dependencies
4040
shell: bash
4141
run: npm ci
4242

43+
- name: Build
44+
run: npm run build
45+
46+
- name: Set up Node.js
47+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
48+
with:
49+
cache: npm
50+
node-version: ${{ matrix.node }}
51+
4352
- name: Disable AppArmor
4453
if: ${{ matrix.os == 'ubuntu-latest' }}
4554
shell: bash
4655
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
4756

57+
- name: Run tests (node20)
58+
if: ${{ matrix.node == '20' }}
59+
shell: bash
60+
run: npm run test:node20
61+
4862
- name: Run tests
4963
shell: bash
64+
if: ${{ matrix.node != '20' }}
5065
run: npm run test
5166

5267
# Gating job for branch protection.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.4.0"
2+
".": "0.6.0"
33
}

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# Changelog
22

3+
## [0.6.0](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v0.5.1...chrome-devtools-mcp-v0.6.0) (2025-10-01)
4+
5+
6+
### Features
7+
8+
* **screenshot:** add WebP format support with quality parameter ([#220](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/220)) ([03e02a2](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/03e02a2d769fbfc0c98599444dfed5413d15ae6e))
9+
* **screenshot:** adds ability to output screenshot to a specific pat… ([#172](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/172)) ([f030726](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/f03072698ddda8587ce23229d733405f88b7c89e))
10+
* support --accept-insecure-certs CLI ([#231](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/231)) ([efb106d](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/efb106dc94af0057f88c89f810beb65114eeaa4b))
11+
* support --proxy-server CLI ([#230](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/230)) ([dfacc75](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/dfacc75ee9f46137b5194e35fc604b89a00ff53f))
12+
* support initial viewport in the CLI ([#229](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/229)) ([ef61a08](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/ef61a08707056c5078d268a83a2c95d10e224f31))
13+
* support timeouts in wait_for and navigations ([#228](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/228)) ([36e64d5](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/36e64d5ae21e8bb244a18201a23a16932947e938))
14+
15+
16+
### Bug Fixes
17+
18+
* **network:** show only selected request ([#236](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/236)) ([73f0aec](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/73f0aecd8a48b9d1ee354897fe14d785c80e863e))
19+
* PageCollector subscribing multiple times ([#241](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/241)) ([0412878](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/0412878bf51ae46e48a171183bb38cfbbee1038a))
20+
* snapshot does not capture Iframe content ([#217](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/217)) ([ce356f2](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/ce356f256545e805db74664797de5f42e7b92bed)), closes [#186](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/186)
21+
22+
## [0.5.1](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v0.5.0...chrome-devtools-mcp-v0.5.1) (2025-09-29)
23+
24+
25+
### Bug Fixes
26+
27+
* update package.json engines to reflect node20 support ([#210](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/210)) ([b31e647](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/b31e64713e0524f28cbf760fad27b25829ec419d))
28+
29+
## [0.5.0](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v0.4.0...chrome-devtools-mcp-v0.5.0) (2025-09-29)
30+
31+
32+
### Features
33+
34+
* **screenshot:** add JPEG quality parameter support ([#184](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/184)) ([139cfd1](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/139cfd135cdb07573fe87d824631fcdb6153186e))
35+
36+
37+
### Bug Fixes
38+
39+
* do not error if the dialog was already handled ([#208](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/208)) ([d9f77f8](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/d9f77f85098ffe851308c5de05effb03ac21237b))
40+
* reference to handle_dialog tool ([#209](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/209)) ([205eef5](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/205eef5cdff19ccb7ddbd113bb1450cb87e8f398))
41+
* support node20 ([#52](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/52)) ([13613b4](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/13613b4a33ab7cf2d4fb1f4849bfa6b82f546945))
42+
* update tool reference in an error ([#205](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/205)) ([7765bb3](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/7765bb381ad9d01219547faf879a74978188754a))
43+
344
## [0.4.0](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v0.3.0...chrome-devtools-mcp-v0.4.0) (2025-09-26)
445

546

README.md

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ control and inspect a live Chrome browser. It acts as a Model-Context-Protocol
77
(MCP) server, giving your AI coding assistant access to the full power of
88
Chrome DevTools for reliable automation, in-depth debugging, and performance analysis.
99

10+
## [Tool reference](./docs/tool-reference.md) | [Changelog](./CHANGELOG.md) | [Contributing](./CONTRIBUTING.md) | [Troubleshooting](./docs/troubleshooting.md)
11+
1012
## Key features
1113

1214
- **Get performance insights**: Uses [Chrome
@@ -27,7 +29,7 @@ MCP clients.
2729

2830
## Requirements
2931

30-
- [Node.js 22.12.0](https://nodejs.org/) or newer.
32+
- [Node.js](https://nodejs.org/) v20.19 or a newer [latest maintenance LTS](https://github.com/nodejs/Release#release-schedule) version.
3133
- [Chrome](https://www.google.com/chrome/) current stable version or newer.
3234
- [npm](https://www.npmjs.com/).
3335

@@ -40,7 +42,7 @@ Add the following config to your MCP client:
4042
"mcpServers": {
4143
"chrome-devtools": {
4244
"command": "npx",
43-
"args": ["chrome-devtools-mcp@latest"]
45+
"args": ["-y", "chrome-devtools-mcp@latest"]
4446
}
4547
}
4648
}
@@ -75,6 +77,47 @@ claude mcp add chrome-devtools npx chrome-devtools-mcp@latest
7577
codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
7678
```
7779

80+
**On Windows 11**
81+
82+
Configure the Chrome install location and increase the startup timeout by updating `.codex/config.toml` and adding the following `env` and `startup_timeout_ms` parameters:
83+
84+
```
85+
[mcp_servers.chrome-devtools]
86+
command = "cmd"
87+
args = [
88+
"/c",
89+
"npx",
90+
"-y",
91+
"chrome-devtools-mcp@latest",
92+
]
93+
env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
94+
startup_timeout_ms = 20_000
95+
```
96+
97+
</details>
98+
99+
<details>
100+
<summary>Copilot CLI</summary>
101+
102+
Start Copilot CLI:
103+
104+
```
105+
copilot
106+
```
107+
108+
Start the dialog to add a new MCP server by running:
109+
110+
```
111+
/mcp add
112+
```
113+
114+
Configure the following fields and press `CTR-S` to save the configuration:
115+
116+
- **Server name:** `chrome-devtools`
117+
- **Server Type:** `[1] Local`
118+
- **Command:** `npx`
119+
- **Arguments:** `-y, chrome-devtools-mcp@latest`
120+
78121
</details>
79122

80123
<details>
@@ -92,7 +135,7 @@ codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
92135

93136
**Click the button to install:**
94137

95-
[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=chrome-devtools&config=eyJjb21tYW5kIjoibnB4IGNocm9tZS1kZXZ0b29scy1tY3BAbGF0ZXN0In0%3D)
138+
[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=chrome-devtools&config=eyJjb21tYW5kIjoibnB4IC15IGNocm9tZS1kZXZ0b29scy1tY3BAbGF0ZXN0In0%3D)
96139

97140
**Or install manually:**
98141

@@ -134,6 +177,21 @@ The same way chrome-devtools-mcp can be configured for JetBrains Junie in `Setti
134177

135178
</details>
136179

180+
<details>
181+
<summary>Visual Studio</summary>
182+
183+
**Click the button to install:**
184+
185+
[<img src="https://img.shields.io/badge/Visual_Studio-Install-C16FDE?logo=visualstudio&logoColor=white" alt="Install in Visual Studio">](https://vs-open.link/mcp-install?%7B%22name%22%3A%22chrome-devtools%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22chrome-devtools-mcp%40latest%22%5D%7D)
186+
</details>
187+
188+
<details>
189+
<summary>Warp</summary>
190+
191+
Go to `Settings | AI | Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the config provided above.
192+
193+
</details>
194+
137195
### Your first prompt
138196

139197
Enter the following prompt in your MCP Client to check if everything is working:
@@ -149,6 +207,8 @@ Your MCP client should open the browser and record a performance trace.
149207
150208
## Tools
151209

210+
If you run into any issues, checkout our [troubleshooting guide](./docs/troubleshooting.md).
211+
152212
<!-- BEGIN AUTO GENERATED TOOLS -->
153213

154214
- **Input automation** (7 tools)
@@ -219,6 +279,18 @@ The Chrome DevTools MCP server supports the following configuration option:
219279
Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.
220280
- **Type:** string
221281

282+
- **`--viewport`**
283+
Initial viewport size for the Chrome instances started by the server. For example, `1280x720`
284+
- **Type:** string
285+
286+
- **`--proxyServer`**
287+
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.
288+
- **Type:** string
289+
290+
- **`--acceptInsecureCerts`**
291+
If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.
292+
- **Type:** boolean
293+
222294
<!-- END AUTO GENERATED OPTIONS -->
223295

224296
Pass them via the `args` property in the JSON configuration. For example:
@@ -249,7 +321,7 @@ You can also run `npx chrome-devtools-mcp@latest --help` to see all available co
249321
data directory:
250322

251323
- Linux / MacOS: `$HOME/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`
252-
- Window: `%HOMEPATH%/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`
324+
- Windows: `%HOMEPATH%/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`
253325

254326
The user data directory is not cleared between runs and shared across
255327
all instances of `chrome-devtools-mcp`. Set the `isolated` option to `true`

docs/tool-reference.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138

139139
**Parameters:**
140140

141+
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
141142
- **url** (string) **(required)**: URL to navigate the page to
142143

143144
---
@@ -149,6 +150,7 @@
149150
**Parameters:**
150151

151152
- **navigate** (enum: "back", "forward") **(required)**: Whether to navigate back or navigate forward in the selected pages history
153+
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
152154

153155
---
154156

@@ -158,6 +160,7 @@
158160

159161
**Parameters:**
160162

163+
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
161164
- **url** (string) **(required)**: URL to load in a new page.
162165

163166
---
@@ -179,6 +182,7 @@
179182
**Parameters:**
180183

181184
- **text** (string) **(required)**: Text to appear on the page
185+
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
182186

183187
---
184188

@@ -219,7 +223,7 @@
219223

220224
### `performance_analyze_insight`
221225

222-
**Description:** Provides more detailed information on a specific Performance Insight that was highlighed in the results of a trace recording.
226+
**Description:** Provides more detailed information on a specific Performance Insight that was highlighted in the results of a trace recording.
223227

224228
**Parameters:**
225229

@@ -306,8 +310,10 @@ so returned values have to JSON-serializable.
306310

307311
**Parameters:**
308312

309-
- **format** (enum: "png", "jpeg") _(optional)_: Type of format to save the screenshot as. Default is "png"
313+
- **filePath** (string) _(optional)_: The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response.
314+
- **format** (enum: "png", "jpeg", "webp") _(optional)_: Type of format to save the screenshot as. Default is "png"
310315
- **fullPage** (boolean) _(optional)_: If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid.
316+
- **quality** (number) _(optional)_: Compression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format.
311317
- **uid** (string) _(optional)_: The uid of an element on the page from the page content snapshot. If omitted takes a pages screenshot.
312318

313319
---

docs/troubleshooting.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Troubleshooting
2+
3+
## General tips
4+
5+
- Run `npx chrome-devtools-mcp@latest --help` to test if the MCP server runs on your machine.
6+
- Make sure that your MCP client uses the same npm and node version as your terminal.
7+
- When configuring your MCP client, try using the `--yes` argument to `npx` to
8+
auto-accept installation prompt.
9+
- Find a specific error in the output of the `chrome-devtools-mcp` server.
10+
Usually, if you client is an IDE, logs would be in the Output pane.
11+
12+
## Specific problems
13+
14+
### `Error [ERR_MODULE_NOT_FOUND]: Cannot find module ...`
15+
16+
This usually indicates either a non-supported Node version is in use or that the
17+
`npm`/`npx` cache is corrupted. Try clearing the cache, uninstalling
18+
`chrome-devtools-mcp` and installing it again. Clear the cache by running:
19+
20+
```sh
21+
rm -rf ~/.npm/_npx # NOTE: this might remove other installed npx executables.
22+
npm cache clean --force
23+
```
24+
25+
### `Target closed` error
26+
27+
This indicates that the browser could not be started. Make sure that no Chrome
28+
instances are running or close them. Make sure you have the latest stable Chrome
29+
installed and that [your system is able to run Chrome](https://support.google.com/chrome/a/answer/7100626?hl=en).

0 commit comments

Comments
 (0)