Skip to main content
Glama
Saik0s

Browser-Use MCP Server

by Saik0s

ブラウザ用MCPサーバー

ドキュメント ライセンス

プロジェクトノート:このMCPサーバー実装は、ブラウザ使用/Web UIの基盤上に構築されています。コアブラウザ自動化ロジックと設定パターンは、元のプロジェクトから改変されています。

自然言語によるブラウザ制御と Web リサーチのためのモデル コンテキスト プロトコル (MCP) を実装した AI 駆動型ブラウザ自動化サーバー。

特徴

  • 🧠 MCP 統合- AI エージェント通信用の完全なプロトコル実装。

  • 🌐ブラウザ自動化- ページナビゲーション、フォーム入力、自然言語による要素の対話 ( run_browser_agentツール)。

  • 👁️視覚的理解- ビジョン対応 LLM のオプションのスクリーンショット分析。

  • 🔄状態の永続性- 複数の MCP 呼び出しにわたってブラウザー セッションを管理したり、ユーザーのブラウザーに接続したりするオプション。

  • 🔌マルチ LLM サポート- OpenAI、Anthropic、Azure、DeepSeek、Google、Mistral、Ollama、OpenRouter、Alibaba、Moonshot、Unbound AI と統合します。

  • 🔍ディープ リサーチ ツール- マルチステップの Web リサーチとレポート生成専用のツール ( run_deep_searchツール)。

  • ⚙️環境変数の設定- 環境変数を介して完全に設定可能です。

  • 🔗 CDP 接続- Chrome DevTools プロトコルを介してユーザーが起動した Chrome/Chromium インスタンスに接続して制御する機能。

Related MCP server: Browserbase MCP Server

クイックスタート

前提条件

  • Python 3.11以上

  • uv (高速 Python パッケージインストーラー): pip install uv

  • Chrome/Chromiumブラウザがインストールされている

  • Playwrightブラウザをインストールします: uv sync実行してからuv run playwright install

MCP クライアントとの統合 (例: Claude Desktop)

Claude Desktopなどのクライアントをこのサーバーに接続するように設定できます。クライアントの設定(例: claude_desktop_config.json )に以下の構造を追加し、必要に応じてパスと環境変数を調整してください。

// Example for Claude Desktop config
"mcpServers": {
    "browser-use": {
      // Option 1: Run installed package
      // "command": "uvx",
      // "args": ["mcp-server-browser-use"],

      // Option 2: Run from local development source
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-browser-use",
        "run",
        "mcp-server-browser-use"
      ],
      "env": {
        // --- CRITICAL: Add required API keys here ---
        "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY",
        // "OPENAI_API_KEY": "YOUR_KEY_HERE_IF_USING_OPENAI",
        // "ANTHROPIC_API_KEY": "YOUR_KEY_HERE_IF_USING_ANTHROPIC",
        // ... add other keys based on MCP_MODEL_PROVIDER ...

        // --- Optional Overrides (defaults are usually fine) ---
        "MCP_MODEL_PROVIDER": "openrouter", // Use OpenRouter as provider
        "MCP_MODEL_NAME": "google/gemini-2.5-pro-exp-03-25:free", // Example OpenRouter model
        "BROWSER_HEADLESS": "true",    // Default: run browser without UI
        "BROWSER_USE_LOGGING_LEVEL": "INFO",

        // --- Example for connecting to your own browser ---
        // "MCP_USE_OWN_BROWSER": "true",
        // "CHROME_CDP": "http://localhost:9222",

        // Ensure Python uses UTF-8
        "PYTHONIOENCODING": "utf-8",
        "PYTHONUNBUFFERED": "1",
        "PYTHONUTF8": "1"
      }
    }
}

重要: commandとargs 、サーバーの実行方法(インストールされたパッケージまたはソースディレクトリ)を正しく指定していることを確認してください。env envで必要なAPIキーを設定してください。

MCPツール

このサーバーは、モデル コンテキスト プロトコルを介して次のツールを公開します。

同期ツール(完了を待つ)

  1. run_browser_agent

    • **説明:**自然言語指示に基づいてブラウザ自動化タスクを実行し、完了するまで待機します。MCP_ MCP_HEADLESS``MCP_``MCP_MAX_STEPS )。

    • 引数:

      • task (文字列、必須): 主なタスクまたは目的。

      • add_infos (文字列、オプション): エージェントの追加コンテキストまたはヒント ( customエージェント タイプで使用)。

    • 戻り値: (文字列) エージェントによって抽出された最終結果またはエラー メッセージ。

  2. run_deep_search

    • **説明:**特定のトピックについて詳細なウェブ調査を行い、レポートを生成して完了を待ちます。MCP_RESEARCH_ MCP_RESEARCH_始まる設定と、 BROWSER_一般的な設定(例: BROWSER_HEADLESS )を使用します。

    • 引数:

      • research_task (文字列、必須): 研究のトピックまたは質問。

      • max_search_iterations (整数、オプション、デフォルト: 10): 最大検索サイクル。

      • max_query_per_iteration (整数、オプション、デフォルト: 3): サイクルあたりの最大検索クエリ数。

    • 戻り値: (文字列) ファイル パスまたはエラー メッセージを含む、Markdown 形式で生成された調査レポート。

設定(環境変数)

環境変数を使用してサーバーを設定します。これらの環境変数はシステム内で設定することも、プロジェクトルートにある.envファイルに配置することもできます。

変数

説明

必須?

デフォルト値

サンプル値

LLM設定

MCP_MODEL_PROVIDER

使用するLLMプロバイダー。以下のオプションを参照してください。

はい

anthropic

openrouter

MCP_MODEL_NAME

選択したプロバイダーの特定のモデル名。

いいえ

claude-3-7-sonnet-20250219

anthropic/claude-3.7-sonnet

MCP_TEMPERATURE

LLM温度(0.0~2.0)。ランダム性を制御します。

いいえ

0.0

0.7

MCP_TOOL_CALLING_METHOD

ツール呼び出しメソッド('auto'、'json_schema'、'function_calling')。 run_browser_agentに影響します。

いいえ

auto

json_schema

MCP_MAX_INPUT_TOKENS

run_browser_agentの LLM コンテキストの最大入力トークン。

いいえ

128000

64000

MCP_BASE_URL

オプション: LLM プロバイダーのベース URL の一般的なオーバーライド。

いいえ

プロバイダー固有

http://localhost:8080/v1

MCP_API_KEY

オプション: LLM プロバイダーの API キーの一般的なオーバーライド (プロバイダー固有のキーよりも優先されます)。

いいえ

-

sk-...

プロバイダーAPIキー

MCP_API_KEYが設定されていない場合は、 MCP_MODEL_PROVIDERに基づいて必須です。

OPENAI_API_KEY

OpenAI の API キー。

使用する場合

-

sk-...

ANTHROPIC_API_KEY

Anthropic の API キー。

使用する場合

-

sk-ant-...

GOOGLE_API_KEY

Google AI (Gemini) の API キー。

使用する場合

-

AIza...

AZURE_OPENAI_API_KEY

Azure OpenAI の API キー。

使用する場合

-

...

DEEPSEEK_API_KEY

DeepSeek の API キー。

使用する場合

-

sk-...

MISTRAL_API_KEY

Mistral AI の API キー。

使用する場合

-

...

OPENROUTER_API_KEY

OpenRouter の API キー。

使用する場合

-

sk-or-...

ALIBABA_API_KEY

Alibaba Cloud (DashScope) の API キー。

使用する場合

-

sk-...

MOONSHOT_API_KEY

Moonshot AI の API キー。

使用する場合

-

sk-...

UNBOUND_API_KEY

Unbound AI の API キー。

使用する場合

-

...

プロバイダーエンドポイント

オプション: デフォルトの API エンドポイントをオーバーライドします。

OPENAI_ENDPOINT

OpenAI API エンドポイント URL。

いいえ

https://api.openai.com/v1

ANTHROPIC_ENDPOINT

Anthropic API エンドポイント URL。

いいえ

https://api.anthropic.com

AZURE_OPENAI_ENDPOINT

Azure を使用する場合は必須です。Azureリソースのエンドポイント。

使用する場合

-

https://res.openai.azure.com/

AZURE_OPENAI_API_VERSION

Azure API バージョン。

いいえ

2025-01-01-preview

2023-12-01-preview

DEEPSEEK_ENDPOINT

DeepSeek API エンドポイント URL。

いいえ

https://api.deepseek.com

MISTRAL_ENDPOINT

Mistral API エンドポイント URL。

いいえ

https://api.mistral.ai/v1

OLLAMA_ENDPOINT

Ollama API エンドポイント URL。

いいえ

http://localhost:11434

http://ollama.local:11434

OPENROUTER_ENDPOINT

OpenRouter API エンドポイント URL。

いいえ

https://openrouter.ai/api/v1

ALIBABA_ENDPOINT

Alibaba (DashScope) API エンドポイント URL。

いいえ

https://dashscope...v1

MOONSHOT_ENDPOINT

Moonshot API エンドポイント URL。

いいえ

https://api.moonshot.cn/v1

UNBOUND_ENDPOINT

バインドされていない AI API エンドポイント URL。

いいえ

https://api.getunbound.ai

オラマ特有の

OLLAMA_NUM_CTX

Ollama モデルのコンテキスト ウィンドウのサイズ。

いいえ

32000

8192

OLLAMA_NUM_PREDICT

Ollama モデルを予測するための最大トークン。

いいえ

1024

2048

エージェント設定 ( run_browser_agent )

MCP_AGENT_TYPE

run_browser_agentのエージェント実装 ('org' または 'custom')。

いいえ

org

custom

MCP_MAX_STEPS

エージェント実行あたりの最大ステップ数。

いいえ

100

50

MCP_USE_VISION

ビジョン機能(スクリーンショット分析)を有効にします。

いいえ

true

false

MCP_MAX_ACTIONS_PER_STEP

エージェント ステップあたりの最大アクション数。

いいえ

5

10

MCP_KEEP_BROWSER_OPEN

run_browser_agent呼び出し間で、サーバーによって管理されるブラウザを開いたままにします ( MCP_USE_OWN_BROWSER=falseの場合)。

いいえ

false

true

MCP_ENABLE_RECORDING

run_browser_agentの Playwright ビデオ録画を有効にします。

いいえ

false

true

MCP_SAVE_RECORDING_PATH

エージェント実行ビデオ録画を保存するパス ( MCP_ENABLE_RECORDING=trueの場合は必須)。

録音する場合

-

./tmp/recordings

MCP_AGENT_HISTORY_PATH

エージェント履歴 JSON ファイルを保存するディレクトリ。

いいえ

./tmp/agent_history

./agent_runs

MCP_HEADLESS

run_browser_agentツール専用に UI なしでブラウザを実行します。

いいえ

true

false

MCP_DISABLE_SECURITY

run_browser_agentツール専用のブラウザ セキュリティ機能を無効にします (慎重に使用してください)。

いいえ

true

false

ディープリサーチ設定 ( run_deep_search )

MCP_RESEARCH_MAX_ITERATIONS

深い調査のための最大検索反復。

いいえ

10

5

MCP_RESEARCH_MAX_QUERY

反復ごとの最大検索クエリ数。

いいえ

3

5

MCP_RESEARCH_USE_OWN_BROWSER

リサーチには別のブラウザ インスタンスを使用します ( MCP_USE_OWN_BROWSER=trueの場合はCHROME_CDPが必要です)。

いいえ

false

true

MCP_RESEARCH_SAVE_DIR

研究成果物 (レポート、結果) を保存するためのディレクトリ。

いいえ

./tmp/deep_research/{task_id}

./research_output

MCP_RESEARCH_AGENT_MAX_STEPS

ディープリサーチ内のサブエージェントの最大ステップ数。

いいえ

10

15

ブラウザ設定(一般および特定のツールのオーバーライド)

MCP_USE_OWN_BROWSER

新しいブラウザを起動するのではなく、 CHROME_CDP経由でユーザーのブラウザに接続するには、true に設定します。

いいえ

false

true

CHROME_CDP

DevTools プロトコル URL 経由で既存の Chrome に接続します。MCP_USE_OWN_BROWSER MCP_USE_OWN_BROWSER=trueの場合に必須です。

MCP_USE_OWN_BROWSER=true場合

-

http://localhost:9222

BROWSER_HEADLESS

UIを表示せずにブラウザを実行します。主にrun_deep_search影響します。MCP_HEADLESS MCP_HEADLESS参照してください。

いいえ

true

false

BROWSER_DISABLE_SECURITY

ブラウザの一般的なセキュリティ設定。MCP_DISABLE_SECURITY MCP_DISABLE_SECURITY参照してください。

いいえ

false

true

CHROME_PATH

Chrome/Chromium 実行可能ファイルへのパス。

いいえ

-

/usr/bin/chromium-browser

CHROME_USER_DATA

Chrome ユーザー データ ディレクトリへのパス (永続セッション用、 CHROME_CDPで便利)。

いいえ

-

~/.config/google-chrome/Profile 1

BROWSER_TRACE_PATH

Playwright トレース ファイルを保存するディレクトリ (デバッグに役立ちます)。

いいえ

./tmp/trace

./traces

BROWSER_WINDOW_WIDTH

ブラウザウィンドウの幅(ピクセル)。

いいえ

1280

1920

BROWSER_WINDOW_HEIGHT

ブラウザウィンドウの高さ(ピクセル)。

いいえ

720

1080

サーバーとログ

LOG_FILE

サーバー ログ ファイルのパス。

いいえ

mcp_server_browser_use.log

/var/log/mcp_browser.log

BROWSER_USE_LOGGING_LEVEL

ログレベル ( DEBUG 、 INFO 、 WARNING 、 ERROR 、 CRITICAL )。

いいえ

INFO

DEBUG

ANONYMIZED_TELEMETRY

匿名化されたテレメトリを有効/無効にします ( true / false )。

いいえ

true

false

サポートされている LLM プロバイダー ( MCP_MODEL_PROVIDER ):

openai 、 azure_openai 、 anthropic 、 google 、 mistral 、 ollama 、 deepseek 、 openrouter 、 alibaba 、 moonshot 、 unbound

独自のブラウザへの接続(CDP)

サーバーが独自のブラウザインスタンスを起動・管理する代わりに、ユーザーが自分で起動・管理するChrome/Chromiumブラウザに接続できます。これは以下の場合に便利です。

  • 既存のブラウザ プロファイル (Cookie、ログイン、拡張機能) を使用します。

  • 自分のブラウザ ウィンドウで自動化を直接観察します。

  • 複雑なシナリオのデバッグ。

手順:

  1. **リモートデバッグを有効にしてChrome/Chromiumを起動します。**ターミナルまたはコマンドプロンプトを開き、お使いのOSに適したコマンドを実行します。これにより、Chromeは特定のポート(例:9222)で接続をリッスンするようになります。

    • macOS:

      /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

      (Chrome が他の場所にインストールされている場合はパスを調整してください)

    • リナックス:

      google-chrome --remote-debugging-port=9222
      # or
      chromium-browser --remote-debugging-port=9222
    • Windows (コマンドプロンプト):

      "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222

      (必要に応じてChromeのインストールパスを調整してください)

    • Windows (PowerShell):

      & "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222

      (必要に応じてChromeのインストールパスを調整してください)

    **注:**ポート 9222 がすでに使用されている場合は、別のポート (例: 9223) を選択し、 CHROME_CDP環境変数で同じポートを使用します。

  2. 環境変数を構成する: MCP サーバーを起動する前に、 .envファイルまたはシステム環境で次の環境変数を設定します。

    MCP_USE_OWN_BROWSER=true
    CHROME_CDP=http://localhost:9222 # Use the same port you launched Chrome with
    • MCP_USE_OWN_BROWSER=true : ブラウザを起動するのではなく、既存のブラウザに接続するようにサーバーに指示します。

    • CHROME_CDP : サーバーがブラウザの DevTools プロトコル エンドポイントに接続できる URL を指定します。

  3. **MCP サーバーを実行します。**通常どおりサーバーを起動します。

    uv run mcp-server-browser-use

これで、 run_browser_agentまたはrun_deep_searchツールを使用すると、サーバーは新しいインスタンスを作成するのではなく、実行中の Chrome インスタンスに接続するようになります。

重要な考慮事項:

  • --remote-debugging-portで起動したブラウザは、MCP サーバーが実行中であり、MCP サーバーと対話する必要がある間は開いたままにしておく必要があります。

  • MCP サーバーが実行されている場所からCHROME_CDP URL にアクセスできることを確認します (同じマシンで実行されている場合は通常http://localhost:PORT )。

  • 独自のブラウザを使用する場合、サーバーはそのブラウザの状態(開いているタブ、ログイン中のセッションなど)を継承します。自動化を行う際は、この点にご注意ください。

  • MCP_HEADLESS 、 BROWSER_HEADLESS 、 MCP_KEEP_BROWSER_OPENなどの設定はMCP_USE_OWN_BROWSER=trueの場合無視されます。ウィンドウサイズはブラウザウィンドウによって決まります。

発達

# Install dev dependencies and sync project deps
uv sync --dev

# Install playwright browsers
uv run playwright install

# Run with debugger (Example connecting to own browser via CDP)
# 1. Launch Chrome: google-chrome --remote-debugging-port=9222
# 2. Run inspector command:
npx @modelcontextprotocol/inspector@latest \
  -e OPENROUTER_API_KEY=$OPENROUTER_API_KEY \
  -e MCP_MODEL_PROVIDER=openrouter \
  -e MCP_MODEL_NAME=anthropic/claude-3.7-sonnet \
  -e MCP_USE_OWN_BROWSER=true \
  -e CHROME_CDP=http://localhost:9222 \
  uv --directory . run mcp run src/mcp_server_browser_use/server.py
# Note: Change timeout in inspector's config panel if needed (default is 10 seconds)

トラブルシューティング

  • ブラウザの競合: CHROME_CDP ( MCP_USE_OWN_BROWSER=false ) を使用していない場合、 CHROME_USER_DATAが指定されているときは、同じユーザー データ ディレクトリで競合する他の Chrome インスタンスが実行されていないことを確認してください。

  • CDP 接続の問題: MCP_USE_OWN_BROWSER=true使用している場合:

    • Chrome が--remote-debugging-portフラグを使用して起動されたことを確認します。

    • CHROME_CDPのポートが Chrome の起動時に使用されるポートと一致していることを確認します。

    • 指定されたポートへの接続をブロックするファイアウォールの問題を確認します。

    • ブラウザがまだ実行されていることを確認してください。

  • APIエラー:選択したMCP_MODEL_PROVIDERに正しいAPIキー環境変数( OPENAI_API_KEY 、 ANTHROPIC_API_KEYなど)が設定されているか、またはMCP_API_KEYが設定されていることを確認してください。キーとエンドポイントを確認してください(Azureの場合はAZURE_OPENAI_ENDPOINTが必要です)。

  • ビジョンの問題: ビジョン機能を使用する場合はMCP_USE_VISION=trueあり、選択した LLM モデルがビジョンをサポートしていることを確認します。

  • 依存関係の問題: uv syncを実行して、すべての依存関係が正しくインストールされていることを確認してくださいpyproject.tomlを確認してください。

  • ログ記録:詳細なエラーメッセージについては、 LOG_FILE (デフォルト: mcp_server_browser_use.log )で指定されたログファイルを確認してください。より詳細な出力を得るには、 BROWSER_USE_LOGGING_LEVELをDEBUGに上げてください。

ライセンス

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

Available Tools

1 tool
run_browser_agentD

Handle run-browser-agent tool calls.

ParametersJSON Schema
NameRequiredDescriptionDefault
add_infosNo
taskYes

TDQS

D1.3/5.0
Behavior1/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 but fails completely. It doesn't indicate whether this is a read or write operation, what side effects it might have, what permissions are required, or what the expected behavior is. The phrase 'Handle... tool calls' is too vague to convey any meaningful behavioral information.

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

Conciseness2/5

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

While the description is technically concise (only 5 words), this represents under-specification rather than effective brevity. The single sentence doesn't earn its place by providing meaningful information. A truly concise description would still convey essential purpose and usage information in minimal words, which this fails to do.

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

Completeness1/5

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

Given a tool with 2 parameters, no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It provides no information about what the tool does, how to use it, what parameters mean, or what to expect from its operation. The description fails to compensate for any of the missing structured information.

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

Parameters1/5

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

The schema description coverage is 0%, meaning neither parameter has any description in the schema. The tool description provides no information about what the 'task' or 'add_infos' parameters mean, what format they should take, or how they affect the tool's operation. For a tool with 2 parameters and zero schema documentation, this represents a complete failure to add parameter semantics.

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

Purpose2/5

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

The description 'Handle run-browser-agent tool calls' is essentially a tautology that restates the tool name without explaining what the tool actually does. It doesn't specify what 'run-browser-agent' means, what resources it operates on, or what action it performs. While it mentions 'tool calls', this adds no meaningful information beyond the name itself.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance on when to use this tool, what context it's appropriate for, or what alternatives might exist. There are no sibling tools mentioned, but even for a standalone tool, the description fails to give any indication of its intended use case or prerequisites.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedrun_browser_agent

TDQS

D1.8/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'run_browser_agent' has a clearly distinct purpose with no other tools to confuse it with.

Naming Consistency5/5

The naming pattern cannot be inconsistent with only one tool. The tool name 'run_browser_agent' follows a clear verb_noun pattern, and there are no other tools to deviate from this convention.

Tool Count2/5

A single tool is too few for a server named 'Browser-Use MCP Server', which suggests a broader scope for browser automation. One tool feels thin and inadequate for handling various browser-related tasks like navigation, clicking, or form filling.

Completeness1/5

The tool set is severely incomplete for browser automation. With only a 'run_browser_agent' tool, there are obvious gaps in basic operations such as opening pages, interacting with elements, or retrieving content, making it impossible for agents to perform typical browser tasks.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables browser automation with anti-detection features, including navigation, interaction, form filling, and session management.
    22
    26 PyPI
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides cloud browser automation capabilities for AI agents, including creating, managing, and retrieving recordings and logs from browser sessions.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables browser automation for AI assistants via Playwright, supporting multiple browsers, sessions, and tools for web interaction and testing.
    1,029 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables plain-English browser automation via an MCP server, allowing agents to run objectives or test suites in a real browser without selectors or scripts.
    63 npm
    2
    Apache 2.0