Browser-Use MCP Server
ブラウザ用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 uvChrome/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ツール
このサーバーは、モデル コンテキスト プロトコルを介して次のツールを公開します。
同期ツール(完了を待つ)
run_browser_agent**説明:**自然言語指示に基づいてブラウザ自動化タスクを実行し、完了するまで待機します。MCP_
MCP_HEADLESS``MCP_``MCP_MAX_STEPS)。引数:
task(文字列、必須): 主なタスクまたは目的。add_infos(文字列、オプション): エージェントの追加コンテキストまたはヒント (customエージェント タイプで使用)。
戻り値: (文字列) エージェントによって抽出された最終結果またはエラー メッセージ。
run_deep_search**説明:**特定のトピックについて詳細なウェブ調査を行い、レポートを生成して完了を待ちます。MCP_RESEARCH_
MCP_RESEARCH_始まる設定と、BROWSER_一般的な設定(例:BROWSER_HEADLESS)を使用します。引数:
research_task(文字列、必須): 研究のトピックまたは質問。max_search_iterations(整数、オプション、デフォルト: 10): 最大検索サイクル。max_query_per_iteration(整数、オプション、デフォルト: 3): サイクルあたりの最大検索クエリ数。
戻り値: (文字列) ファイル パスまたはエラー メッセージを含む、Markdown 形式で生成された調査レポート。
設定(環境変数)
環境変数を使用してサーバーを設定します。これらの環境変数はシステム内で設定することも、プロジェクトルートにある.envファイルに配置することもできます。
変数 | 説明 | 必須? | デフォルト値 | サンプル値 |
LLM設定 | ||||
| 使用するLLMプロバイダー。以下のオプションを参照してください。 | はい |
|
|
| 選択したプロバイダーの特定のモデル名。 | いいえ |
|
|
| LLM温度(0.0~2.0)。ランダム性を制御します。 | いいえ |
|
|
| ツール呼び出しメソッド('auto'、'json_schema'、'function_calling')。 | いいえ |
|
|
|
| いいえ |
|
|
| オプション: LLM プロバイダーのベース URL の一般的なオーバーライド。 | いいえ | プロバイダー固有 |
|
| オプション: LLM プロバイダーの API キーの一般的なオーバーライド (プロバイダー固有のキーよりも優先されます)。 | いいえ | - |
|
プロバイダーAPIキー |
| |||
| OpenAI の API キー。 | 使用する場合 | - |
|
| Anthropic の API キー。 | 使用する場合 | - |
|
| Google AI (Gemini) の API キー。 | 使用する場合 | - |
|
| Azure OpenAI の API キー。 | 使用する場合 | - |
|
| DeepSeek の API キー。 | 使用する場合 | - |
|
| Mistral AI の API キー。 | 使用する場合 | - |
|
| OpenRouter の API キー。 | 使用する場合 | - |
|
| Alibaba Cloud (DashScope) の API キー。 | 使用する場合 | - |
|
| Moonshot AI の API キー。 | 使用する場合 | - |
|
| Unbound AI の API キー。 | 使用する場合 | - |
|
プロバイダーエンドポイント | オプション: デフォルトの API エンドポイントをオーバーライドします。 | |||
| OpenAI API エンドポイント URL。 | いいえ |
| |
| Anthropic API エンドポイント URL。 | いいえ |
| |
| Azure を使用する場合は必須です。Azureリソースのエンドポイント。 | 使用する場合 | - |
|
| Azure API バージョン。 | いいえ |
|
|
| DeepSeek API エンドポイント URL。 | いいえ |
| |
| Mistral API エンドポイント URL。 | いいえ |
| |
| Ollama API エンドポイント URL。 | いいえ |
|
|
| OpenRouter API エンドポイント URL。 | いいえ |
| |
| Alibaba (DashScope) API エンドポイント URL。 | いいえ |
| |
| Moonshot API エンドポイント URL。 | いいえ |
| |
| バインドされていない AI API エンドポイント URL。 | いいえ |
| |
オラマ特有の | ||||
| Ollama モデルのコンテキスト ウィンドウのサイズ。 | いいえ |
|
|
| Ollama モデルを予測するための最大トークン。 | いいえ |
|
|
エージェント設定 ( | ||||
|
| いいえ |
|
|
| エージェント実行あたりの最大ステップ数。 | いいえ |
|
|
| ビジョン機能(スクリーンショット分析)を有効にします。 | いいえ |
|
|
| エージェント ステップあたりの最大アクション数。 | いいえ |
|
|
|
| いいえ |
|
|
|
| いいえ |
|
|
| エージェント実行ビデオ録画を保存するパス ( | 録音する場合 | - |
|
| エージェント履歴 JSON ファイルを保存するディレクトリ。 | いいえ |
|
|
|
| いいえ |
|
|
|
| いいえ |
|
|
ディープリサーチ設定 ( | ||||
| 深い調査のための最大検索反復。 | いいえ |
|
|
| 反復ごとの最大検索クエリ数。 | いいえ |
|
|
| リサーチには別のブラウザ インスタンスを使用します ( | いいえ |
|
|
| 研究成果物 (レポート、結果) を保存するためのディレクトリ。 | いいえ |
|
|
| ディープリサーチ内のサブエージェントの最大ステップ数。 | いいえ |
|
|
ブラウザ設定(一般および特定のツールのオーバーライド) | ||||
| 新しいブラウザを起動するのではなく、 | いいえ |
|
|
| DevTools プロトコル URL 経由で既存の Chrome に接続します。MCP_USE_OWN_BROWSER |
| - |
|
| UIを表示せずにブラウザを実行します。主に | いいえ |
|
|
| ブラウザの一般的なセキュリティ設定。MCP_DISABLE_SECURITY | いいえ |
|
|
| Chrome/Chromium 実行可能ファイルへのパス。 | いいえ | - |
|
| Chrome ユーザー データ ディレクトリへのパス (永続セッション用、 | いいえ | - |
|
| Playwright トレース ファイルを保存するディレクトリ (デバッグに役立ちます)。 | いいえ |
|
|
| ブラウザウィンドウの幅(ピクセル)。 | いいえ |
|
|
| ブラウザウィンドウの高さ(ピクセル)。 | いいえ |
|
|
サーバーとログ | ||||
| サーバー ログ ファイルのパス。 | いいえ |
|
|
| ログレベル ( | いいえ |
|
|
| 匿名化されたテレメトリを有効/無効にします ( | いいえ |
|
|
サポートされている LLM プロバイダー ( MCP_MODEL_PROVIDER ):
openai 、 azure_openai 、 anthropic 、 google 、 mistral 、 ollama 、 deepseek 、 openrouter 、 alibaba 、 moonshot 、 unbound
独自のブラウザへの接続(CDP)
サーバーが独自のブラウザインスタンスを起動・管理する代わりに、ユーザーが自分で起動・管理するChrome/Chromiumブラウザに接続できます。これは以下の場合に便利です。
既存のブラウザ プロファイル (Cookie、ログイン、拡張機能) を使用します。
自分のブラウザ ウィンドウで自動化を直接観察します。
複雑なシナリオのデバッグ。
手順:
**リモートデバッグを有効にして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=9222Windows (コマンドプロンプト):
"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環境変数で同じポートを使用します。環境変数を構成する: MCP サーバーを起動する前に、
.envファイルまたはシステム環境で次の環境変数を設定します。MCP_USE_OWN_BROWSER=true CHROME_CDP=http://localhost:9222 # Use the same port you launched Chrome withMCP_USE_OWN_BROWSER=true: ブラウザを起動するのではなく、既存のブラウザに接続するようにサーバーに指示します。CHROME_CDP: サーバーがブラウザの DevTools プロトコル エンドポイントに接続できる URL を指定します。
**MCP サーバーを実行します。**通常どおりサーバーを起動します。
uv run mcp-server-browser-use
これで、 run_browser_agentまたはrun_deep_searchツールを使用すると、サーバーは新しいインスタンスを作成するのではなく、実行中の Chrome インスタンスに接続するようになります。
重要な考慮事項:
--remote-debugging-portで起動したブラウザは、MCP サーバーが実行中であり、MCP サーバーと対話する必要がある間は開いたままにしておく必要があります。MCP サーバーが実行されている場所から
CHROME_CDPURL にアクセスできることを確認します (同じマシンで実行されている場合は通常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 toolrun_browser_agentD
Handle run-browser-agent tool calls.
| Name | Required | Description | Default |
|---|---|---|---|
| add_infos | No | ||
| task | Yes |
TDQS
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.
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.
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.
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.
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.
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 tool update
v1.0.0- First observed
run_browser_agent
This server cannot be deployed
TDQS
Scored across 1 tool
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.
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.
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.
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
Related MCP Connectors
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
- TabfleetOAuthcom.tabfleet
Launch, inspect, control, and share isolated cloud browsers for your agents.
Undetectable cloud browser sessions for AI agents and scrapers. Navigate, extract, click, captcha.
I do everything related to Browser Automation & Management
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables browser automation with anti-detection features, including navigation, interaction, form filling, and session management.2226 PyPI10MIT
- AlicenseNot gradedqualityDmaintenanceProvides cloud browser automation capabilities for AI agents, including creating, managing, and retrieving recordings and logs from browser sessions.MIT
- AlicenseNot gradedqualityDmaintenanceEnables browser automation for AI assistants via Playwright, supporting multiple browsers, sessions, and tools for web interaction and testing.1,029 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables 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 npm2Apache 2.0