From 9b1dd9e5738d547a97fa66d4b0741f6d6ead46e1 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 25 Apr 2026 05:54:54 -0700 Subject: [PATCH] docs(browser): document Chrome MCP per-profile mcpCommand/mcpArgs and cdpUrl mapping Vincent's commit ab1d1a5c9e (#71560) added user-facing config keys to existing-session profiles for the Chrome DevTools MCP launch path: - browser.profiles..mcpCommand - browser.profiles..mcpArgs Plus runtime behavior changes: - cdpUrl http(s) -> --browserUrl, cdpUrl ws(s) -> --wsEndpoint - endpoint flags and userDataDir are mutually exclusive The CHANGELOG entry covered the change, but docs/tools/browser.md existing-session reference did not. Add a 'Custom Chrome MCP launch' subsection describing the new fields and the cdpUrl endpoint mapping rules. --- docs/tools/browser.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/tools/browser.md b/docs/tools/browser.md index e094b246bc8..cb4471e1c46 100644 --- a/docs/tools/browser.md +++ b/docs/tools/browser.md @@ -547,6 +547,28 @@ Notes: browser node. If Chrome lives elsewhere and no browser node is connected, use remote CDP or a node host instead. +### Custom Chrome MCP launch + +Override the spawned Chrome DevTools MCP server per profile when the default +`npx chrome-devtools-mcp@latest` flow is not what you want (offline hosts, +pinned versions, vendored binaries): + +| Field | What it does | +| ------------ | -------------------------------------------------------------------------------------------------------------------------- | +| `mcpCommand` | Executable to spawn instead of `npx`. Resolved as-is; absolute paths are honored. | +| `mcpArgs` | Argument array passed verbatim to `mcpCommand`. Replaces the default `chrome-devtools-mcp@latest --autoConnect` arguments. | + +When `cdpUrl` is set on an existing-session profile, OpenClaw skips +`--autoConnect` and forwards the endpoint to Chrome MCP automatically: + +- `http(s)://...` → `--browserUrl ` (DevTools HTTP discovery endpoint). +- `ws(s)://...` → `--wsEndpoint ` (direct CDP WebSocket). + +Endpoint flags and `userDataDir` cannot be combined: when `cdpUrl` is set, +`userDataDir` is ignored for Chrome MCP launch, since Chrome MCP attaches to +the running browser behind the endpoint rather than opening a profile +directory. + Compared to the managed `openclaw` profile, existing-session drivers are more constrained: