Skip to content

mcp: attach to a remote browser over CDP#93

Open
suchintan wants to merge 1 commit into
mainfrom
feat/mcp-cdp-endpoint
Open

mcp: attach to a remote browser over CDP#93
suchintan wants to merge 1 commit into
mainfrom
feat/mcp-cdp-endpoint

Conversation

@suchintan

Copy link
Copy Markdown
Member

Fast-follow to the MCP server (#84): a vendor-neutral option to drive a remote browser over CDP instead of launching a local Chromium.

  • RUSTWRIGHT_MCP_CDP_ENDPOINT — attach to this CDP endpoint (remote mode). Local launch options (headless/channel/executable) are ignored.
  • RUSTWRIGHT_MCP_CDP_HEADERS — optional JSON object of connect headers (e.g. an auth header); never printed or logged.
  • RUSTWRIGHT_MCP_CDP_TIMEOUT_MS — connect timeout (default 60000).

Fails loudly on a dead/unreachable remote — it never silently falls back to a local browser — and teardown detaches without terminating the remotely-owned browser.

Vendor-neutral: no SDK dependency. Docs use a hosted provider (Skyvern Browser Sessions, which exposes a CDP address + x-api-key header) purely as an example. Tests exercise a live remote (a second local browser over --remote-debugging-port) and a dead-endpoint failure — 9 passing.

Add RUSTWRIGHT_MCP_CDP_ENDPOINT / _CDP_HEADERS / _CDP_TIMEOUT_MS so the
server can attach to an externally-owned browser over CDP instead of
launching a local Chromium. In remote mode the local launch options are
ignored, teardown detaches without terminating the remote browser, and a
dead or unreachable remote fails loudly — it never silently falls back to a
local browser. Endpoint and headers are never printed or logged. Docs cover
the vendor-neutral usage with a hosted provider (x-api-key header) as an
example; tests exercise a live remote (a second local browser) and a
dead-endpoint failure.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant