chrome-devtools-mcp-for-extension 0.5.0 → 0.5.4
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 +72 -216
- package/build/src/main.js +4 -4
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,268 +1,124 @@
|
|
|
1
|
-
# Chrome DevTools MCP
|
|
1
|
+
# Chrome DevTools MCP for Extension Development
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/chrome-devtools-mcp)
|
|
3
|
+
[](https://npmjs.org/package/chrome-devtools-mcp-for-extension)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
control and inspect a live Chrome browser. It acts as a Model-Context-Protocol
|
|
7
|
-
(MCP) server, giving your AI coding assistant access to the full power of
|
|
8
|
-
Chrome DevTools for reliable automation, in-depth debugging, and performance analysis.
|
|
5
|
+
An MCP server that lets AI assistants control Chrome and develop Chrome extensions.
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
Based on [chrome-devtools-mcp](https://github.com/ChromeDevTools/chrome-devtools-mcp) by Google.
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
DevTools](https://github.com/ChromeDevTools/devtools-frontend) to record
|
|
14
|
-
traces and extract actionable performance insights.
|
|
15
|
-
- **Advanced browser debugging**: Analyze network requests, take screenshots and
|
|
16
|
-
check the browser console.
|
|
17
|
-
- **Reliable automation**. Uses
|
|
18
|
-
[puppeteer](https://github.com/puppeteer/puppeteer) to automate actions in
|
|
19
|
-
Chrome and automatically wait for action results.
|
|
9
|
+
## Quick Start
|
|
20
10
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
`chrome-devtools-mcp` exposes content of the browser instance to the MCP clients
|
|
24
|
-
allowing them to inspect, debug, and modify any data in the browser or DevTools.
|
|
25
|
-
Avoid sharing sensitive or personal information that you don't want to share with
|
|
26
|
-
MCP clients.
|
|
27
|
-
|
|
28
|
-
## Requirements
|
|
29
|
-
|
|
30
|
-
- [Node.js 22.12.0](https://nodejs.org/) or newer.
|
|
31
|
-
- [Chrome](https://www.google.com/chrome/) current stable version or newer.
|
|
32
|
-
- [npm](https://www.npmjs.com/).
|
|
33
|
-
|
|
34
|
-
## Getting started
|
|
35
|
-
|
|
36
|
-
Add the following config to your MCP client:
|
|
11
|
+
Add this configuration to your MCP client:
|
|
37
12
|
|
|
38
13
|
```json
|
|
39
14
|
{
|
|
40
15
|
"mcpServers": {
|
|
41
|
-
"chrome-devtools": {
|
|
16
|
+
"chrome-devtools-extension": {
|
|
42
17
|
"command": "npx",
|
|
43
|
-
"args": ["chrome-devtools-mcp@latest"]
|
|
18
|
+
"args": ["chrome-devtools-mcp-for-extension@latest"]
|
|
44
19
|
}
|
|
45
20
|
}
|
|
46
21
|
}
|
|
47
22
|
```
|
|
48
23
|
|
|
49
|
-
|
|
50
|
-
> Using `chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.
|
|
51
|
-
|
|
52
|
-
### MCP Client configuration
|
|
53
|
-
|
|
54
|
-
<details>
|
|
55
|
-
<summary>Claude Code</summary>
|
|
56
|
-
Use the Claude Code CLI to add the Chrome DevTools MCP server (<a href="https://docs.anthropic.com/en/docs/claude-code/mcp">guide</a>):
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
claude mcp add chrome-devtools npx chrome-devtools-mcp@latest
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
</details>
|
|
63
|
-
|
|
64
|
-
<details>
|
|
65
|
-
<summary>Cline</summary>
|
|
66
|
-
Follow https://docs.cline.bot/mcp/configuring-mcp-servers and use the config provided above.
|
|
67
|
-
</details>
|
|
68
|
-
|
|
69
|
-
<details>
|
|
70
|
-
<summary>Codex</summary>
|
|
71
|
-
Follow the <a href="https://github.com/openai/codex/blob/main/docs/advanced.md#model-context-protocol-mcp">configure MCP guide</a>
|
|
72
|
-
using the standard config from above. You can also install the Chrome DevTools MCP server using the Codex CLI:
|
|
24
|
+
**Claude Code users:**
|
|
73
25
|
|
|
74
26
|
```bash
|
|
75
|
-
|
|
27
|
+
claude mcp add chrome-devtools-extension npx chrome-devtools-mcp-for-extension@latest
|
|
76
28
|
```
|
|
77
29
|
|
|
78
|
-
</details>
|
|
79
|
-
|
|
80
30
|
<details>
|
|
81
|
-
|
|
82
|
-
Follow the MCP install <a href="https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server">guide</a>,
|
|
83
|
-
with the standard config from above. You can also install the Chrome DevTools MCP server using the VS Code CLI:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
code --add-mcp '{"name":"chrome-devtools","command":"npx","args":["chrome-devtools-mcp@latest"]}'
|
|
87
|
-
```
|
|
88
|
-
</details>
|
|
89
|
-
|
|
90
|
-
<details>
|
|
91
|
-
<summary>Cursor</summary>
|
|
92
|
-
|
|
93
|
-
**Click the button to install:**
|
|
94
|
-
|
|
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)
|
|
31
|
+
<summary>Configuration file locations</summary>
|
|
96
32
|
|
|
97
|
-
**
|
|
98
|
-
|
|
99
|
-
Go to `Cursor Settings` -> `MCP` -> `New MCP Server`. Use the config provided above.
|
|
100
|
-
|
|
101
|
-
</details>
|
|
102
|
-
|
|
103
|
-
<details>
|
|
104
|
-
<summary>Gemini CLI</summary>
|
|
105
|
-
Install the Chrome DevTools MCP server using the Gemini CLI.
|
|
33
|
+
**Configuration file locations:**
|
|
106
34
|
|
|
107
|
-
**
|
|
35
|
+
- **Cursor**: `~/.cursor/extensions_config.json`
|
|
36
|
+
- **VS Code Copilot**: `.vscode/settings.json`
|
|
37
|
+
- **Cline**: Follow Cline's MCP setup guide
|
|
108
38
|
|
|
109
|
-
|
|
110
|
-
|
|
39
|
+
**JSON configuration:**
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"chrome-devtools-extension": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["chrome-devtools-mcp-for-extension@latest"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
111
49
|
```
|
|
112
50
|
|
|
113
|
-
**
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
51
|
+
**With extension loading:**
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"mcpServers": {
|
|
55
|
+
"chrome-devtools-extension": {
|
|
56
|
+
"command": "npx",
|
|
57
|
+
"args": [
|
|
58
|
+
"chrome-devtools-mcp-for-extension@latest",
|
|
59
|
+
"--loadExtension=/path/to/your/extension"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
117
64
|
```
|
|
118
|
-
|
|
119
|
-
Alternatively, follow the <a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#how-to-set-up-your-mcp-server">MCP guide</a> and use the standard config from above.
|
|
120
|
-
|
|
121
65
|
</details>
|
|
122
66
|
|
|
123
|
-
|
|
124
|
-
<summary>Gemini Code Assist</summary>
|
|
125
|
-
Follow the <a href="https://cloud.google.com/gemini/docs/codeassist/use-agentic-chat-pair-programmer#configure-mcp-servers">configure MCP guide</a>
|
|
126
|
-
using the standard config from above.
|
|
127
|
-
</details>
|
|
128
|
-
|
|
129
|
-
<details>
|
|
130
|
-
<summary>JetBrains AI Assistant & Junie</summary>
|
|
131
|
-
|
|
132
|
-
Go to `Settings | Tools | AI Assistant | Model Context Protocol (MCP)` -> `Add`. Use the config provided above.
|
|
133
|
-
The same way chrome-devtools-mcp can be configured for JetBrains Junie in `Settings | Tools | Junie | MCP Settings` -> `Add`. Use the config provided above.
|
|
134
|
-
|
|
135
|
-
</details>
|
|
67
|
+
### 2. Restart Claude Code
|
|
136
68
|
|
|
137
|
-
###
|
|
69
|
+
### 3. Try your first command
|
|
138
70
|
|
|
139
|
-
|
|
71
|
+
Tell your AI: "List all my Chrome extensions"
|
|
140
72
|
|
|
141
|
-
|
|
142
|
-
Check the performance of https://developers.chrome.com
|
|
143
|
-
```
|
|
73
|
+
## Features
|
|
144
74
|
|
|
145
|
-
|
|
75
|
+
- **Extension Development**: Load, debug, and reload Chrome extensions
|
|
76
|
+
- **Web Store Automation**: Automated submission with screenshots
|
|
77
|
+
- **Browser Control**: Navigate, click, fill forms, take screenshots
|
|
78
|
+
- **Performance Analysis**: Chrome DevTools integration
|
|
79
|
+
- **Network Debugging**: Request monitoring and analysis
|
|
146
80
|
|
|
147
|
-
|
|
148
|
-
> The MCP server will start the browser automatically once the MCP client uses a tool that requires a running browser instance. Connecting to the Chrome DevTools MCP server on its own will not automatically start the browser.
|
|
81
|
+
---
|
|
149
82
|
|
|
150
|
-
|
|
83
|
+
# 日本語 / Japanese
|
|
151
84
|
|
|
152
|
-
|
|
85
|
+
**AI が Chrome を制御して Chrome 拡張機能を開発するための MCP サーバー**
|
|
153
86
|
|
|
154
|
-
|
|
155
|
-
- [`click`](docs/tool-reference.md#click)
|
|
156
|
-
- [`drag`](docs/tool-reference.md#drag)
|
|
157
|
-
- [`fill`](docs/tool-reference.md#fill)
|
|
158
|
-
- [`fill_form`](docs/tool-reference.md#fill_form)
|
|
159
|
-
- [`handle_dialog`](docs/tool-reference.md#handle_dialog)
|
|
160
|
-
- [`hover`](docs/tool-reference.md#hover)
|
|
161
|
-
- [`upload_file`](docs/tool-reference.md#upload_file)
|
|
162
|
-
- **Navigation automation** (7 tools)
|
|
163
|
-
- [`close_page`](docs/tool-reference.md#close_page)
|
|
164
|
-
- [`list_pages`](docs/tool-reference.md#list_pages)
|
|
165
|
-
- [`navigate_page`](docs/tool-reference.md#navigate_page)
|
|
166
|
-
- [`navigate_page_history`](docs/tool-reference.md#navigate_page_history)
|
|
167
|
-
- [`new_page`](docs/tool-reference.md#new_page)
|
|
168
|
-
- [`select_page`](docs/tool-reference.md#select_page)
|
|
169
|
-
- [`wait_for`](docs/tool-reference.md#wait_for)
|
|
170
|
-
- **Emulation** (3 tools)
|
|
171
|
-
- [`emulate_cpu`](docs/tool-reference.md#emulate_cpu)
|
|
172
|
-
- [`emulate_network`](docs/tool-reference.md#emulate_network)
|
|
173
|
-
- [`resize_page`](docs/tool-reference.md#resize_page)
|
|
174
|
-
- **Performance** (3 tools)
|
|
175
|
-
- [`performance_analyze_insight`](docs/tool-reference.md#performance_analyze_insight)
|
|
176
|
-
- [`performance_start_trace`](docs/tool-reference.md#performance_start_trace)
|
|
177
|
-
- [`performance_stop_trace`](docs/tool-reference.md#performance_stop_trace)
|
|
178
|
-
- **Network** (2 tools)
|
|
179
|
-
- [`get_network_request`](docs/tool-reference.md#get_network_request)
|
|
180
|
-
- [`list_network_requests`](docs/tool-reference.md#list_network_requests)
|
|
181
|
-
- **Debugging** (4 tools)
|
|
182
|
-
- [`evaluate_script`](docs/tool-reference.md#evaluate_script)
|
|
183
|
-
- [`list_console_messages`](docs/tool-reference.md#list_console_messages)
|
|
184
|
-
- [`take_screenshot`](docs/tool-reference.md#take_screenshot)
|
|
185
|
-
- [`take_snapshot`](docs/tool-reference.md#take_snapshot)
|
|
87
|
+
## クイックスタート
|
|
186
88
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
## Configuration
|
|
190
|
-
|
|
191
|
-
The Chrome DevTools MCP server supports the following configuration option:
|
|
192
|
-
|
|
193
|
-
<!-- BEGIN AUTO GENERATED OPTIONS -->
|
|
194
|
-
|
|
195
|
-
- **`--browserUrl`, `-u`**
|
|
196
|
-
Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.
|
|
197
|
-
- **Type:** string
|
|
198
|
-
|
|
199
|
-
- **`--headless`**
|
|
200
|
-
Whether to run in headless (no UI) mode.
|
|
201
|
-
- **Type:** boolean
|
|
202
|
-
- **Default:** `false`
|
|
203
|
-
|
|
204
|
-
- **`--executablePath`, `-e`**
|
|
205
|
-
Path to custom Chrome executable.
|
|
206
|
-
- **Type:** string
|
|
207
|
-
|
|
208
|
-
- **`--isolated`**
|
|
209
|
-
If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed.
|
|
210
|
-
- **Type:** boolean
|
|
211
|
-
- **Default:** `false`
|
|
212
|
-
|
|
213
|
-
- **`--channel`**
|
|
214
|
-
Specify a different Chrome channel that should be used. The default is the stable channel version.
|
|
215
|
-
- **Type:** string
|
|
216
|
-
- **Choices:** `stable`, `canary`, `beta`, `dev`
|
|
217
|
-
|
|
218
|
-
- **`--logFile`**
|
|
219
|
-
Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.
|
|
220
|
-
- **Type:** string
|
|
221
|
-
|
|
222
|
-
<!-- END AUTO GENERATED OPTIONS -->
|
|
223
|
-
|
|
224
|
-
Pass them via the `args` property in the JSON configuration. For example:
|
|
89
|
+
MCP クライアントに設定を追加:
|
|
225
90
|
|
|
226
91
|
```json
|
|
227
92
|
{
|
|
228
93
|
"mcpServers": {
|
|
229
|
-
"chrome-devtools": {
|
|
94
|
+
"chrome-devtools-extension": {
|
|
230
95
|
"command": "npx",
|
|
231
|
-
"args": [
|
|
232
|
-
"chrome-devtools-mcp@latest",
|
|
233
|
-
"--channel=canary",
|
|
234
|
-
"--headless=true",
|
|
235
|
-
"--isolated=true"
|
|
236
|
-
]
|
|
96
|
+
"args": ["chrome-devtools-mcp-for-extension@latest"]
|
|
237
97
|
}
|
|
238
98
|
}
|
|
239
99
|
}
|
|
240
100
|
```
|
|
241
101
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
## Concepts
|
|
245
|
-
|
|
246
|
-
### User data directory
|
|
102
|
+
## 機能
|
|
247
103
|
|
|
248
|
-
|
|
249
|
-
|
|
104
|
+
- **拡張機能開発**: ロード、デバッグ、リロード
|
|
105
|
+
- **Web Store 自動申請**: スクリーンショット生成付き
|
|
106
|
+
- **ブラウザ制御**: ナビゲーション、フォーム操作、スクリーンショット
|
|
107
|
+
- **パフォーマンス分析**: Chrome DevTools 統合
|
|
250
108
|
|
|
251
|
-
|
|
252
|
-
- Window: `%HOMEPATH%/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`
|
|
109
|
+
## Use Cases
|
|
253
110
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
111
|
+
```
|
|
112
|
+
"Create a Chrome extension that blocks ads"
|
|
113
|
+
"Debug why my content script isn't working"
|
|
114
|
+
"Submit my extension to Chrome Web Store"
|
|
115
|
+
"Generate screenshots for store listing"
|
|
116
|
+
```
|
|
260
117
|
|
|
261
|
-
|
|
118
|
+
## 使用例
|
|
262
119
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
of the MCP client sandbox.
|
|
120
|
+
```
|
|
121
|
+
"広告ブロック拡張機能を作成して"
|
|
122
|
+
"コンテンツスクリプトが動かない原因をデバッグして"
|
|
123
|
+
"Web Store に拡張機能を申請して"
|
|
124
|
+
```
|
package/build/src/main.js
CHANGED
|
@@ -34,7 +34,7 @@ function readPackageJson() {
|
|
|
34
34
|
}
|
|
35
35
|
try {
|
|
36
36
|
const json = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
37
|
-
assert.strict(json['name'], 'chrome-devtools-mcp');
|
|
37
|
+
assert.strict(json['name'], 'chrome-devtools-mcp-for-extension');
|
|
38
38
|
return json;
|
|
39
39
|
}
|
|
40
40
|
catch {
|
|
@@ -44,10 +44,10 @@ function readPackageJson() {
|
|
|
44
44
|
const version = readPackageJson().version ?? 'unknown';
|
|
45
45
|
export const args = parseArguments(version);
|
|
46
46
|
const logFile = args.logFile ? saveLogsToFile(args.logFile) : undefined;
|
|
47
|
-
logger(`Starting Chrome DevTools MCP
|
|
47
|
+
logger(`Starting Chrome DevTools MCP for Extension Development v${version}`);
|
|
48
48
|
const server = new McpServer({
|
|
49
|
-
name: '
|
|
50
|
-
title: 'Chrome DevTools MCP
|
|
49
|
+
name: 'chrome-devtools-extension',
|
|
50
|
+
title: 'Chrome DevTools MCP for Extension Development',
|
|
51
51
|
version,
|
|
52
52
|
}, { capabilities: { logging: {} } });
|
|
53
53
|
server.server.setRequestHandler(SetLevelRequestSchema, () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.4",
|
|
4
|
+
"description": "Chrome extension development MCP server with Web Store automation. Fork of chrome-devtools-mcp with extension-specific tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./build/src/index.js",
|
|
7
7
|
"main": "index.js",
|
|
@@ -24,17 +24,21 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"build/src",
|
|
26
26
|
"build/node_modules",
|
|
27
|
+
"README.md",
|
|
27
28
|
"LICENSE",
|
|
28
29
|
"!*.tsbuildinfo"
|
|
29
30
|
],
|
|
30
|
-
"repository":
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/usedhonda/chrome-devtools-mcp.git"
|
|
34
|
+
},
|
|
31
35
|
"author": "usedhonda (forked from Google LLC)",
|
|
32
36
|
"license": "Apache-2.0",
|
|
33
37
|
"bugs": {
|
|
34
38
|
"url": "https://github.com/usedhonda/chrome-devtools-mcp/issues"
|
|
35
39
|
},
|
|
36
40
|
"homepage": "https://github.com/usedhonda/chrome-devtools-mcp#readme",
|
|
37
|
-
"mcpName": "
|
|
41
|
+
"mcpName": "chrome-devtools-extension",
|
|
38
42
|
"keywords": [
|
|
39
43
|
"mcp",
|
|
40
44
|
"chrome",
|