openclaw - ✅(Solved) Fix [Bug]: mcp fail to connect to chrome [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60903Fetched 2026-04-08 02:45:54
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×2cross-referenced ×1

I try to control chrome browser by mcp. However, it shows that

Restarted systemd service: openclaw-gateway.service
yates@yates-HLY-WX9XX:~$ openclaw browser status

🦞 OpenClaw 2026.4.2 (d74a122) — I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).

GatewayClientRequestError: Chrome MCP existing-session attach failed for profile "user". Make sure Google Chrome's default profile is running locally with remote debugging enabled. Details: McpError: MCP error -32000: Connection closed

Error Message

Restarted systemd service: openclaw-gateway.service yates@yates-HLY-WX9XX:~$ openclaw browser status

🦞 OpenClaw 2026.4.2 (d74a122) — I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).

GatewayClientRequestError: Chrome MCP existing-session attach failed for profile "user". Make sure Google Chrome's default profile is running locally with remote debugging enabled. Details: McpError: MCP error -32000: Connection closed

Root Cause

I try to control chrome browser by mcp. However, it shows that

Restarted systemd service: openclaw-gateway.service
yates@yates-HLY-WX9XX:~$ openclaw browser status

🦞 OpenClaw 2026.4.2 (d74a122) — I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).

GatewayClientRequestError: Chrome MCP existing-session attach failed for profile "user". Make sure Google Chrome's default profile is running locally with remote debugging enabled. Details: McpError: MCP error -32000: Connection closed

PR fix notes

PR #60960: fix for mcp connection issue (closes #60903)

Description (problem / solution / changelog)

Summary

  • Problem: Chrome MCP existing-session attach ignored configured cdpUrl and always used --autoConnect, causing connection failures to running Chrome instances.
  • Why it matters: Users with explicit CDP endpoints (e.g. http://127.0.0.1:9222) could not attach, breaking browser control via MCP.
  • What changed: Propagated cdpUrl from profile → session → CLI args and switched to --browserUrl when provided.
  • What did NOT change (scope boundary): No changes to MCP protocol, gateway routing, or browser interaction logic.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #60903
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: cdpUrl was defined in profile config but never propagated into Chrome MCP session creation, causing fallback to --autoConnect.
  • Missing detection / guardrail: No test verifying attach behavior with explicit cdpUrl.
  • Contributing context (if known): Recent MCP attach changes introduced structuredContent flags but did not update argument handling.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: chrome-mcp session creation / args construction
  • Scenario the test should lock in: Given profile with cdpUrl, MCP must launch with --browserUrl instead of --autoConnect.
  • Why this is the smallest reliable guardrail: Verifies argument construction without requiring full browser runtime.
  • Existing test that already covers this (if any): None
  • If no new test is added, why not: Focused fix; can be covered in follow-up

User-visible / Behavior Changes

  • MCP can now correctly attach to existing Chrome sessions when cdpUrl is configured.

Diagram (if applicable)

Before:
CLI -> MCP (--autoConnect) -> fails to attach

After:
CLI -> MCP (--browserUrl=http://127.0.0.1:9222) -> attaches -> works

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Ubuntu 22
  • Runtime/container: local
  • Model/provider: N/A
  • Integration/channel: browser MCP
  • Relevant config: profile with cdpUrl=http://127.0.0.1:9222

Steps

  1. Start Chrome with remote debugging
  2. Run openclaw browser status
  3. Attempt MCP attach

Expected

  • Successfully attaches and lists pages

Actual

  • Previously failed with connection closed / MCP attach error

Evidence

  • Trace/log snippets

Human Verification (required)

  • Verified scenarios:

    • MCP attaches using cdpUrl
    • Tabs can be listed
  • Edge cases checked:

    • No cdpUrl still uses --autoConnect
  • What you did not verify:

    • Remote (non-localhost) CDP endpoints

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: Incorrect cdpUrl could break attach

    • Mitigation: Falls back to existing behavior when undefined

Changed files

  • extensions/browser/src/browser/chrome-mcp.ts (modified, +29/-6)

Code Example

Restarted systemd service: openclaw-gateway.service
yates@yates-HLY-WX9XX:~$ openclaw browser status

🦞 OpenClaw 2026.4.2 (d74a122)I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).

GatewayClientRequestError: Chrome MCP existing-session attach failed for profile "user". Make sure Google Chrome's default profile is running locally with remote debugging enabled. Details: McpError: MCP error -32000: Connection closed

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

I try to control chrome browser by mcp. However, it shows that

Restarted systemd service: openclaw-gateway.service
yates@yates-HLY-WX9XX:~$ openclaw browser status

🦞 OpenClaw 2026.4.2 (d74a122) — I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).

GatewayClientRequestError: Chrome MCP existing-session attach failed for profile "user". Make sure Google Chrome's default profile is running locally with remote debugging enabled. Details: McpError: MCP error -32000: Connection closed

Steps to reproduce

  1. Update to OpenClaw 2026.4.2 (d74a122).
  2. Execute cmd "openclaw gateway restart"
  3. Execute cmd "openclaw browser status".

Expected behavior

In 3.24, openclaw can connect to chrome by mcp.

Actual behavior

After upgrading openclaw(2026.3.24), it fails to connect to browser by mcp.

chrome version 146.0.7680.177

OpenClaw version

2026.3.24

Operating system

ubuntu 22

Install method

pnpm dev

Model

minimax

Provider / routing chain

openclaw->minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Gateway: OpenClaw 2026.4.2 on Ubuntu 22 Node: OpenClaw 2026.3.24 on Ubuntu Desktop Chrome: 146.0.7680.177 (stable, not snap) Chrome remote debugging: Enabled via chrome://inspect/#remote-debugging Display: Wayland (Ubuntu desktop)

extent analysis

TL;DR

  • Ensure Google Chrome's default profile is running locally with remote debugging enabled and verify the OpenClaw version compatibility.

Guidance

  • Check the Chrome version and OpenClaw version for compatibility issues, as the error occurs after upgrading OpenClaw.
  • Verify that Chrome's remote debugging is enabled via chrome://inspect/#remote-debugging.
  • Confirm that the default Chrome profile is running locally, as the error message suggests this might be the issue.
  • Consider downgrading OpenClaw to version 2026.3.24, where the connection to Chrome by MCP was working as expected.

Example

No specific code example is provided, as the issue seems related to configuration and version compatibility rather than code.

Notes

  • The issue might be specific to the combination of OpenClaw version 2026.4.2 and Chrome version 146.0.7680.177.
  • The use of Wayland display on Ubuntu desktop could potentially affect the behavior, but this is less likely to be the primary cause.

Recommendation

  • Apply workaround: Ensure Chrome's default profile is running and remote debugging is enabled, and consider using OpenClaw version 2026.3.24 temporarily until compatibility issues are resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

In 3.24, openclaw can connect to chrome by mcp.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING