Let your coding agent read your real, logged-in Chrome: MV3 extension + native host + MCP server (read_active_tab, open_and_read_url). Zero dependencies, MIT.
Browser Buddy
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Let your coding agent read pages through YOUR real, logged-in browser.**
Claude Code's WebFetch gets 403'd on most sites. Ask it to pull up a doc, check a Reddit thread, or look at a GitHub issue, and it comes back with a 403 — because server-side fetchers don't have your cookies, your logins, or your sessions.
Browser Buddy is a small local MCP bridge: a Chrome extension (Manifest V3) talks to a Python native-messaging host, which exposes two MCP tools. Your agent reads pages exactly as you see them — logged in, past bot checks — and the page never leaves your machine except into the agent's context.
Stdlib only. No dependencies, no cloud, no API keys.
Tools
| Tool | What it does |
|---|---|
| read_active_tab | Extract readable text (URL, title, cleaned body) from your active Chrome tab |
| open_and_read_url | Open a URL in a **background** tab with your real profile (cookies/logins), extract its text, close the tab |
Architecture
- **Extension** (extension/): MV3 service worker. Holds a persistent chrome.runtime.connectNative port to the host (auto-reconnects). Executes read_active_tab / open_and_read_url against your real tabs and posts extracted text back.
- **Host** (host/browser_buddy_host.py): launched by Chrome. Bridges the extension (length-prefixed stdio) and the MCP server (Unix socket at $TMPDIR/browser-buddy/browser-buddy.sock). Correlates requests by id, with a 90 s timeout.
- **MCP server** (pypi/browser_buddy_mcp.py): hand-rolled JSON-RPC 2.0 over stdio (no mcp package). Forwards tool calls to the host; returns page text as MCP content.
Installation
1. Load the extension
1. Open chrome://extensions, enable **Developer mode**.
2. **Load unpacked** → select the extension/ folder.
3. Copy the extension ID shown under "Browser Buddy".
2. Register the native host
This writes com.browserbuddy.host.json into Chrome's NativeMessagingHosts
directory (Linux/macOS) pointing at browser_buddy_host.py. Restart Chrome,
then open the extension's service worker console — you should see
[browser-buddy] native host connected.
3. Add the MCP server to Claude Code
Or in ~/.claude.json / project .mcp.json:
Requires Python 3.9+. No pip install needed — or install the published
package: pip install browser-buddy-mcp (built from pypi/; the browser-buddy-mcp
command is the entry point).
Demo
1. Log in to a site WebFetch can't reach in your normal Chrome (e.g. a private GitHub issue, a login-walled doc).
2. In Claude Code: *"Use browser-buddy to read my active tab."*
3. Or: *"Use browser-buddy's open_and_read_url to read ."* — a background tab opens, the text is extracted, the tab closes itself.
Why not just use a scraping API? (Firecrawl et al.)
Vendor scrapers (Firecrawl, etc.) fetch pages **server-side**: they never have
your cookies, can't get past SSO/2FA/login walls, can't see what *you* see
behind an account, and they charge per page. The official Claude in Chrome goes
the other way — full autonomous browser control — but ships a permission dialog