Skip to main content
Glama
kazuph

MCP Browser Tabs Server

by kazuph

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

  1. 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: antigravity-browser-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 build

Available 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 tools
activate_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
tabIdYesThe exact Tab ID number from [Tab ID: xxxxx] in get_tabs output - NOT the display number

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: the tool performs a UI action ('Brings the tab to the front and makes it active'), which implies mutation/focus change. However, it doesn't mention potential side effects like browser window activation or what happens if the tab ID is invalid. The description adds meaningful context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with three sentences: first states purpose and preference, second explains the behavioral effect, third provides usage guidance. Every sentence adds value, and it's front-loaded with the key action. No wasted words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, and behavioral context adequately. However, it lacks details on error conditions (e.g., invalid tab ID) and doesn't specify return values, which would be helpful since there's no output schema. It compensates well but has minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the tabId parameter thoroughly. The description adds marginal value by reinforcing the source ('Extract the Tab ID from [Tab ID: 1234567890] in get_tabs output') and clarifying it's 'NOT the display number,' but doesn't provide additional syntax or format details beyond the schema. Baseline 3 is appropriate, but the extra clarification earns a slightly higher score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('activate/focus'), the resource ('a specific tab in Google Chrome'), and the mechanism ('using its unique tab ID'). It distinguishes from siblings by specifying this is the 'PREFERRED METHOD' for activation by ID, differentiating from close_tab operations and get_tabs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided on when to use this tool: 'PREFERRED METHOD: Activate (focus) a specific tab... using its unique tab ID' and 'Extract the Tab ID from [Tab ID: 1234567890] in get_tabs output.' This clearly indicates the prerequisite (get_tabs output) and distinguishes it from alternatives like close_tab operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
tabIndexYesDANGEROUS: Tab index (1-based) - changes when tabs are reordered
windowIndexYesDANGEROUS: Window index (1-based) - can target wrong window

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and excels at behavioral disclosure. It explains the HIGH RISK due to index shifting when tabs are reordered/closed, warns about targeting wrong windows, and explicitly labels it as 'LEGACY DANGER' and 'STRONGLY DEPRECATED' - providing crucial behavioral context beyond what parameters alone would indicate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly structured and concise: it starts with a warning emoji and 'LEGACY DANGER', states the purpose, explains the risk, provides deprecation guidance, and gives the specific condition for use. Every sentence earns its place with critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter tool with no annotations and no output schema, the description provides complete context: purpose, risks, deprecation status, alternative tool, and specific usage condition. It compensates for the lack of structured safety annotations by explicitly warning about the dangerous behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description adds meaningful context by explaining why the parameters are dangerous ('HIGH RISK of closing wrong tabs due to index shifting'), which provides semantic understanding beyond the schema's technical descriptions of the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Close' and resource 'a specific tab using window/tab index', making the purpose explicit. It distinguishes from sibling tools by naming 'close_tab_by_id' as the preferred alternative, establishing clear differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'STRONGLY DEPRECATED: Use close_tab_by_id instead. Only use if Tab ID is unavailable.' This clearly states when not to use this tool and names the alternative, with a specific condition for when it might be appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
tabIdYesThe exact Tab ID number from [Tab ID: xxxxx] in get_tabs output - NOT the display number

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates key behavioral traits: the destructive nature ('Close'), the robustness ('IMMUNE to tab reordering, window changes, and index shifting'), and the specific data source requirement ('Extract the Tab ID from get_tabs output'). It doesn't mention error conditions or what happens if the tab doesn't exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly front-loaded with the core purpose in the first sentence, followed by important behavioral context, then specific implementation guidance with a concrete example. Every sentence earns its place with no wasted words, and the structure flows logically from general to specific.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter destructive tool with no annotations and no output schema, the description does an excellent job covering purpose, usage context, parameter semantics, and key behavioral traits. The only minor gap is the lack of information about return values or error conditions, but given the tool's simplicity and the comprehensive parameter coverage, this is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description adds significant value by explaining where the tabId comes from ('Extract the Tab ID from [Tab ID: 1234567890] in get_tabs output'), providing a concrete example with format, and clarifying what it is NOT ('NOT the display number'). This goes well beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Close a specific tab'), resource ('in Google Chrome'), and mechanism ('using its unique tab ID'). It explicitly distinguishes this tool from its sibling 'close_tab' by emphasizing the ID-based approach and immunity to tab reordering.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('PREFERRED METHOD'), when not to use it (vs. index-based alternatives), and references the exact alternative sibling tool 'get_tabs' as the source for obtaining the required tab ID. It clearly establishes the prerequisite relationship with get_tabs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about the persistence of tab IDs and output format, but does not cover potential limitations such as browser state dependencies, error conditions, or performance implications. It adequately describes core behavior but lacks depth on operational constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by essential details about tab IDs and output format. Every sentence earns its place by providing critical information without redundancy, making it efficiently structured and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, output details, and usage guidance. However, it could slightly improve by mentioning any prerequisites (e.g., browser must be open) or error handling, which holds it back from a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately focuses on output semantics, explaining the structure of tab data (display format and Tab ID) and usage guidance for the IDs. This adds value beyond the empty schema, warranting a score above the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verb ('Get') and resource ('all open tabs from Google Chrome browser'), and distinguishes it from siblings by focusing on retrieval rather than activation or closure. It specifies the scope ('all open tabs') and key output details (unique tab IDs, display format).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage by emphasizing that Tab IDs should be used for reliable operations, which implicitly guides when to use this tool (to obtain IDs for sibling tools like activate_tab_by_id). However, it does not explicitly state when not to use it or name alternatives, keeping it from a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.5/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible AI agents to securely control Chrome tabs via a local bridge, with explicit per-tab sharing and human approval for consequential actions.
    MIT
  • A
    license
    C
    quality
    C
    maintenance
    MCP 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.
    96
    3
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables local-first management of tabs across multiple Chromium browsers through MCP, providing tab organization, search, personal context, and browser actions over a localhost-only interface.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kazuph/mcp-browser-tabs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server