cdp-share adds --no-focus to stop browser MCP servers stealing Chrome window focus

Status_Ad8999 · reddit · 2026-11-26

When wiring a browser MCP server to your signed-in Chrome profile via chrome://inspect remote debugging, Chrome jumps to the front every time the agent opens a tab or calls bringToFront.

cdp-share v0.2.0 merged PR #1 adding --no-focus (or CDPSHARENOFOCUS=1), which handles three CDP calls in one place: adds background: true to Target.createTarget unless newWindow: true is set, and locally replies {} to Target.activateTarget and Page.bringToFront.

A detail worth keeping if you build your own proxy: run URL filtering (--exclude-url) before the no-focus shortcut so hidden tabs still fail closed with -32602. Trade-off: manual login/CAPTCHA tabs stay in the background until you switch to Chrome yourself.

Original post →

More from coding & agent

coding & agent channel →