mcp: attach to a remote browser over CDP#93
Open
suchintan wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-keyheader) purely as an example. Tests exercise a live remote (a second local browser over--remote-debugging-port) and a dead-endpoint failure — 9 passing.