2manytabs-mcp-host 2.1.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jamubc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,193 @@
1
+ <div align="center">
2
+ <a href="https://github.com/jamubc/2ManyTabs-MCP">
3
+ <img alt="2ManyTabs MCP" width="240" src="docs/logo.png">
4
+ </a>
5
+ </div>
6
+
7
+ # 2ManyTabs MCP ![Chrome](https://img.shields.io/badge/Chrome-4285F4?logo=googlechrome&logoColor=white) ![Firefox](https://img.shields.io/badge/Firefox-FF7139?logo=firefoxbrowser&logoColor=white) ![LibreWolf](https://img.shields.io/badge/LibreWolf-00ACFF?logo=librewolf&logoColor=white) ![Brave](https://img.shields.io/badge/Brave-FB542B?logo=brave&logoColor=white) ![Edge](https://img.shields.io/badge/Edge-0078D7) ![Opera](https://img.shields.io/badge/Opera-FF1B2D?logo=opera&logoColor=white)
8
+
9
+ An MCP server and browser extension that let your AI agent tame your overflowing tabs: find them, group them, clean them up, and run scripts in them for you.
10
+
11
+ Once it's installed, tell your AI **"I have too many tabs open, help me clean up."** It saves a list of everything you have open, shows your tabs a few groups at a time, and closes only what you say yes to. The handful of tabs that are really things to do (buy this, reply to that) get a next step and a "when" in your own words, kept somewhere you look, before their tabs close. [How the clean-up works](#cleaning-up-lots-of-tabs).
12
+
13
+ ## Install
14
+
15
+ ### 1. Add the MCP server
16
+
17
+ One command, with Node.js 18 or newer installed. In Claude Code:
18
+
19
+ ```shell
20
+ claude mcp add 2manytabs-mcp -- npx -y 2manytabs-mcp-host
21
+ ```
22
+
23
+ Using another client? Open yours:
24
+
25
+ <details>
26
+ <summary><picture><img alt="Antigravity CLI" src="https://img.shields.io/badge/Antigravity%20CLI-4285F4?logo=google&logoColor=white" height="22"></picture></summary>
27
+
28
+ ```shell
29
+ agy mcp add 2manytabs-mcp npx -y 2manytabs-mcp-host
30
+ ```
31
+ </details>
32
+
33
+ <details>
34
+ <summary><picture><img alt="Codex" src="https://img.shields.io/badge/Codex-10A37F" height="22"></picture></summary>
35
+
36
+ ```shell
37
+ codex mcp add 2manytabs-mcp -- npx -y 2manytabs-mcp-host
38
+ ```
39
+ </details>
40
+
41
+ <details>
42
+ <summary><picture><img alt="VS Code" src="https://img.shields.io/badge/VS%20Code-007ACC" height="22"></picture> <picture><img alt="GitHub Copilot" src="https://img.shields.io/badge/GitHub%20Copilot-000000?logo=githubcopilot&logoColor=white" height="22"></picture></summary>
43
+
44
+ ```shell
45
+ code --add-mcp '{"name":"2manytabs-mcp","command":"npx","args":["-y","2manytabs-mcp-host"]}'
46
+ ```
47
+
48
+ This adds it to your user profile.
49
+ </details>
50
+
51
+ <details>
52
+ <summary><picture><img alt="Hermes Agent" src="https://img.shields.io/badge/Hermes%20Agent-6B4FBB" height="22"></picture></summary>
53
+
54
+ ```shell
55
+ hermes mcp add 2manytabs-mcp --command npx --args -y 2manytabs-mcp-host
56
+ ```
57
+ </details>
58
+
59
+ <details>
60
+ <summary><picture><img alt="OpenClaw" src="https://img.shields.io/badge/OpenClaw-E5484D" height="22"></picture></summary>
61
+
62
+ Open **Settings → MCP**, choose **Add server**, pick **Stdio**, and enter the command `npx` with the arguments `-y 2manytabs-mcp-host`.
63
+ </details>
64
+
65
+ <details>
66
+ <summary><picture><img alt="Claude Desktop" src="https://img.shields.io/badge/Claude%20Desktop-D97757?logo=claude&logoColor=white" height="22"></picture> <picture><img alt="Cursor" src="https://img.shields.io/badge/Cursor-000000?logo=cursor&logoColor=white" height="22"></picture> <picture><img alt="Windsurf" src="https://img.shields.io/badge/Windsurf-0B100F?logo=windsurf&logoColor=white" height="22"></picture> <picture><img alt="Cline" src="https://img.shields.io/badge/Cline-5A3FC0?logo=cline&logoColor=white" height="22"></picture> <picture><img alt="Continue" src="https://img.shields.io/badge/Continue-1F2937" height="22"></picture> <picture><img alt="Gemini CLI" src="https://img.shields.io/badge/Gemini%20CLI-8E75B2?logo=googlegemini&logoColor=white" height="22"></picture></summary>
67
+
68
+ Add this to the client's MCP config file, then restart the client:
69
+
70
+ ```json
71
+ {
72
+ "mcpServers": {
73
+ "2manytabs-mcp": {
74
+ "command": "npx",
75
+ "args": ["-y", "2manytabs-mcp-host"]
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ | Client | Config file |
82
+ |---|---|
83
+ | Claude Desktop | macOS `~/Library/Application Support/Claude/claude_desktop_config.json`, Windows `%APPDATA%\Claude\claude_desktop_config.json`, Linux `~/.config/claude/claude_desktop_config.json` |
84
+ | Cursor | `~/.cursor/mcp.json`, or `.cursor/mcp.json` in a project |
85
+ | Windsurf | `mcp_config.json`, opened from **Settings → Cascade → MCP** |
86
+ | Cline | `cline_mcp_settings.json`, opened from the **MCP Servers** panel |
87
+ | Continue | `.continue/mcpServers/2manytabs-mcp.json` |
88
+ | Gemini CLI (enterprise) | `~/.gemini/settings.json`, or `.gemini/settings.json` in a project |
89
+ </details>
90
+
91
+ Any other client that runs MCP servers over stdio works with the command `npx -y 2manytabs-mcp-host`.
92
+
93
+ ### 2. Add the browser extension
94
+
95
+ The extension is not in a browser store yet. Download it from the [latest release](https://github.com/jamubc/2ManyTabs-MCP/releases/latest): the file ending in `-chrome.zip` for Chrome, Brave, Edge and Opera, or `-firefox.zip` for Firefox and LibreWolf.
96
+
97
+ - Chrome and other Chromium browsers: unzip it, open `chrome://extensions`, turn on Developer mode, choose Load unpacked, and select the unzipped folder.
98
+ - Firefox and LibreWolf: open `about:debugging#/runtime/this-firefox`, choose Load Temporary Add-on, and select the zip. Firefox removes temporary add-ons when it closes, so load it again each session.
99
+
100
+ Want it signed and in the official stores, with no more temporary loads? [Open an issue](https://github.com/jamubc/2ManyTabs-MCP/issues) to ask.
101
+
102
+ ## Tools
103
+
104
+ Tab ids look like `chrome:12` or `firefox:34`, and several browsers can be connected at once.
105
+
106
+ | Tool | Description |
107
+ |---|---|
108
+ | `start_tab_cleanup` | Returns the step-by-step clean-up method for the agent to follow; read-only |
109
+ | `cluster_tabs` | Summarises any number of tabs as clusters per site, with counts, flags, sample titles and the `match` string that closes each one; `cluster: "all"` gives every cluster's tab ids |
110
+ | `snapshot_tabs` | Saves a record of every open tab (title, link, window, group, pinned, last used) to a file on your computer |
111
+ | `reopen_tabs` | Reopens tabs from a saved record that are no longer open, with `match` and `dry_run` |
112
+ | `list_tabs` | Lists open tabs across browsers, grouped by domain or window, with `query`, `duplicates_only`, `browser` and `show_urls`; shows up to 1,000 tabs and says when there are more |
113
+ | `execute_script` | Runs JavaScript in a tab (Firefox only), in the `ISOLATED` or `MAIN` world, and returns the result |
114
+ | `get_tab_text` | Returns the body text of a loaded tab |
115
+ | `close_tabs` | Closes tabs by `tab_ids`, `match` or `duplicates`, with `dry_run` to preview. Leaves pinned tabs unless asked, and needs `expected_count` to close more than 10 |
116
+ | `open_tabs` | Opens the given `urls`, adding `https://` when no scheme is present |
117
+ | `activate_tab` | Brings a tab to the foreground and focuses its window |
118
+ | `update_tab` | Sets a tab's `url`, `pinned` or `muted` state |
119
+ | `list_tab_groups` | Lists native tab groups with `title_query` filter |
120
+ | `group_tabs` | Puts tabs into a new or existing tab group with `title` and `color`. Tabs stay in their own windows (one matching group per window) and you're left on the tab you were on |
121
+ | `ungroup_tabs` | Removes tabs from their groups |
122
+ | `update_tab_group` | Changes a group's `title`, `color` or `collapsed` state |
123
+
124
+ ## Usage
125
+
126
+ Ask your agent in plain words. Some things to try:
127
+
128
+ | Ask | What happens |
129
+ |---|---|
130
+ | "I have too many tabs open, help me clean up" | A guided clean-up: see [Cleaning up lots of tabs](#cleaning-up-lots-of-tabs) |
131
+ | "Close my YouTube tabs" | Saves a record, shows how many would close, and closes them once you agree |
132
+ | "Bring back the YouTube tabs you closed" | Reopens them from the saved record |
133
+ | "How many tabs do I have open, and on which sites?" | A count per site across every connected browser |
134
+ | "Close my duplicate tabs" | Previews the duplicates, then closes them once you agree |
135
+ | "Group my GitHub tabs and call the group Work" | Creates a named tab group |
136
+ | "Summarise the article in my current tab" | Reads the page text and summarises it |
137
+ | "Find the tab with my flight booking and bring it to the front" | Searches titles and addresses, then switches to it |
138
+ | "Open the docs for React, Vue and Svelte" | Opens each site in a new tab |
139
+ | "Get every image link on this page" (Firefox) | Runs a script in the tab and returns the links |
140
+
141
+ ## Cleaning up lots of tabs
142
+
143
+ Say it in your own words: "I have too many tabs", "help me close some tabs", or "I keep tabs open so I don't forget things". Your AI then:
144
+
145
+ 1. Looks at your tabs as groups (one per site), so even a thousand tabs come down to a few dozen decisions.
146
+ 2. Asks how much time you have and what you're using right now.
147
+ 3. Saves a list of every open tab on your computer before anything closes.
148
+ 4. Shows you three to five groups at a time with its best guess, like "Google searches, 12 tabs, probably finished with". You say close, keep, or "that's something I need to do". "Leave it" is always fine.
149
+ 5. For the few real to-dos, asks for the very next step and when you'll do it ("when I get home Saturday, I'll check Costco for the Mac mini"), in your words, and keeps it in your notes, a list you copy, or a named tab group, before closing those tabs.
150
+ 6. Tells you exactly what will close and how many, and closes nothing until you say yes. For a big batch you type the number back.
151
+
152
+ It never fills in forms, buys anything, or reads the text of banking, health or email pages. Pinned tabs stay open unless you name them. If you ask for tab groups, it says so first (tabs shuffle within each window while it works), keeps every tab in its own window, gives groups short names that fit the tab bar, and leaves you on the tab you were on. If a web page's title contains instructions aimed at the AI, it tells you instead of following them.
153
+
154
+ **What gets saved, and where.** Each clean-up saves one file listing the tabs that were open: title, link, window, group, whether it was pinned, and when it was last used. No cookies, passwords or typed text. The files stay on your computer, in your own user account's app folder:
155
+
156
+ | System | Folder |
157
+ |---|---|
158
+ | macOS | `~/Library/Application Support/2manytabs/snapshots` |
159
+ | Windows | `%LOCALAPPDATA%\2manytabs\snapshots` |
160
+ | Linux | `~/.local/state/2manytabs/snapshots` |
161
+
162
+ Ask your AI to "bring back" tabs and it reopens them from the newest list. Delete the folder whenever you like.
163
+
164
+ **In clients that list MCP prompts**, the `close-the-loops` prompt starts the same clean-up (in Claude Code, type `/mcp__2manytabs-mcp__close-the-loops`). The method also ships as an [Agent Skill](https://agentskills.io) in [`native-host/skills/closing-tab-loops`](native-host/skills/closing-tab-loops): copy that folder into your client's skills folder if you'd rather load it that way. You don't need to; the server hands the same method to your AI when you ask.
165
+
166
+ ## Compatibility
167
+
168
+ | | Chrome and Chromium | Firefox |
169
+ |---|---|---|
170
+ | Tab tools | Yes | Yes |
171
+ | Tab groups | Yes | 139 or newer |
172
+ | `execute_script` | No, returns an error | Yes |
173
+ | Last-used times in `cluster_tabs` and records | Chrome 121 or newer | Yes |
174
+
175
+ Chrome and Firefox can be connected at the same time. Brave, Edge and Opera use the Chrome build.
176
+
177
+ <details>
178
+ <summary><strong>Interested in developing 2ManyTabs MCP?</strong></summary>
179
+
180
+ ```shell
181
+ git clone https://github.com/jamubc/2ManyTabs-MCP.git
182
+ cd 2ManyTabs-MCP
183
+ bash install.sh
184
+ cd extension && npm install && npm run build && npm run build:firefox
185
+ ```
186
+
187
+ `install.sh` installs the server's dependencies. Claude Code picks up the server from `.mcp.json` when you open the repository. Load the extension from `extension/.output/chrome-mv3/` or `extension/.output/firefox-mv2/manifest.json`.
188
+
189
+ </details>
190
+
191
+ ## License
192
+
193
+ MIT. See [LICENSE](LICENSE).