2manytabs-mcp-host

v3.1.0
2manytabs-mcp-host Checked 4 days ago Published 1 month ago

MCP server that exposes Chrome and Firefox tabs via the 2ManyTabs MCP extension

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

start_tab_cleanup Start a Tab Clean-up

Call this first when the user has too many tabs, wants to clean up, close, sort or dedupe lots of tabs, or feels stuck or stressed about closing them. Returns the step-by-step method to follow: save a record, sort tabs into clusters, close what the user confirms, and park the few real to-dos with a next step and a when, in the user's own words. Read-only; it does not touch any tab.

list_tabs List Tabs

Read open browser tabs: a domain histogram plus one line per tab. Best for finding specific tabs with `query`. To survey, sort or clean up many tabs, use cluster_tabs instead: it summarises any number of tabs in a few lines, where this prints every tab. Filter with `query`, reshape with `group_by`, or isolate redundant tabs with `duplicates_only`. Shows at most 1000 tabs and says so when there are more; cluster_tabs summarises any number. Read-only — never closes anything.

ParameterTypeDescription
browserstringFilter tabs to a specific browser (e.g. "chrome", "firefox"). Omit to list tabs across all open browsers.
duplicates_onlybooleanOnly include tabs that are duplicates (share a URL with an earlier tab).
group_bystringShape of the detailed view. 'domain' (default) is best for triaging many tabs; 'window' groups by browser window; 'none' returns a flat list.
querystringCase-insensitive substring; keep only tabs whose title or URL contains it.
show_urlsbooleanPrint each tab's URL under its title. Long output for many tabs: narrow with `query` first.

cluster_tabs Summarise Tabs as Clusters

Summarise any number of open tabs as clusters (one per site, or per section of a busy site), largest first, each with a count, how long ago it was used, flags (duplicate, error page, search results, may hold unsaved work, pinned) and three sample titles. Each cluster gives the `match` string for close_tabs and how many tabs it selects. Titles on banking, health, mail, password and sign-in sites are hidden. Use `cluster` to see every tab in one cluster with its URL, `cluster: "all"` for every cluster's tab ids in a few lines (what group_tabs needs), or `signal` to list one kind of tab across cl…

ParameterTypeDescription
browserstringOnly this browser ("chrome", "firefox"). Pass the same value to close_tabs.
clusterstringA cluster id from the summary, e.g. "c03", to list all its tabs with URLs; or "all" for every cluster with just its tab ids, to pass to group_tabs or close_tabs.
offsetintegerSkip this many clusters, to page through a long summary.
signalstringList every tab with this signal: quickwin (broken pages, copies and searches that are safe to offer closing), errors, search, duplicates, stale (30+ days), sensitive, editing (may hold unsaved work) o…
topintegerHow many clusters to show.

snapshot_tabs Save a Record of Open Tabs

Save a record of every open tab (title, link, window, tab group, pinned, last used) to a file in this computer's app-data folder, before closing anything. Nothing leaves the computer, and no cookies or typed form text are saved. Call it once at the start of a clean-up; reopen_tabs can later reopen tabs from the record. Returns JSON: record (name to pass to reopen_tabs), path, tabs, windows, by_browser, pinned.

ParameterTypeDescription
browserstringOnly record this browser ("chrome", "firefox"). Omit to record every connected browser.

close_tabs Close Tabs

Close browser tabs by one selection mode: `tab_ids` (explicit), `match` (substring of title/URL), or `duplicates` (every tab sharing a URL with an earlier one). Set `dry_run` to preview the exact tabs that would close without touching them. `match` and `duplicates` leave pinned tabs open unless `include_pinned` is true. Closing more than 10 tabs needs `expected_count`, the count from the preview that the user agreed to; if the selection no longer has exactly that many tabs, nothing closes. This tool cannot reopen what it closes (reopen_tabs can, from a record saved by snapshot_tabs). Ask the…

ParameterTypeDescription
browserstringOptional browser filter ("chrome", "firefox") to limit close actions to a single browser.
dry_runbooleanPreview the tabs that would close — does not close anything. Recommended for bulk closes.
duplicatesbooleanClose duplicate tabs, keeping the first occurrence of each URL.
expected_countintegerThe number of tabs the user agreed to close, from the preview. Required above 10 tabs.
include_pinnedbooleanAlso close pinned tabs that `match` or `duplicates` selects. Explicit `tab_ids` always include them.
matchstringClose every tab whose title or URL contains this substring (case-insensitive).
tab_idsarrayExplicit tab IDs to close (numbers or composite like "chrome:123" from list_tabs).

reopen_tabs Reopen Tabs from a Record

Reopen tabs saved by snapshot_tabs that are no longer open, in the browser they came from. Narrow with `match` (substring of title or URL). Preview with `dry_run` first. Reopening more than 10 tabs needs `expected_count` from the preview, and at most 100 open per call. Only web and file links are reopened. Returns JSON: record, dry_run, count (or opened), sample of up to 10 {title, url}.

ParameterTypeDescription
dry_runbooleanPreview what would reopen without opening anything.
expected_countintegerThe number of tabs the user agreed to reopen, from the preview. Required above 10.
matchstringOnly reopen tabs whose title or URL contains this substring (case-insensitive).
recordstringRecord name returned by snapshot_tabs, e.g. "tabs-20261012-141500.json". Omit for the newest.

open_tabs Open Tabs

Open one or more URLs in new browser tabs. This tool allows you to navigate the user to specific web pages or search queries. Examples: - {"urls": ["https://github.com", "https://youtube.com"]} - {"urls": ["en.wikipedia.org/wiki/Palantir"]} Returns: JSON object containing: - opened (int): Number of tabs successfully opened

ParameterTypeDescription
urls *arrayAn array of URLs to open. If no protocol is provided, https:// will be prepended automatically.
browserstringTarget browser to open tabs in (e.g. "chrome", "firefox"). Defaults to the active browser.

list_tab_groups List Tab Groups

List all existing native tab groups across all connected browsers. Returns their IDs, titles, colors, collapsed states, and parent window IDs.

ParameterTypeDescription
title_querystringCase-insensitive substring filter for group titles.

group_tabs Group Tabs

Group open tabs into native browser tab groups. Can create a new group or add tabs to an existing group. Optionally set a title and a color for the group. Tabs stay in their own windows: a group cannot span windows, so tabs from several windows become one matching group per window. Grouping does move tabs next to each other in the tab bar while the user may be using it, so say that before you group. The user is left on the tab they were on.

ParameterTypeDescription
tab_ids *arrayTab IDs to add to the group (numbers or composite like "chrome:12"). All must be in the same browser.
browserstringOptional browser hint ("chrome", "firefox") if ids are numeric.
colorstringColor to set on the group (new or existing).
group_idAdd to an existing group ID (number or composite like "chrome:5"). If omitted, a new group is created.
titlestringName shown on the group in the tab bar, which cuts off after about 15 characters. Use one to three words with the meaning first: "Watch later", "Homelab", or a verb for a to-do ("Buy Mac mini", "Book…

ungroup_tabs Ungroup Tabs

Remove one or more open tabs from their current native tab groups.

ParameterTypeDescription
tab_ids *arrayTab IDs to remove from any groups (numbers or composite like "chrome:12").
browserstringOptional browser hint ("chrome", "firefox") if ids are numeric.

update_tab_group Update Tab Group

Update properties of an existing native browser tab group, including its title, color, or collapsed/expanded state.

ParameterTypeDescription
group_id *The ID (number or composite like "chrome:5") of the tab group to update (obtained from list_tab_groups or list_tabs).
browserstringOptional browser hint ("chrome", "firefox") if ids are numeric.
collapsedbooleanWhether the group should be collapsed (true) or expanded (false).
colorstringNew color for the group.
titlestringName shown on the group in the tab bar, which cuts off after about 15 characters. Use one to three words with the meaning first: "Watch later", "Homelab", or a verb for a to-do ("Buy Mac mini", "Book…

activate_tab Activate Tab

Bring a specific browser tab to the foreground. This activates the tab and focuses its containing window so the user sees it immediately.

ParameterTypeDescription
tab_id *The numeric ID of the tab (or composite like "chrome:123") to activate.
browserstringOptional browser hint ("chrome", "firefox") if tab_id is numeric.

update_tab Update Tab

Modify properties of an open browser tab, such as navigating it to a new URL, pinning/unpinning it, or muting/unmuting its audio.

ParameterTypeDescription
tab_id *The numeric ID (or composite like "chrome:123") of the tab to update.
browserstringOptional browser hint ("chrome", "firefox") if tab_id is numeric.
mutedbooleanSet to true to mute the tab, or false to unmute it.
pinnedbooleanSet to true to pin the tab, or false to unpin it.
urlstringA new URL to navigate the tab to. If no protocol is provided, https:// will be prepended.

get_tab_text Get Tab Text

Extract the plain body text content of a loaded browser tab using scripting. This allows reading and analyzing tab contents (e.g. for summarization or classification). Note: Fails on restricted internal browser pages (e.g., chrome://, edge://, or extensions) or if the tab is not loaded.

ParameterTypeDescription
tab_id *The numeric ID (or composite like "chrome:123") of the tab whose body text to extract.
browserstringOptional browser hint ("chrome", "firefox") if tab_id is numeric.

execute_script Execute Script in Tab

Execute a JavaScript expression or script in the context of an open browser tab and return the serialized result. Useful for pulling elements from pages (e.g. images, links, tables, article bodies), clicking elements, or extracting dynamic DOM state. Firefox only: Chrome tabs return an error, so use a firefox: tab id. Fails on restricted system URLs (e.g. chrome://, about:, extensions).

ParameterTypeDescription
script *stringThe JavaScript code or expression to run in the tab. Can return a value or a Promise (e.g. Array.from(document.images).map(i => i.src)).
tab_id *The target tab ID (number or composite ID like "chrome:12" or "firefox:34").
browserstringOptional browser hint ("chrome", "firefox") if tab_id is numeric and ambiguous.
worldstringExecution context world. "ISOLATED" (default) has full DOM access. "MAIN" runs in the page JavaScript window context.