tabtether
README.md
# tabtether
Let any MCP agent use your real Chrome: Codex CLI, Gemini CLI, Cursor, VS Code, Claude Code, or your own.
tabtether is a Chrome extension plus a small MCP server. The agent works in tabs you allow, in the browser you already use and are signed in to. It does not launch a separate headless browser with an empty profile.
```
agent ──MCP (stdio)──> tabtether server ──WebSocket 127.0.0.1──> extension ──> your tabs
```
## Why another browser MCP
- **Your session, your tabs.** The agent sees what you see, logged in. It can only touch tabs it opened or tabs you share from the popup. Those tabs sit in a cyan "agent" tab group.
- **Cheap, exact page reads.** `browser_snapshot` returns a compact outline of headings, text and interactive elements with refs (`[e12] button "Save"`). A Hacker News front page is about 3k tokens. Screenshots are there when layout matters.
- **Real input.** Clicks and keys go through the DevTools protocol, so the page receives trusted events. That matters for React apps and sites that ignore synthetic clicks.
- **Safety first:**
- The agent cannot type into password fields.
- Running JavaScript is off unless you allow it.
- You can block sites (subdomains included).
- A pause switch refuses every action.
- Pressing **Cancel** on Chrome's "is debugging this browser" bar pauses the agent.
- Page content goes back to the agent marked as untrusted.
## Setup
**1. Load the extension.** Until the Chrome Web Store listing is up: clone this repo, open `chrome://extensions`, turn on Developer mode, click **Load unpacked**, and pick the `extension/` folder.
**2. Add the server to your agent.** All of these run the same command.
Claude Code:
```sh
claude mcp add tabtether -- npx -y tabtether
```
Codex CLI (`~/.codex/config.toml`):
```toml
[mcp_servers.tabtether]
command = "npx"
args = ["-y", "tabtether"]
```
Gemini CLI (`~/.gemini/settings.json`), Cursor (`~/.cursor/mcp.json`), Claude Desktop and most other clients:
```json
{
"mcpServers": {
"tabtether": { "command": "npx", "args": ["-y", "tabtether"] }
}
}
```
VS Code (`.vscode/mcp.json`):
```json
{
"servers": {
"tabtether": { "type": "stdio", "command": "npx", "args": ["-y", "tabtether"] }
}
}
```
**3. Pair them once.** Run `npx tabtether token`, open the tabtether popup in Chrome, and paste the token. The badge turns green (**ON**) whenever an agent session is running.
Then ask your agent something like *"open my GitHub notifications and summarize what needs a reply"*.
## Tools
| Tool | What it does |
|---|---|
| `browser_open` | Open a URL in a new agent tab |
| `browser_tabs` | List the tabs the agent may use |
| `browser_navigate` | Load a URL, or go back, forward or reload |
| `browser_snapshot` | Page outline with element refs (`interactive` or `full` mode) |
| `browser_click` | Click an element by ref (left, right, middle, double) |
| `browser_type` | Type into a field by ref; optionally clear first and press Enter |
| `browser_press_key` | Keys and combinations: `Enter`, `Escape`, `Control+a`, `Shift+Tab` |
| `browser_scroll` | Scroll the page or an inner scroll area, or bring a ref into view |
| `browser_screenshot` | PNG of the viewport, or JPEG of the full page |
| `browser_get_text` | Visible text of the page |
| `browser_wait_for` | Wait for text to appear or disappear, or for a few seconds |
| `browser_evaluate` | Run JavaScript in the page (off until you allow it in the popup) |
| `browser_close` | Close an agent tab |
## Security model
- The server listens on `127.0.0.1` only and accepts connections only from `chrome-extension://` origins that present the pairing token. A web page that opens `ws://127.0.0.1:47821` gets nowhere.
- The token lives in `~/.tabtether/token`. Delete the file to rotate it.
- The extension never acts on a tab outside the agent's set. You can see that set in the tab group and in the popup.
- The page script runs in the extension's isolated world, so page scripts cannot see or tamper with it.
- Prompt injection is still the main risk of letting an agent read the web while you are signed in. Block sensitive sites (mail, banking) in the popup, and keep the agent's tabs to the task.
## Limitations
- One agent session at a time per port. If a second session starts, its tools report the port as busy. Run it with `--port` and change the port in the popup.
- Iframes are listed but not inspected.
- Chrome shows its "is debugging this browser" bar while the agent clicks or types. That bar is the visible indicator, and its Cancel button pauses the agent.
- Tested on Chrome. Edge and Brave are Chromium and should work, but are untested.
## Development
```sh
npm install
npx playwright-core install chromium # browser for the end-to-end test
npm test # builds, then drives a real Chromium with the extension
node test/real-sites.mjs https://news.ycombinator.com/ # snapshot sizes on real sites
```
To use a local build in an agent, point the config at `node /path/to/tabtether/dist/index.js` in place of `npx -y tabtether`.
## Roadmap
- Several agent sessions sharing one browser connection
- Ask the user before sensitive actions (submit payment, send message)
- Same-origin iframe snapshots
- File uploads and downloads
- Chrome Web Store and Firefox builds
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues