Skip to main content
Glama
MCP Browser Tabs Server

MCP Browser Tabs Server

by kazuph

MCPブラウザタブ

Chromeブラウザのタブ情報を取得・管理するためのモデルコンテキストプロトコル(MCP)サーバー。これにより、Claude Desktop(または任意のMCPクライアント)は、現在開いているChromeタブの情報を取得し、制御できるようになります。

クイックスタート(ユーザー向け)

このツールを Claude Desktop で使用するには、Claude Desktop の構成 ( ~/Library/Application Support/Claude/claude_desktop_config.json ) に以下を追加するだけです。

{
  "tools": {
    "browser-tabs": {
      "command": "npx",
      "args": ["-y", "@kazuph/mcp-browser-tabs"]
    }
  }
}

これにより、必要に応じてツールの最新バージョンが自動的にダウンロードされ、実行されます。

必要な設定

  1. Chrome のアクセシビリティを有効にする:

    • システム設定を開く

    • 「プライバシーとセキュリティ」>「アクセシビリティ」へ移動

    • 「+」ボタンをクリック

    • アプリケーションフォルダからGoogle Chromeを追加します

    • Chromeのトグルをオンにする

AppleScript が Chrome タブを操作するには、このアクセシビリティ設定が必要です。

Related MCP server: chrome-agent-bridge

開発者向け

次のセクションは、ツールを開発または変更したい人向けです。

前提条件

  • Node.js 18歳以上

  • macOS(AppleScript操作用)

  • グーグルクローム

  • Claude Desktop ( https://claude.ai/desktopからインストール)

  • tsx ( npm install -g tsxでインストール)

インストール

git clone https://github.com/kazuph/mcp-browser-tabs.git
cd mcp-browser-tabs
npm install
npm run build

利用可能なツール

  • get_tabs : Google Chromeブラウザから開いているすべてのタブを取得し、タイトルとURLを返します。タブはウィンドウごとにグループ化され、「ウィンドウ1-1」(ウィンドウ1、タブ1)のような形式で表示されます。

  • close_tab : ウィンドウとタブのインデックスを使用して、Google Chrome 内の特定のタブを閉じます。

    • パラメータ:

      • windowIndex: ウィンドウ番号(1から始まる)

      • tabIndex: ウィンドウ内のタブ番号(1から始まる)

    • 注: 複数のタブを閉じる際は、インデックス番号のずれを防ぐため、最も大きいインデックス番号から順に閉じてください。タブを閉じた後、get_tabs を使って変更内容を確認してください。

注記

  • このツールは AppleScript に依存しているため、macOS 専用に設計されています。

  • Google Chrome がインストールされ、実行されている必要があります。

  • Chrome にアクセシビリティ権限を付与する必要があります。

ライセンス

MITライセンス - 詳細についてはLICENSEファイルを参照してください

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.

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

    A4.5/5.0

    Scored across 4 tools

    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 recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      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.
      100
      4
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP clients to control real Chrome tabs in existing profiles, supporting navigation, interaction, screenshots, and console/network inspection across multiple Chrome instances.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables local control of existing Chrome/Chromium browser tabs through MCP, including tab management, navigation, content reading, screenshots, and page interaction.
      Apache 2.0