List, group, deduplicate, and bulk-close browser tabs with natural language — from any MCP client.
A Chrome extension acts as a thin proxy for chrome.tabs. A Node.js MCP host handles all the logic (filtering, grouping, dedup) and talks to your AI client over stdio. Everything runs locally on loopback.
Works with any Chromium browser:
Firefox and Safari are planned.
- Node.js v18+
- Local port
9876available
Pick your client below. They all run the same server — just different config locations.
Claude Code
claude mcp add 2manytabs-mcp -- npx -y 2manytabs-mcp-hostClaude Desktop
Add to your config file:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/claude/claude_desktop_config.json |
{
"mcpServers": {
"2manytabs-mcp": {
"command": "npx",
"args": ["-y", "2manytabs-mcp-host"]
}
}
}Restart Claude Desktop after saving.
VS Code / GitHub Copilot Chat
Create .vscode/mcp.json in your workspace (or add to your user settings.json under "mcp"):
{
"mcpServers": {
"2manytabs-mcp": {
"command": "npx",
"args": ["-y", "2manytabs-mcp-host"]
}
}
}See the VS Code MCP docs for details.
Cursor
Open Settings → MCP and add a new server, or create/edit .cursor/mcp.json:
{
"mcpServers": {
"2manytabs-mcp": {
"command": "npx",
"args": ["-y", "2manytabs-mcp-host"]
}
}
}Windsurf
Open Settings → Cascade → MCP, or create/edit mcp_config.json:
{
"mcpServers": {
"2manytabs-mcp": {
"command": "npx",
"args": ["-y", "2manytabs-mcp-host"]
}
}
}See the Windsurf MCP guide for details.
Continue
Add to .continue/config.json (or create .continue/mcpServers/2manytabs-mcp.json):
{
"mcpServers": {
"2manytabs-mcp": {
"command": "npx",
"args": ["-y", "2manytabs-mcp-host"]
}
}
}See the Continue MCP docs for details.
Cline
Open the MCP Servers panel in Cline and add a new server:
- Command:
npx - Args:
-y 2manytabs-mcp-host
Or edit the Cline MCP config JSON directly with the same block used above. See the Cline MCP docs for details.
Hermes Agent
hermes mcp add 2manytabs-mcp --command "npx -y 2manytabs-mcp-host"Restart your session (/reset or start a new hermes invocation), then verify:
hermes mcp list
hermes mcp test 2manytabs-mcpConfig lives at ~/.hermes/config.yaml under the mcp section.
These clients support MCP but we haven't tested them directly. The same JSON config block should work — just drop it into the client's MCP config file:
| Client | Notes |
|---|---|
| LibreChat | MCP agent/tool server support documented |
| ChatGPT | MCP connectors exist; local stdio flow unverified |
| Sourcegraph Cody | MCP via OpenCTX; setup syntax unverified |
| Genkit | genkitx-mcp plugin can consume MCP servers |
| Zed | Tool support is experimental — prompts/resources only in some builds |
If your client speaks MCP over stdio, it will work. Point it at npx -y 2manytabs-mcp-host and you're set.
- Go to
chrome://extensions/(oredge://extensions/,brave://extensions/, etc.) - Enable Developer mode (toggle in the top-right)
- Click Load unpacked
- Select the
extension/directory from this repo (or the unzipped release) - Click the extension icon in the toolbar — the popup should show Connected once the host is running
Just talk to your AI client:
- "Show me all my open tabs."
- "Find and close duplicate tabs."
- "Close everything matching 'youtube'."
- "Do a dry run of closing all tabs from reddit.com."
- "Group my tabs by domain and show the breakdown."
The host exposes two tools:
Read-only. Returns a domain histogram with proportional bars and a per-domain listing with titles, pinned (📌), and audible (🔊) flags.
| Param | Type | Default | Description |
|---|---|---|---|
query |
string | — | Substring filter on title or URL |
group_by |
"domain" · "window" · "none" |
"domain" |
How to group results |
duplicates_only |
boolean | false |
Show only duplicate URLs |
Closes tabs. Exactly one selection mode required:
| Param | Type | Description |
|---|---|---|
tab_ids |
number[] | Close specific tab IDs |
match |
string | Close tabs matching this substring |
duplicates |
boolean | Close all duplicates (keeps first occurrence) |
dry_run |
boolean | Preview what would close without closing |
Opens new tabs in the browser.
| Param | Type | Description |
|---|---|---|
urls |
string[] | Array of URLs to open |
AI Client ◄──stdio──► MCP Host ──WebSocket :9876──► Browser Extension
│
▼
Follower Hosts
- The extension is a thin proxy —
queryandcloseonly. All logic lives in the host, so new capabilities ship without an extension update. - Multiple AI clients can share one browser. Hosts self-organize: one binds port 9876 (owner), the rest proxy through it (followers). On owner death, followers re-elect automatically.
- The extension reconnects via
chrome.alarmsevery 30s (MV3 idle behavior).
- Loopback only — the server binds to
127.0.0.1, not0.0.0.0. - Origin validation — only
chrome-extension://origins can connect. Web pages attempting loopback attacks get rejected with a4003close code. - No cloud, no daemon — everything stays on your machine.
PRs welcome. Browser support is the biggest gap right now:
For a local dev setup, clone the repo and run bash install.sh.
MIT — see LICENSE.