devto 2026-09-07 원문 보기 ↗
Ask an agent to check something on a website and most tools spin up a clean browser with zero cookies. Playwright and friends drive a browser they launched, with a profile of their own. MCP browser bridges need an MCP-capable client and a configured server. Either way you start every session logged out.
chrome-bridge takes the other road: it drives the Chrome you are already logged into. A tiny unpacked extension talks over WebSocket to a local zero-dependency Node server, and any agent that can run a shell command can drive the browser:
node cli.mjs snap localhost:8082 # compact a11y snapshot with element refs
node cli.mjs click localhost:8082 @e4 # click by ref
node cli.mjs fill localhost:8082 @e2 "hello@example.com"
A snap is the whole page as a compact text tree with refs you act on, roughly 10x cheaper on tokens than a screenshot:
table "Hacker News new | past | comments | ask | show | jobs | submit" @e1
link "Hacker News" @e5
link "new" @e6
link "submit" @e12
link "login" @e13
A few things that make it pleasant to live with:
--diff instead of re-reading the whole pageSetup is one paste into your agent plus one click to load the extension (Chrome requires that click). MIT licensed, zero dependencies, Node >= 18.
Repo and full agent manual: https://github.com/siropkin/chrome-bridge
Feedback welcome, especially on token cost of the snapshots against real workloads.