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
Set to true to include tools related to extensions. Note: This feature is currently only supported with a pipe connection. autoConnect, browserUrl, and wsEndpoint are not supported with this feature until 149 will be released.
623
+
-**Type:** boolean
624
+
615
625
-**`--performanceCrux`/ `--performance-crux`**
616
626
Set to false to disable sending URLs from performance traces to CrUX API to get field performance data.
Copy file name to clipboardExpand all lines: skills/chrome-devtools/SKILL.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,7 @@ description: Uses Chrome DevTools via MCP for efficient debugging, troubleshooti
5
5
6
6
## Core Concepts
7
7
8
-
**Browser lifecycle**: Browser starts automatically on first tool call using a persistent Chrome profile. Configure via CLI args in the MCP server configuration: `npx chrome-devtools-mcp@latest --help`.
9
-
8
+
**Browser lifecycle**: Browser starts automatically on first tool call using a persistent Chrome profile. Configure via CLI args in the MCP server configuration: `npx chrome-devtools-mcp@latest --help`. To enable extensions, use `--categoryExtensions`.
10
9
**Page selection**: Tools operate on the currently selected page. Use `list_pages` to see available pages, then `select_page` to switch context.
11
10
12
11
**Element interaction**: Use `take_snapshot` to get page structure with element `uid`s. Each element has a unique `uid` for interaction. If an element isn't found, take a fresh snapshot - the element may have been removed or the page changed.
@@ -36,6 +35,14 @@ description: Uses Chrome DevTools via MCP for efficient debugging, troubleshooti
36
35
37
36
You can send multiple tool calls in parallel, but maintain correct order: navigate → wait → snapshot → interact.
38
37
38
+
### Testing an extension
39
+
40
+
1.**Install**: Use `install_extension` with the path to the unpacked extension.
41
+
2.**Identify**: Get the extension ID from the response or by calling `list_extensions`.
42
+
3.**Trigger Action**: Use `trigger_extension_action` to open the popup or side panel if applicable.
43
+
4.**Verify Service Worker**: Use `evaluate_script` with `serviceWorkerId` to check extension state or trigger background actions.
44
+
5.**Verify Page Behavior**: Navigate to a page where the extension operates and use `take_snapshot` to check if content scripts injected elements or modified the page correctly.
45
+
39
46
## Troubleshooting
40
47
41
48
If `chrome-devtools-mcp` is insufficient, guide users to use Chrome DevTools UI:
Copy file name to clipboardExpand all lines: skills/troubleshooting/SKILL.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,13 @@ If the server starts successfully but only a limited subset of tools (like `list
47
47
48
48
All tools in `chrome-devtools-mcp` are annotated with `readOnlyHint: true` (for safe, non-modifying tools) or `readOnlyHint: false` (for tools that modify browser state, like `emulate`, `click`, `navigate_page`). To access the full suite of tools, the user must disable read-only mode in their MCP client (e.g., by exiting "Plan Mode" in Gemini CLI or adjusting their client's tool safety settings).
49
49
50
+
#### Symptom: Extension tools are missing or extensions fail to load
51
+
52
+
If the tools related to extensions (like `install_extension`) are not available, or if the extensions you load are not functioning:
53
+
54
+
1.**Check for the `--categoryExtensions` flag**: Ensure this flag is passed in the MCP server configuration to enable the extension category tools.
55
+
2.**Make sure the browser was not started with `--autoConnect`**: When using `--autoConnect`, Chrome is not able to load extensions.
56
+
50
57
#### Other Common Errors
51
58
52
59
Identify other error messages from the failed tool call or the MCP initialization logs:
'Set to true to include tools related to extensions. Note: This feature is only supported with a pipe connection. autoConnect is not supported.',
228
+
'Set to true to include tools related to extensions. Note: This feature is currently only supported with a pipe connection. autoConnect, browserUrl, and wsEndpoint are not supported with this feature until 149 will be released.',
description: `List all console messages for the currently selected page since the last navigation.${cliArgs?.categoryExtensions ? ' This includes console messages originating from extensions content scripts.' : ''}`,
46
+
annotations: {
47
+
category: ToolCategory.DEBUGGING,
48
+
readOnlyHint: true,
49
+
},
50
+
schema: {
51
+
pageSize: zod
52
+
.number()
53
+
.int()
54
+
.positive()
55
+
.optional()
56
+
.describe(
57
+
'Maximum number of messages to return. When omitted, returns all messages.',
58
+
),
59
+
pageIdx: zod
60
+
.number()
61
+
.int()
62
+
.min(0)
63
+
.optional()
64
+
.describe(
65
+
'Page number to return (0-based). When omitted, returns the first page.',
66
+
),
67
+
types: zod
68
+
.array(zod.enum(FILTERABLE_MESSAGE_TYPES))
69
+
.optional()
70
+
.describe(
71
+
'Filter messages to only return messages of the specified resource types. When omitted or empty, returns all messages.',
72
+
),
73
+
includePreservedMessages: zod
74
+
.boolean()
75
+
.default(false)
76
+
.optional()
77
+
.describe(
78
+
'Set to true to return the preserved messages over the last 3 navigations.',
description: `Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON,
20
+
description: `Evaluate a JavaScript function inside the currently selected page${cliArgs?.categoryExtensions ? ' or service worker' : ''}. Returns the response as JSON,
21
21
so returned values have to be JSON-serializable.`,
22
22
annotations: {
23
23
category: ToolCategory.DEBUGGING,
@@ -59,7 +59,7 @@ Example with arguments: \`(el) => {
59
59
.string()
60
60
.optional()
61
61
.describe(
62
-
`An optional service worker id to evaluate the script in.`,
62
+
`The optional service worker id to evaluate the script in. If provided, 'pageId' should be omitted. Note: 'args' (element UIDs) cannot be used when evaluating in a service worker.`,
0 commit comments