From dab3c49f11c7f6bb9a7834e156ef1b368e568982 Mon Sep 17 00:00:00 2001 From: Sebastian Benz Date: Mon, 8 Dec 2025 19:59:52 +0100 Subject: [PATCH] docs: improve autoConnect docs Mention chrome://inspect/#remote-debugging in CLI docs and error message. --- README.md | 2 +- src/browser.ts | 2 +- src/cli.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 637176e0f..f0d0d5805 100644 --- a/README.md +++ b/README.md @@ -351,7 +351,7 @@ The Chrome DevTools MCP server supports the following configuration option: - **`--autoConnect`** - If specified, automatically connects to a browser (Chrome 145+) running in the user data directory identified by the channel param. + If specified, automatically connects to a browser (Chrome 145+) running in the user data directory identified by the channel param. Requires remote debugging being enabled in Chrome here: chrome://inspect/#remote-debugging. - **Type:** boolean - **Default:** `false` diff --git a/src/browser.ts b/src/browser.ts index 63221a3f7..181ffe910 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -134,7 +134,7 @@ export async function ensureBrowserConnected(options: { browser = await puppeteer.connect(connectOptions); } catch (err) { throw new Error( - 'Could not connect to Chrome. Check if Chrome is running and remote debugging is enabled.', + 'Could not connect to Chrome. Check if Chrome is running and remote debugging is enabled by going to chrome://inspect/#remote-debugging.', { cause: err, }, diff --git a/src/cli.ts b/src/cli.ts index 3e25f8d6c..db2680587 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -11,7 +11,7 @@ export const cliOptions = { autoConnect: { type: 'boolean', description: - 'If specified, automatically connects to a browser (Chrome 145+) running in the user data directory identified by the channel param.', + 'If specified, automatically connects to a browser (Chrome 145+) running in the user data directory identified by the channel param. Requires remote debugging being enabled in Chrome here: chrome://inspect/#remote-debugging.', conflicts: ['isolated', 'executablePath'], default: false, coerce: (value: boolean | undefined) => {