You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-35Lines changed: 52 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ prototype!
8
8
9
9
`chrome-devtools-mcp` exposes content of the browser instance to the MCP clients
10
10
allowing them to inspect, debug, and modify any data in the browser or DevTools.
11
-
Avoid sharing sensitive or personal information that you do want to share with
11
+
Avoid sharing sensitive or personal information that you don't want to share with
12
12
MCP clients.
13
13
14
14
## Requirements
@@ -33,7 +33,7 @@ Add the following config to your MCP client:
33
33
```
34
34
35
35
> [!NOTE]
36
-
> `Using `chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.
36
+
> Using `chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.
37
37
38
38
### MCP Client specific configuration
39
39
@@ -119,7 +119,41 @@ claude mcp add chrome-devtools-mcp npx chrome-devtools-mcp@latest
119
119
120
120
## Configuration
121
121
122
-
For example, to launch the system-installed Chrome Canary pass `--channel=canary` as an argument:
122
+
The Chrome DevTools MCP server supports the following configuration option:
123
+
124
+
<!-- BEGIN AUTO GENERATED OPTIONS -->
125
+
126
+
-**`--browserUrl`, `-u`**
127
+
Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.
128
+
129
+
-**Type:** string
130
+
131
+
-**`--headless`**
132
+
Whether to run in headless (no UI) mode.
133
+
134
+
-**Type:** boolean
135
+
-**Default:**`false`
136
+
137
+
-**`--executablePath`, `-e`**
138
+
Path to custom Chrome executable.
139
+
140
+
-**Type:** string
141
+
142
+
-**`--isolated`**
143
+
If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed.
144
+
145
+
-**Type:** boolean
146
+
-**Default:**`false`
147
+
148
+
-**`--channel`**
149
+
Specify a different Chrome channel that should be used.
150
+
-**Type:** string
151
+
-**Choices:**`stable`, `canary`, `beta`, `dev`
152
+
-**Default:**`stable`
153
+
154
+
<!-- END AUTO GENERATED OPTIONS -->
155
+
156
+
Pass them via the `args` property in the JSON configuration. For example:
123
157
124
158
```json
125
159
{
@@ -129,44 +163,27 @@ For example, to launch the system-installed Chrome Canary pass `--channel=canary
129
163
"args": [
130
164
"chrome-devtools-mcp@latest"
131
165
"--channel=canary",
166
+
"--headless=true",
167
+
"--isolated=true",
132
168
]
133
169
}
134
170
}
135
171
}
136
172
```
137
173
174
+
You can also run `npx chrome-devtools-mcp@latest --help` to see all available configuration options.
175
+
176
+
## Concepts
177
+
138
178
### User data directory
139
179
140
-
`chrome-devtools-mcp` starts a Chrome's stable channel instance using the user
141
-
data directory at `$HOME/.cache/chrome-devtools-mcp/mcp-profile-$CHANNEL` on
142
-
Linux/MacOS and `%HOMEPATH%/.cache/chrome-devtools-mcp/mcp-profile-$CHANNEL` in
143
-
Windows. The user data directory is not cleared between runs and shared across
144
-
all instances of `chrome-devtools-mcp`.
145
-
146
-
## CLI
147
-
148
-
Run `npx chrome-devtools-mcp@latest --help` to see all available configuration options:
149
-
150
-
<!-- BEGIN AUTO GENERATED CLI -->
151
-
152
-
```sh
153
-
Options:
154
-
--version Show version number [boolean]
155
-
-u, --browserUrl The browser URL to connect to [string]
156
-
--headless Whether to run in headless (no UI) mode [boolean] [default: false]
157
-
-e, --executablePath Path to custom Chrome executable [string]
158
-
--isolated If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. [boolean] [default: false]
159
-
--channel System installed browser channel to use. [string] [choices: "stable", "canary", "beta", "dev"]
160
-
--help Show help [boolean]
161
-
162
-
Examples:
163
-
npx chrome-devtools-mcp@latest --browserUrl http://127.0.0.1:9222 Connect to an existing browser instance
164
-
npx chrome-devtools-mcp@latest --channel beta Use Chrome Beta installed on this system
165
-
npx chrome-devtools-mcp@latest --channel canary Use Chrome Canary installed on this system
166
-
npx chrome-devtools-mcp@latest --channel dev Use Chrome Dev installed on this system
167
-
npx chrome-devtools-mcp@latest --channel stable Use stable Chrome installed on this system
168
-
npx chrome-devtools-mcp@latest --logFile /tmp/log.txt Save logs to a file
'Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.',
42
42
alias: 'u',
43
-
coerce: url=>{
43
+
coerce: (url: string)=>{
44
44
newURL(url);
45
45
returnurl;
46
46
},
47
-
})
48
-
.option('headless',{
49
-
type: 'boolean',
50
-
description: 'Whether to run in headless (no UI) mode',
47
+
},
48
+
headless:{
49
+
type: 'boolean'asconst,
50
+
description: 'Whether to run in headless (no UI) mode.',
51
51
default: false,
52
-
})
53
-
.option('executablePath',{
54
-
type: 'string',
55
-
description: 'Path to custom Chrome executable',
52
+
},
53
+
executablePath:{
54
+
type: 'string'asconst,
55
+
description: 'Path to custom Chrome executable.',
56
56
conflicts: 'browserUrl',
57
57
alias: 'e',
58
-
})
59
-
.option('isolated',{
60
-
type: 'boolean',
58
+
},
59
+
isolated:{
60
+
type: 'boolean'asconst,
61
61
description:
62
62
'If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed.',
63
63
default: false,
64
-
})
65
-
.option('customDevtools',{
66
-
type: 'string',
67
-
description: 'Path to custom DevTools',
64
+
},
65
+
customDevtools:{
66
+
type: 'string'asconst,
67
+
description: 'Path to custom DevTools.',
68
68
hidden: true,
69
69
conflicts: 'browserUrl',
70
70
alias: 'd',
71
-
})
72
-
.option('channel',{
73
-
type: 'string',
74
-
description: 'System installed browser channel to use.',
75
-
choices: ['stable','canary','beta','dev'],
71
+
},
72
+
channel:{
73
+
type: 'string'asconst,
74
+
description: 'Specify a different Chrome channel that should be used.',
0 commit comments