Skip to content

[Feature Request] Connect to existing browser instance by HTTP URL #1319

Description

Chrome DevTools Protocol endpoint URLs change every time such a browser is opened, making --cdp-endpoint an inviable argument for repeated testing, especially since both the user and the LLM could close the browser accidentally. The process for using a remote-debugging-enabled Chrome instance with the Playwright MCP server currently looks like this:

  1. Open a terminal and execute cd "C:\Program Files\Google\Chrome\Application".
  2. Execute .\chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\ChromeRemoteDebuggingUserData".
  3. In Chrome, navigate to http://localhost:9222/json/version and copy the value of webSocketDebuggerUrl.
  4. Configure a "playwright" MCP server with command npx @playwright/mcp@latest --cdp-endpoint=<webSocketDebuggerUrl>. The need to update this every time the Chrome browser is launched is the bottleneck that makes continued testing an issue.

The Chrome DevTools MCP server offers a --browser-url argument that accepts the value http://localhost:9222/, which allows it to connect to the browser instance without fail, even if it has been closed and re-opened. I propose that a similar argument be added to the Playwright MCP server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions