MCP Browser Tabs Server
The MCP Browser Tabs Server allows you to interact with Google Chrome browser tabs on macOS.
Retrieve open tabs: Use the
get_tabstool to fetch all open tabs, displaying their titles, URLs, and identifying window/tab indices grouped by window.Close specific tabs: Use the
close_tabtool to close a specific tab by providing its window and tab index (both starting from 1).
Note: When closing multiple tabs, start from the highest index numbers to avoid index shifting, and use get_tabs afterward to confirm changes.
Allows retrieving information about and controlling currently open Chrome tabs, including listing all open tabs with their titles and URLs, and closing specific tabs by window and tab indices.
Designed specifically for macOS due to its dependency on AppleScript for interacting with Chrome tabs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Browser Tabs Server get all my open Chrome tabs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Browser Tabs
Model Context Protocol server for retrieving and managing Chrome browser tabs information. This allows Claude Desktop (or any MCP client) to fetch information about and control currently open Chrome tabs.
Quick Start (For Users)
To use this tool with Claude Desktop, simply add the following to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"tools": {
"browser-tabs": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-browser-tabs"]
}
}
}This will automatically download and run the latest version of the tool when needed.
Required Setup
Enable Accessibility for Chrome:
Open System Settings
Go to Privacy & Security > Accessibility
Click the "+" button
Add Google Chrome from your Applications folder
Turn ON the toggle for Chrome
This accessibility setting is required for AppleScript to interact with Chrome tabs.
Related MCP server: chrome-agent-bridge
For Developers
The following sections are for those who want to develop or modify the tool.
Prerequisites
Node.js 18+
macOS (for AppleScript operations)
Google Chrome
Claude Desktop (install from https://claude.ai/desktop)
tsx (install via
npm install -g tsx)
Installation
git clone https://github.com/kazuph/mcp-browser-tabs.git
cd mcp-browser-tabs
npm install
npm run buildAvailable Tools
get_tabs: Retrieves all open tabs from Google Chrome browser, returning their titles and URLs. Tabs are grouped by window and displayed in a format like "Window 1-1" (Window 1, Tab 1).close_tab: Closes a specific tab in Google Chrome using window and tab indices.Parameters:
windowIndex: Window number (starts from 1)
tabIndex: Tab number within the window (starts from 1)
Note: When closing multiple tabs, start from the highest index numbers to avoid index shifting. After closing tabs, use get_tabs to confirm the changes.
Notes
This tool is designed for macOS only due to its dependency on AppleScript.
Requires Google Chrome to be installed and running.
Accessibility permissions must be granted for Chrome.
License
MIT License - see the LICENSE file for details
Available Tools
4 toolsactivate_tab_by_idA
đĽ PREFERRED METHOD: Activate (focus) a specific tab in Google Chrome using its unique tab ID. Brings the tab to the front and makes it active. Extract the Tab ID from [Tab ID: 1234567890] in get_tabs output.
Inputs: tabId (required).
close_tabA
â ď¸ LEGACY DANGER: Close a specific tab using window/tab index. HIGH RISK of closing wrong tabs due to index shifting when tabs are reordered/closed. STRONGLY DEPRECATED: Use close_tab_by_id instead. Only use if Tab ID is unavailable.
Inputs: tabIndex (required), windowIndex (required).
close_tab_by_idA
đĽ PREFERRED METHOD: Close a specific tab in Google Chrome using its unique tab ID. IMMUNE to tab reordering, window changes, and index shifting. Extract the Tab ID from [Tab ID: 1234567890] in get_tabs output. Example: if tab shows '[Tab ID: 1594670961]', use tabId: 1594670961
Inputs: tabId (required).
get_tabsA
Get all open tabs from Google Chrome browser with unique tab IDs. Each tab has a stable, unique ID that persists across browser operations. Output shows both display format (1-1, 1-2) and Tab ID [Tab ID: 1234567890] for each tab. ALWAYS use the Tab ID number for reliable operations.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogâŚ
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: get_tabs retrieves tab information, activate_tab_by_id focuses a tab, close_tab_by_id closes a tab reliably, and close_tab serves as a deprecated fallback. The descriptions explicitly differentiate between preferred and legacy methods, eliminating any ambiguity in tool selection.
All tool names follow a consistent verb_noun or verb_noun_by_id pattern using snake_case (e.g., get_tabs, activate_tab_by_id, close_tab_by_id, close_tab). This uniformity makes the tool set predictable and easy to understand at a glance.
With 4 tools, this server is well-scoped for managing browser tabs, covering essential operations: retrieving tabs, activating them, and closing them (with both reliable and deprecated methods). The count is efficient without being overly sparse or bloated.
The tool set covers the core CRUD-like operations for browser tab management: get (list), activate (update focus), and close (delete). A minor gap exists in creating or opening new tabs, but the domain is focused on existing tab manipulation, and agents can work around this by using external methods if needed.
Maintenance
Related MCP Connectors
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Browser MCP for logged-in tasks. Uses your Chrome â credentials stay local. Zero-token replay.
Unofficial Browserless MCP â wraps the Browserless headless-Chromium REST API (browserless.io)
Control your Chrome from chat: open websites, read what's on the page, click buttons, and fill in fâŚ
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible agents to securely control the user's already authenticated Chrome browser via explicit tab authorization and DOM-based actions.1Apache 2.0
- AlicenseCqualityBmaintenanceMCP server for agent interaction with user-approved Google Chrome tabs, enabling tab listing/control, navigation, clicking, filling, snapshots, and screenshots via a local authenticated bridge.1004MIT
- FlicenseNot gradedqualityDmaintenanceEnables MCP clients to control real Chrome tabs in existing profiles, supporting navigation, interaction, screenshots, and console/network inspection across multiple Chrome instances.-
- AlicenseNot gradedqualityBmaintenanceEnables local control of existing Chrome/Chromium browser tabs through MCP, including tab management, navigation, content reading, screenshots, and page interaction.Apache 2.0