Skip to content

Chrome DevTools for coding agents

fix: mark categoryExtensions flag mutually exclusive with autoConnect (#1202)

Nicholas Roscino8c2a7fc21ead
diff --git a/src/bin/chrome-devtools-mcp-cli-options.ts b/src/bin/chrome-devtools-mcp-cli-options.ts
index f81c9e20..b4792629 100644
--- a/src/bin/chrome-devtools-mcp-cli-options.ts
+++ b/src/bin/chrome-devtools-mcp-cli-options.ts
@@ -12,7 +12,7 @@ export const cliOptions = {
type: 'boolean',
description:
'If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remoted debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.',
- conflicts: ['isolated', 'executablePath'],
+ conflicts: ['isolated', 'executablePath', 'categoryExtensions'],
default: false,
coerce: (value: boolean | undefined) => {
if (!value) {
@@ -26,7 +26,7 @@ export const cliOptions = {
description:
'Connect to a running, debuggable Chrome instance (e.g. `http://127.0.0.1:9222`). For more details see: https://github.com/ChromeDevTools/chrome-devtools-mcp#connecting-to-a-running-chrome-instance.',
alias: 'u',
- conflicts: 'wsEndpoint',
+ conflicts: ['wsEndpoint', 'categoryExtensions'],
coerce: (url: string | undefined) => {
if (!url) {
return;
@@ -44,7 +44,7 @@ export const cliOptions = {
description:
'WebSocket endpoint to connect to a running Chrome instance (e.g., ws://127.0.0.1:9222/devtools/browser/<id>). Alternative to --browserUrl.',
alias: 'w',
- conflicts: 'browserUrl',
+ conflicts: ['browserUrl', 'categoryExtensions'],
coerce: (url: string | undefined) => {
if (!url) {
return;
@@ -211,9 +211,10 @@ export const cliOptions = {
},
categoryExtensions: {
type: 'boolean',
- default: false,
hidden: true,
- describe: 'Set to false to exclude tools related to extensions.',
+ conflicts: ['browserUrl', 'autoConnect', 'wsEndpoint'],
+ describe:
+ 'Set to true to include tools related to extensions. Note: This feature is only supported with a pipe connection. autoConnect is not supported.',
},
performanceCrux: {
type: 'boolean',
diff --git a/src/index.ts b/src/index.ts
index 1e731521..7dabf676 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -129,7 +129,7 @@ export async function createMcpServer(
}
if (
tool.annotations.category === ToolCategory.EXTENSIONS &&
- serverArgs.categoryExtensions === false
+ !serverArgs.categoryExtensions
) {
return;
}
diff --git a/tests/cli.test.ts b/tests/cli.test.ts
index 4bea6b95..b18a4532 100644
--- a/tests/cli.test.ts
+++ b/tests/cli.test.ts
@@ -15,8 +15,6 @@ describe('cli args parsing', () => {
categoryEmulation: true,
'category-performance': true,
categoryPerformance: true,
- 'category-extensions': false,
- categoryExtensions: false,
'category-network': true,
categoryNetwork: true,
'auto-connect': undefined,