Skip to content

Conversation

@daohoangson
Copy link
Contributor

Summary

Add support for connecting to Chrome via WebSocket endpoint with custom headers, enabling authenticated remote debugging scenarios and providing an alternative to the HTTP-based connection method.

What's New

This PR introduces two new CLI arguments:

  • --wsEndpoint / -w: Connect directly to Chrome using a WebSocket URL

    • Example: ws://127.0.0.1:9222/devtools/browser/<id>
    • Alternative to --browserUrl (mutually exclusive)
  • --wsHeaders: Pass custom headers for WebSocket connections (JSON format)

    • Example: '{"Authorization":"Bearer token"}'
    • Only works with --wsEndpoint

Use Cases

  • Authenticated remote debugging: Use API keys, tokens, or custom auth headers
  • Secured instances: Connect to browser instances requiring authentication

@daohoangson daohoangson force-pushed the feat/ws-endpoint-headers branch from 17499ba to 69015b7 Compare October 16, 2025 23:44
Add support for connecting to Chrome via WebSocket endpoint with custom headers, enabling authenticated remote debugging scenarios and providing an alternative to the HTTP-based connection method.

This commit introduces two new CLI arguments:

- **`--wsEndpoint` / `-w`**: Connect directly to Chrome using a WebSocket URL
  - Example: `ws://127.0.0.1:9222/devtools/browser/<id>`
  - Alternative to `--browserUrl` (mutually exclusive)

- **`--wsHeaders`**: Pass custom headers for WebSocket connections (JSON format)
  - Example: `'{"Authorization":"Bearer token"}'`
  - Only works with `--wsEndpoint`
@OrKoN OrKoN force-pushed the feat/ws-endpoint-headers branch from 69015b7 to 7a956ab Compare October 17, 2025 07:00
Copy link
Collaborator

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@OrKoN OrKoN merged commit 41d6a10 into ChromeDevTools:main Oct 17, 2025
17 checks passed
@daohoangson daohoangson deleted the feat/ws-endpoint-headers branch October 17, 2025 09:29
OrKoN pushed a commit that referenced this pull request Oct 22, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.9.0](chrome-devtools-mcp-v0.8.1...chrome-devtools-mcp-v0.9.0)
(2025-10-22)


### 🎉 Features

* add claude marketplace and plugin json
([#396](#396))
([0498611](0498611))
* add filters and pagination to the console messages tool
([#387](#387))
([15d942c](15d942c))
* add WebSocket endpoint and custom headers support
([#404](#404))
([41d6a10](41d6a10))
* allow configuring tool categories
([#454](#454))
([0fe2b8a](0fe2b8a))
* expose previous navigations to the MCP
([#419](#419))
([165cf9c](165cf9c))
* support previous navigation for Console messages
([#452](#452))
([6f24362](6f24362))
* support stable id for network requests
([#375](#375))
([f4d7b49](f4d7b49))
* support verbose snapshots
([#388](#388))
([d47aaa9](d47aaa9))
* tool to get a verbose single console message
([#435](#435))
([9205593](9205593))
* use stable id for network request querying
([#382](#382))
([579819b](579819b))


### 🛠️ Fixes

* allow evaluating in Frames
([#443](#443))
([053f1f8](053f1f8))
* better wording for evaluate_script
([#392](#392))
([2313fda](2313fda))
* indicate when request and response bodies are not available
([#446](#446))
([7d47d6b](7d47d6b))
* pageerror for non-error types
([#442](#442))
([b6b42ec](b6b42ec))
* retrieve data correctly with fewer than 3 navigations
([#451](#451))
([4c65f59](4c65f59))


### 📄 Documentation

* add instructions for Qoder
([#386](#386))
([d8df784](d8df784))
* add VM-to-host remote debugging workaround
([#399](#399))
([9f9dab0](9f9dab0))
* Update Copilot CLI instructions
([#423](#423))
([c7733a8](c7733a8))


### ♻️ Chores

* bundle all dependencies together
([#450](#450))
([914b980](914b980))
* bundle modelcontextprotocol-sdk
([#409](#409))
([6c8432b](6c8432b))
* bundle puppeteer-core
([#417](#417))
([b443033](b443033))
* bundle zod together with modelcontextprotocol/sdk
([#414](#414))
([800e7e8](800e7e8))
* cleanup data fetching
([#441](#441))
([5c871c3](5c871c3))
* dispose listeners on page destroyed
([#318](#318))
([76d5e94](76d5e94))
* extract common paginate type
([#415](#415))
([29fd602](29fd602))
* store the last 3 navigations in PageCollector
([#411](#411))
([b873822](b873822))
* use different format for reqid
([#380](#380))
([78bf66a](78bf66a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

2 participants