Browser MCP Serverのロゴ

Browser MCP Server

コミュニティ
UHolli

Browse MCP for the web, directly from Cursor etc that bridges AI assistants to your local browser through a Chrome extension | MCP helper | MCP assistant | MCP browser

公開者UHolli
リポジトリbrowser-mcp
言語TypeScript
フォーク
979
スター
84
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Browser MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには84件のスターと979件のフォークがあります。

Browser MCP Server

A production-ready Model Context Protocol (MCP) server that bridges AI assistants to your local browser through a Chrome extension.

Control navigation, interaction, snapshots, and screenshots from Cursor, Claude Desktop, VS Code, Windsurf, and any MCP-compatible client — without launching a separate browser instance.


Table of Contents


Overview

Browser MCP connects an AI client (via stdio MCP transport) to a Chrome extension (via local WebSocket). The extension operates on your existing browser profile, preserving login sessions and reducing bot-detection friction compared to headless automation.


Architecture

Request Flow

Component Responsibilities

ModuleRole
src/index.tsCLI entry point, tool registration, lifecycle
src/server.tsMCP protocol handlers (tools/resources)
src/context.tsTyped WebSocket RPC to the extension
src/messaging/Request/response correlation over WebSocket
src/tools/Browser automation tool implementations
src/persistence/Optional Redis session metadata store
src/config/Environment-driven configuration

Features

CapabilityTools
Navigationbrowser_navigate, browser_go_back, browser_go_forward, browser_wait
Interactionbrowser_click, browser_hover, browser_type, browser_select_option, browser_drag, browser_press_key
Inspectionbrowser_snapshot, browser_screenshot, browser_get_console_logs
PersistenceOptional Redis-backed session and tool-call metadata
ObservabilityStructured stderr logging with configurable log levels
Standalone buildNo private monorepo dependencies required

Requirements

  • Node.js 18 or later
  • Chrome with the Browser MCP extension installed
  • Redis 6+ (optional, for session persistence)

Installation

From source

bash
git clone https://github.com/BrowserMCP/mcp.git
cd mcp
npm install
npm run build

MCP client configuration

Add to your MCP client settings (example for Cursor / Claude Desktop):

json
{
  "mcpServers": {
    "browsermcp": {
      "command": "node",
      "args": ["/absolute/path/to/mcp/dist/index.js"]
    }
  }
}

Or use the published binary after linking:

bash
npm link
# command: mcp-server-browsermcp

Connect the extension

  1. Start your MCP client (which launches this server).
  2. Open Chrome and click the Browser MCP extension icon.
  3. Click Connect on the active tab.
  4. Invoke tools from your AI assistant.

Configuration

Copy the example environment file and adjust values:

bash
cp .env.example .env
VariableDefaultDescription
WS_PORT9009WebSocket port for the Chrome extension
LOG_LEVELinfoLog verbosity: debug, info, warn, error
REDIS_ENABLEDfalseEnable Redis session persistence
REDIS_HOST127.0.0.1Redis hostname
REDIS_PORT6379Redis port
REDIS_PASSWORD(empty)Redis authentication password
REDIS_DB0Redis database index
REDIS_KEY_PREFIXbrowsermcp:Key namespace prefix
REDIS_CONNECT_TIMEOUT_MS10000Connection timeout
REDIS_MAX_RETRIES10Reconnection attempts
REDIS_SESSION_TTL_SECONDS86400Session key TTL (24 h)

When Redis is enabled, the server records connection events, disconnection timestamps, and tool-call counts — useful for debugging and operational monitoring.


Development

bash
# Install dependencies
npm install

# Watch mode
npm run dev

# Type check
npm run typecheck

# Lint
npm run lint

# Run all checks
npm run validate

MCP Inspector

Debug tool schemas and handlers interactively:

bash
npm run build
npm run inspector

Testing

bash
# Run all tests
npm test

# Watch mode
npm run test:watch

Tests cover environment parsing, error formatting, async utilities, and Redis session store logic (with mocked clients).


Project Structure

mcp/
├── docs/
│   └── AUDIT.md              # Engineering audit notes
├── src/
│   ├── config/               # App + environment configuration
│   ├── messaging/            # WebSocket RPC layer
│   ├── persistence/          # Redis connection + session store
│   ├── resources/            # MCP resource type definitions
│   ├── tools/                # Browser automation tools
│   ├── types/                # Shared Zod schemas and message types
│   ├── utils/                # Logging, errors, port helpers
│   ├── context.ts            # Extension connection context
│   ├── index.ts                # CLI entry point
│   ├── server.ts             # MCP server factory
│   └── ws.ts                 # WebSocket server lifecycle
├── tests/                    # Vitest unit tests
├── .env.example              # Configuration template
├── eslint.config.js          # ESLint flat config
├── tsup.config.ts            # Build configuration
├── tsconfig.json             # TypeScript (source)
├── tsconfig.test.json        # TypeScript (tests + lint)
└── vitest.config.ts          # Test runner config

Design Decisions

  • Stdio transport only — MCP clients spawn the server as a subprocess; stdout is reserved for the protocol.
  • Stderr logging — All diagnostics go to stderr to avoid corrupting MCP messages.
  • Optional Redis — Persistence is opt-in; the server runs fully without Redis for local development.
  • Typed WebSocket RPC — Every extension message is typed end-to-end for compile-time safety.

Troubleshooting

"No connection to browser extension"

The Chrome extension is not connected. Open the extension popup and click Connect on the target tab.

Port already in use

Another process holds WS_PORT (default 9009). Either stop the conflicting process or set a different port:

bash
WS_PORT=9010 node dist/index.js

Redis connection failures

If Redis is enabled but unreachable, the server logs an error and continues without persistence. Verify Redis is running:

bash
redis-cli ping
# PONG

Tools return timeout errors

The extension did not respond within 30 seconds. Ensure the tab is active and the extension is connected. Increase load times with browser_wait.

MCP client shows no tools

Confirm the server binary path in your MCP config is absolute and that npm run build completed successfully.


Contributing

  1. Fork the repository and create a feature branch.
  2. Install dependencies: npm install
  3. Make changes with tests: npm run validate
  4. Submit a pull request with a clear description and test plan.

Commit Guidelines

  • One logical change per commit.
  • Use conventional prefixes: feat:, fix:, refactor:, test:, docs:, chore:.
  • Run npm run validate before pushing.

FAQ

Does this launch a new browser? No. It controls your existing Chrome profile through an extension.

Is my data sent to remote servers? Automation runs locally. Data only flows between your AI client, this server, and your browser.

Do I need Redis? No. Redis is optional and disabled by default.

Which browsers are supported? Chrome and Chromium-based browsers with the Browser MCP extension.

How is this different from Playwright MCP? Playwright MCP launches browser instances. Browser MCP uses your logged-in profile via a Chrome extension, reducing CAPTCHA and login friction.

Can multiple extensions connect? Only one WebSocket connection is active at a time. A new connection replaces the previous one.


License

Apache License 2.0 — see LICENSE.

Adapted from the Playwright MCP server with a browser-extension architecture for profile reuse and stealth automation.

インストール

TypingMind
{
  "mcpServers": {
    "uholli-browser-mcp": {
      "command": "mcp-server-browsermcp",
      "args": []
    }
  }
}

Browser MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Browser MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Browser MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Browser MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "uholli-browser-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@browsermcp/mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてBrowser MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Browser MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Browser MCP Serverを使ってこのタスクを手伝ってもらえますか?
Browser MCP Server
はい、読みました。
Browser MCP Serverで調べた結果をお伝えします。

よくある質問

Browser MCP Server MCPサーバーは何に使いますか?

Browser MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでBrowser MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでBrowser MCP Serverを利用できます。

TypingMindでBrowser MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Browser MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Browser MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Browser MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでBrowser MCP Server MCPのどのようなツールを利用できますか?

Browser MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Browser MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Browser MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇