CODING AGENT WORKFLOW · PRACTICAL GUIDE

Connect to a Selected Local Chrome Tab

Attach to a deliberately selected tab in a dedicated Chrome debugging profile through loopback CDP, without choosing a tab automatically.

THE PROBLEM

Browser agents often need to continue from a page a developer already opened. Attaching to a normal Chrome profile can expose signed-in state, and choosing the first tab without review can target the wrong page.

HOW THIS TOOL WORKS

Start a dedicated Chrome profile with the loopback remote-debugging port. Call browser_connect without pageIndex to list tabs, review their titles and sanitized URLs, then call it again with the index you chose. The first call disconnects after listing and does not attach. The endpoint must resolve to loopback; remote page context remains blocked from remote providers unless the user explicitly opts in.

TRY IT

browser_connect({ endpoint: "http://127.0.0.1:9222" })
browser_connect({ endpoint: "http://127.0.0.1:9222", pageIndex: 1 })

LIMITS

Chrome 136 and newer require a non-default user-data directory for remote debugging. CDP can control the browser, so keep the port bound to loopback, use a separate profile, and close that debugging instance when finished. URL credentials, query, hash, local file paths, cookies, and form values are redacted or excluded; remaining page URL, title, headings, bounded text, and action labels can be sent to the configured decision provider.