From a02262bd86e978ffc5a8d410b127764c7adb9cde Mon Sep 17 00:00:00 2001 From: Nicholas Roscino Date: Wed, 18 Mar 2026 11:40:10 +0100 Subject: [PATCH 1/2] fix: mark categoryExtensions flag mutually exclusive with autoConnect --- src/bin/chrome-devtools-mcp-cli-options.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bin/chrome-devtools-mcp-cli-options.ts b/src/bin/chrome-devtools-mcp-cli-options.ts index f81c9e208..c324168f2 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/). Alternative to --browserUrl.', alias: 'w', - conflicts: 'browserUrl', + conflicts: ['browserUrl', 'categoryExtensions'], coerce: (url: string | undefined) => { if (!url) { return; @@ -213,7 +213,9 @@ export const cliOptions = { 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', From 6fb8295c1bf5ceecce3f50ce8f227ed1fe818a0f Mon Sep 17 00:00:00 2001 From: Nicholas Roscino Date: Wed, 18 Mar 2026 16:57:17 +0100 Subject: [PATCH 2/2] fix: removing default to false for categoryExtensions to fix tests --- src/bin/chrome-devtools-mcp-cli-options.ts | 1 - src/index.ts | 2 +- tests/cli.test.ts | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/bin/chrome-devtools-mcp-cli-options.ts b/src/bin/chrome-devtools-mcp-cli-options.ts index c324168f2..b4792629c 100644 --- a/src/bin/chrome-devtools-mcp-cli-options.ts +++ b/src/bin/chrome-devtools-mcp-cli-options.ts @@ -211,7 +211,6 @@ export const cliOptions = { }, categoryExtensions: { type: 'boolean', - default: false, hidden: true, conflicts: ['browserUrl', 'autoConnect', 'wsEndpoint'], describe: diff --git a/src/index.ts b/src/index.ts index 1e731521c..7dabf6766 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 4bea6b954..b18a4532f 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,