Skip to content

Chrome DevTools for coding agents

fix: allow --categoryExtensions when connecting to an existing browser (#3041)

Aviad Pinelesd250bc5cd14d
diff --git a/docs/configuration.md b/docs/configuration.md
index 7e28b632..b1539b1d 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -35,7 +35,7 @@ The Chrome DevTools MCP server supports the following configuration option:
- **Default:** `true`
- **`--categoryExtensions`/ `--category-extensions`**
- 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.
+ Set to true to include tools related to extensions.
- **Type:** boolean
- **Default:** `false`
diff --git a/skills/troubleshooting/SKILL.md b/skills/troubleshooting/SKILL.md
index 8b84bd7a..72e45aec 100644
--- a/skills/troubleshooting/SKILL.md
+++ b/skills/troubleshooting/SKILL.md
@@ -52,7 +52,6 @@ All tools in `chrome-devtools-mcp` are annotated with `readOnlyHint: true` (for
If the tools related to extensions (like `install_extension`) are not available, or if the extensions you load are not functioning:
1. **Check for the `--categoryExtensions` flag**: Ensure this flag is passed in the MCP server configuration to enable the extension category tools.
-2. **Make sure the MCP server in configured to launch Chrome instead of connecting to an instance**: Chrome before 149 is not able to load extensions when connecting to an existing instance (`--auto-connect`, `--browserUrl`).
#### Other Common Errors
diff --git a/src/config/category-options.ts b/src/config/category-options.ts
index 1dea2dfe..5e4aec0c 100644
--- a/src/config/category-options.ts
+++ b/src/config/category-options.ts
@@ -42,8 +42,7 @@ const categoryOverrides: Record<
offByDefault: true,
},
[ToolCategory.EXTENSIONS]: {
- describe:
- '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.',
+ describe: 'Set to true to include tools related to extensions.',
offByDefault: true,
},
[ToolCategory.THIRD_PARTY]: {
diff --git a/src/config/mcp-options.ts b/src/config/mcp-options.ts
index 452c94f5..100e91a2 100644
--- a/src/config/mcp-options.ts
+++ b/src/config/mcp-options.ts
@@ -339,8 +339,6 @@ export const CONFLICTING_ARGS: Array<Array<keyof typeof mcpOptions>> = [
['allowUnrestrictedPaths', 'filesystemRoot'],
['categoryPwa', 'autoConnect'],
['categoryPwa', 'browserUrl', 'wsEndpoint'],
- ['categoryExtensions', 'autoConnect'],
- ['categoryExtensions', 'browserUrl', 'wsEndpoint'],
];
export const IMPLICATIONS: Array<
diff --git a/tests/cli.test.ts b/tests/cli.test.ts
index ea21e98c..656bc113 100644
--- a/tests/cli.test.ts
+++ b/tests/cli.test.ts
@@ -1167,36 +1167,16 @@ describe('cli args parsing', () => {
assert.strictEqual(args.executablePath, '/bin/chrome');
});
- it('rejects categoryExtensions with autoConnect', async () => {
- assert.throws(
- () => parseConfig(['--category-extensions', '--auto-connect']),
- /Arguments categoryExtensions and autoConnect are mutually exclusive/,
- );
- });
-
- it('rejects categoryExtensions with browserUrl', async () => {
- assert.throws(
- () =>
- parseConfig([
- '--category-extensions',
- '--browserUrl',
- 'http://localhost:9222',
- ]),
- /Arguments categoryExtensions and browserUrl are mutually exclusive/,
- );
- });
-
- it('rejects categoryExtensions with wsEndpoint', async () => {
- assert.throws(
- () =>
- parseConfig([
- '--category-extensions',
- '--wsEndpoint',
- 'ws://localhost:9222',
- ]),
- /Arguments categoryExtensions and wsEndpoint are mutually exclusive/,
- );
- });
+ for (const connectArgs of [
+ ['--auto-connect'],
+ ['--browserUrl', 'http://localhost:9222'],
+ ['--wsEndpoint', 'ws://localhost:9222'],
+ ]) {
+ it(`allows categoryExtensions with ${connectArgs[0]}`, async () => {
+ const args = parseConfig(['--category-extensions', ...connectArgs]);
+ assert.strictEqual(args.categoryExtensions, true);
+ });
+ }
for (const connectArgs of [
['--browserUrl', 'http://localhost:9222'],
@@ -1221,17 +1201,14 @@ describe('cli args parsing', () => {
});
}
- it('rejects explicit categoryExtensions with browserUrl in viaCli', async () => {
- assert.throws(
- () =>
- parseConfig([
- '--viaCli',
- '--category-extensions',
- '--browserUrl',
- 'http://localhost:9222',
- ]),
- /Arguments categoryExtensions and browserUrl are mutually exclusive/,
- );
+ it('allows explicit categoryExtensions with browserUrl in viaCli', async () => {
+ const args = parseConfig([
+ '--viaCli',
+ '--category-extensions',
+ '--browserUrl',
+ 'http://localhost:9222',
+ ]);
+ assert.strictEqual(args.categoryExtensions, true);
});
});