2manytabs-mcp-host 2.1.0 → 3.0.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 +21 -0
- package/README.md +158 -0
- package/bridge.js +285 -120
- package/host.js +1 -1
- package/lib/tabs.js +2 -21
- package/package.json +26 -3
- package/tools/activate-tab.tool.js +6 -4
- package/tools/close-tabs.tool.js +33 -9
- package/tools/execute-script.tool.js +54 -0
- package/tools/get-tab-text.tool.js +6 -4
- package/tools/group-tabs.tool.js +9 -7
- package/tools/index.js +2 -4
- package/tools/list-tab-groups.tool.js +2 -3
- package/tools/list-tabs.tool.js +13 -10
- package/tools/open-tabs.tool.js +6 -4
- package/tools/present.js +12 -4
- package/tools/rendering.js +7 -15
- package/tools/ungroup-tabs.tool.js +7 -5
- package/tools/update-tab-group.tool.js +7 -5
- package/tools/update-tab.tool.js +6 -4
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,158 @@
|
|
|
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      
|
|
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
|
+
## Install
|
|
12
|
+
|
|
13
|
+
### 1. Add the MCP server
|
|
14
|
+
|
|
15
|
+
One command, with Node.js 18 or newer installed. In Claude Code:
|
|
16
|
+
|
|
17
|
+
```shell
|
|
18
|
+
claude mcp add 2manytabs-mcp -- npx -y 2manytabs-mcp-host
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Using another client? Open yours:
|
|
22
|
+
|
|
23
|
+
<details>
|
|
24
|
+
<summary><picture><img alt="Antigravity CLI" src="https://img.shields.io/badge/Antigravity%20CLI-4285F4?logo=google&logoColor=white" height="22"></picture></summary>
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
agy mcp add 2manytabs-mcp npx -y 2manytabs-mcp-host
|
|
28
|
+
```
|
|
29
|
+
</details>
|
|
30
|
+
|
|
31
|
+
<details>
|
|
32
|
+
<summary><picture><img alt="Codex" src="https://img.shields.io/badge/Codex-10A37F" height="22"></picture></summary>
|
|
33
|
+
|
|
34
|
+
```shell
|
|
35
|
+
codex mcp add 2manytabs-mcp -- npx -y 2manytabs-mcp-host
|
|
36
|
+
```
|
|
37
|
+
</details>
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<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>
|
|
41
|
+
|
|
42
|
+
```shell
|
|
43
|
+
code --add-mcp '{"name":"2manytabs-mcp","command":"npx","args":["-y","2manytabs-mcp-host"]}'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This adds it to your user profile.
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<details>
|
|
50
|
+
<summary><picture><img alt="Hermes Agent" src="https://img.shields.io/badge/Hermes%20Agent-6B4FBB" height="22"></picture></summary>
|
|
51
|
+
|
|
52
|
+
```shell
|
|
53
|
+
hermes mcp add 2manytabs-mcp --command npx --args -y 2manytabs-mcp-host
|
|
54
|
+
```
|
|
55
|
+
</details>
|
|
56
|
+
|
|
57
|
+
<details>
|
|
58
|
+
<summary><picture><img alt="OpenClaw" src="https://img.shields.io/badge/OpenClaw-E5484D" height="22"></picture></summary>
|
|
59
|
+
|
|
60
|
+
Open **Settings → MCP**, choose **Add server**, pick **Stdio**, and enter the command `npx` with the arguments `-y 2manytabs-mcp-host`.
|
|
61
|
+
</details>
|
|
62
|
+
|
|
63
|
+
<details>
|
|
64
|
+
<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>
|
|
65
|
+
|
|
66
|
+
Add this to the client's MCP config file, then restart the client:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"2manytabs-mcp": {
|
|
72
|
+
"command": "npx",
|
|
73
|
+
"args": ["-y", "2manytabs-mcp-host"]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
| Client | Config file |
|
|
80
|
+
|---|---|
|
|
81
|
+
| 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` |
|
|
82
|
+
| Cursor | `~/.cursor/mcp.json`, or `.cursor/mcp.json` in a project |
|
|
83
|
+
| Windsurf | `mcp_config.json`, opened from **Settings → Cascade → MCP** |
|
|
84
|
+
| Cline | `cline_mcp_settings.json`, opened from the **MCP Servers** panel |
|
|
85
|
+
| Continue | `.continue/mcpServers/2manytabs-mcp.json` |
|
|
86
|
+
| Gemini CLI (enterprise) | `~/.gemini/settings.json`, or `.gemini/settings.json` in a project |
|
|
87
|
+
</details>
|
|
88
|
+
|
|
89
|
+
Any other client that runs MCP servers over stdio works with the command `npx -y 2manytabs-mcp-host`.
|
|
90
|
+
|
|
91
|
+
### 2. Add the browser extension
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
- Chrome and other Chromium browsers: unzip it, open `chrome://extensions`, turn on Developer mode, choose Load unpacked, and select the unzipped folder.
|
|
96
|
+
- 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.
|
|
97
|
+
|
|
98
|
+
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.
|
|
99
|
+
|
|
100
|
+
## Tools
|
|
101
|
+
|
|
102
|
+
Tab ids look like `chrome:12` or `firefox:34`, and several browsers can be connected at once.
|
|
103
|
+
|
|
104
|
+
| Tool | Description |
|
|
105
|
+
|---|---|
|
|
106
|
+
| `list_tabs` | Lists open tabs across browsers, grouped by domain or window, with `query`, `duplicates_only` and `browser` filters |
|
|
107
|
+
| `execute_script` | Runs JavaScript in a tab (Firefox only), in the `ISOLATED` or `MAIN` world, and returns the result |
|
|
108
|
+
| `get_tab_text` | Returns the body text of a loaded tab |
|
|
109
|
+
| `close_tabs` | Closes tabs by `tab_ids`, `match` or `duplicates`, with `dry_run` to preview |
|
|
110
|
+
| `open_tabs` | Opens the given `urls`, adding `https://` when no scheme is present |
|
|
111
|
+
| `activate_tab` | Brings a tab to the foreground and focuses its window |
|
|
112
|
+
| `update_tab` | Sets a tab's `url`, `pinned` or `muted` state |
|
|
113
|
+
| `list_tab_groups` | Lists native tab groups with `title_query` filter |
|
|
114
|
+
| `group_tabs` | Puts tabs into a new or existing tab group with `title` and `color` |
|
|
115
|
+
| `ungroup_tabs` | Removes tabs from their groups |
|
|
116
|
+
| `update_tab_group` | Changes a group's `title`, `color` or `collapsed` state |
|
|
117
|
+
|
|
118
|
+
## Usage
|
|
119
|
+
|
|
120
|
+
Ask your agent in plain words. Some things to try:
|
|
121
|
+
|
|
122
|
+
| Ask | What happens |
|
|
123
|
+
|---|---|
|
|
124
|
+
| "How many tabs do I have open, and on which sites?" | A count per site across every connected browser |
|
|
125
|
+
| "Close my duplicate tabs" | Previews the duplicates, then closes them once you agree |
|
|
126
|
+
| "Group my GitHub tabs and call the group Work" | Creates a named tab group |
|
|
127
|
+
| "Summarise the article in my current tab" | Reads the page text and summarises it |
|
|
128
|
+
| "Find the tab with my flight booking and bring it to the front" | Searches titles and addresses, then switches to it |
|
|
129
|
+
| "Open the docs for React, Vue and Svelte" | Opens each site in a new tab |
|
|
130
|
+
| "Get every image link on this page" (Firefox) | Runs a script in the tab and returns the links |
|
|
131
|
+
|
|
132
|
+
## Compatibility
|
|
133
|
+
|
|
134
|
+
| | Chrome and Chromium | Firefox |
|
|
135
|
+
|---|---|---|
|
|
136
|
+
| Tab tools | Yes | Yes |
|
|
137
|
+
| Tab groups | Yes | 139 or newer |
|
|
138
|
+
| `execute_script` | No, returns an error | Yes |
|
|
139
|
+
|
|
140
|
+
Chrome and Firefox can be connected at the same time. Brave, Edge and Opera use the Chrome build.
|
|
141
|
+
|
|
142
|
+
<details>
|
|
143
|
+
<summary><strong>Interested in developing 2ManyTabs MCP?</strong></summary>
|
|
144
|
+
|
|
145
|
+
```shell
|
|
146
|
+
git clone https://github.com/jamubc/2ManyTabs-MCP.git
|
|
147
|
+
cd 2ManyTabs-MCP
|
|
148
|
+
bash install.sh
|
|
149
|
+
cd extension && npm install && npm run build && npm run build:firefox
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
`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`.
|
|
153
|
+
|
|
154
|
+
</details>
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
MIT. See [LICENSE](LICENSE).
|