Summary
Add an alternative server.js mode that connects to a running Chrome via Chrome DevTools Protocol (CDP) instead of requiring the native messaging extension.
Motivation
- Users are already logged into Chrome — no re-auth needed
- Lower friction: no extension install, just launch Chrome with a flag
- Useful on managed devices where extensions can't be installed
How it works
Launch Chrome with:
chrome.exe --remote-debugging-port=9222 --user-data-dir="%USERPROFILE%\ChromeProfile"
Then server.js connects via CDP (raw chrome-remote-interface or Playwright's connectOverCDP).
Implementation
- Add
--mode cdp flag to server.js
- Auto-discover endpoint via
http://localhost:9222/json/version
- Implement same tool surface (navigate, snapshot, click, etc.) via CDP calls
- Keep extension mode as default; CDP is opt-in
Notes
- Chrome M144+: must use
--remote-debugging-port startup flag (not chrome://inspect)
- Same accessibility tree snapshot approach — no token cost regression
Summary
Add an alternative server.js mode that connects to a running Chrome via Chrome DevTools Protocol (CDP) instead of requiring the native messaging extension.
Motivation
How it works
Launch Chrome with:
Then server.js connects via CDP (raw
chrome-remote-interfaceor Playwright'sconnectOverCDP).Implementation
--mode cdpflag to server.jshttp://localhost:9222/json/versionNotes
--remote-debugging-portstartup flag (not chrome://inspect)