AI disclosure: Tabrelay was built with a lot of help from Claude Code, and I drafted this post with it too. I decide what goes in, review it, and use the tool every day myself.
I wanted an AI agent (and my own scripts) to use the Chrome I already use: my profile, my cookies, my logins, my 2FA. Not a second browser that I have to log in to again, and not one that starts with "Chrome is being controlled by automated test software" and gets treated like a bot by some sites.
So I wrote Tabrelay: a small Chrome extension plus one Python file. The command sends jobs (open a page, run JavaScript, click, type, upload a file, take a screenshot) to the extension over 127.0.0.1, and the extension runs them with the Chrome DevTools Protocol in your real browser.
tabrelay (Python) --127.0.0.1:47833--> Tabrelay extension (Chrome) --CDP--> the page
tabrelay ping
TAB=$(tabrelay open https://example.com/) # background window, prints the tab id
tabrelay eval "$TAB" 'document.title'
tabrelay shot "$TAB" /tmp/example.png
tabrelay close "$TAB"
What it does differently
- Your real browser. Nothing to log in to twice, no copied cookies.
- Doesn't steal your screen. Jobs run in background windows; pages are told they have focus, so uploads and lazy-loading pages keep working while you type in another app.
- Fenced in. The extension only touches sites on an allow-list that you edit on the extension's own options page (not in a config file an agent could edit), and it only obeys jobs that carry a local token.
- Small. Python standard library only, no npm, no build step, about 1,100 lines without the site scripts.
- A CLI, not an MCP server. Any agent that can run a shell command can use it, Claude Code included.
Why not Playwright or Puppeteer?
For tests and servers, use them; they are the right tool. They drive a separate browser, or one you started with a debugging port. For your own day-to-day accounts that means logging in again, 2FA and "new device" checks, and a debugging port on your everyday browser that every local program can talk to. Tabrelay trades features for being inside the browser you already have. It has no auto-waiting locators, it is Chrome/Chromium only, and a page can tell that a debugger is attached.
The honest catch
It is a week old. You load it as an unpacked extension (it is not on the Chrome Web Store), Chrome shows its "started debugging this browser" bar while it works, and it is only for automating your own browser and your own accounts. I have used the same approach for months to post to sites that have no API, and this is that tool cleaned up and made general.
- Code (MIT): https://github.com/aaronsuns/tabrelay
- Guides and comparisons: https://tabrelay.zexa.se
- Let an AI agent use your logged-in browser safely
- Tabrelay vs Playwright MCP, browser-use and Claude in Chrome
If something is missing or confusing, tell me in the comments or an issue.
Top comments (0)