Browser Use Server
ブラウザ使用サーバー
Pythonスクリプトを使用したブラウザ自動化のためのモデルコンテキストプロトコルサーバー。Clineで使用
特徴
ブラウザ操作
screenshot: ウェブページ(全ページまたはビューポート)のスクリーンショットをキャプチャしますget_html: ウェブページのHTMLコンテンツを取得するexecute_js: ウェブページでJavaScriptを実行するget_console_logs: Webページからコンソールログを取得する
すべての操作は、ページの読み込み後のカスタム インタラクション ステップ (要素のクリック、スクロールなど) をサポートします。
Related MCP server: Playwright MCP Server for Security
前提条件
(オプションですが推奨) ヘッドレス ブラウザ自動化用に Xvfb をインストールします。
# Ubuntu/Debian
sudo apt-get install xvfb
# CentOS/RHEL
sudo yum install xorg-x11-server-Xvfb
# Arch Linux
sudo pacman -S xorg-server-xvfbXvfb(X Virtual Frame Buffer)は仮想ディスプレイを作成し、ボットとして検知されることなくブラウザの自動化を可能にします。Xvfbの詳細については、こちらをご覧ください。
MinicondaまたはAnacondaをインストールする
Conda 環境を作成します。
conda create -n browser-use python=3.11
conda activate browser-use
pip install -r requirements.txtLLM 構成をセットアップします。
サーバーは複数のLLMプロバイダーをサポートしています。以下のAPIキーのいずれかを使用できます。
# Required: Set at least one of these API keys
export GLHF_API_KEY=your_api_key
export GROQ_API_KEY=your_api_key
export OPENAI_API_KEY=your_api_key
export OPENROUTER_API_KEY=your_api_key
export GITHUB_API_KEY=your_api_key
export DEEPSEEK_API_KEY=your_api_key
export GEMINI_API_KEY=your_api_key
export OLLAMA_API_KEY=your_api_key
# Optional: Override default configuration
export MODEL=your_preferred_model # Override the default model
export BASE_URL=your_custom_url # Override the default API endpoint
export USE_VISION=false # Enable/disable vision capabilities (default: false)サーバーは最初に見つかった利用可能なAPIキーを自動的に使用します。オプションで、環境変数を使用して、プロバイダーのモデルとベースURLをカスタマイズできます。
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の Browser Use Server を自動的にインストールするには:
npx -y @smithery/cli install @ztobs/cline-browser-use-mcp --client claudeこのリポジトリを
/home/YOUR_HOME/Documents/Cline/ディレクトリにクローンします。依存関係をインストールします:
npm installサーバーを構築します。
npm run buildMCP構成
Cline MCP 設定に次の構成を追加します。
"browser-use": {
"command": "node",
"args": [
"/home/YOUR_HOME/Documents/Cline/MCP/browser-use-server/build/index.js"
],
"env": {
// Required: Set at least one API key
"GLHF_API_KEY": "your_api_key",
"GROQ_API_KEY": "your_api_key",
"OPENAI_API_KEY": "your_api_key",
"OPENROUTER_API_KEY": "your_api_key",
"GITHUB_API_KEY": "your_api_key",
"DEEPSEEK_API_KEY": "your_api_key",
"GEMINI_API_KEY": "your_api_key",
"OLLAMA_API_KEY": "your_api_key",
// Optional: Configuration overrides
"MODEL": "your_preferred_model",
"BASE_URL": "your_custom_url",
"USE_VISION": "false"
},
"disabled": false,
"autoApprove": []
}交換する:
YOUR_HOME実際のホームディレクトリ名に置き換えますyour_api_key実際の API キーに置き換えます
使用法
サーバーを実行します。
node build/index.jsサーバーは stdio で利用可能になり、次の操作をサポートします。
スクリーンショット
パラメータ:
url: ウェブページのURL(必須)
full_page: ページ全体をキャプチャするか、ビューポートのみをキャプチャするか(オプション、デフォルト: false)
手順: ページの読み込み後に実行する手順をカンマで区切って記述するアクションまたは文章(オプション)
HTMLを取得
パラメータ:
url: ウェブページのURL(必須)
手順: ページの読み込み後に実行する手順をカンマで区切って記述するアクションまたは文章(オプション)
JavaScriptを実行する
パラメータ:
url: ウェブページのURL(必須)
スクリプト: 実行する JavaScript コード (必須)
手順: ページの読み込み後に実行する手順をカンマで区切って記述するアクションまたは文章(オプション)
コンソールログを取得する
パラメータ:
url: ウェブページのURL(必須)
手順: ページの読み込み後に実行する手順をカンマで区切って記述するアクションまたは文章(オプション)
クラインの使用例
Cline でブラウザ用サーバーを使用して実行できるタスクの例を次に示します。
開発中のWebページ要素の変更
認証が必要なページの見出しの色を変更するには:
Change the colour of the headline with the text "Alle Foren im Überblick." to deep blue on https://localhost:3000/foren/ page
To check/see the page, use browser-use MCP server to:
Open https://localhost:3000/auth,
Login with ztobs:Password123,
Navigate to https://localhost:3000/foren/,
Accept cookies if required
hint: execute all browser actions in one command with multiple comma-separated stepsこのタスクでは次のことを示します。
カンマ区切りのステップを使用した複数ステップのブラウザ自動化
認証処理
クッキーの承認
DOM操作
CSSスタイルの変更
サーバーはこれらのステップを順番に実行し、その途中で必要なやり取りを処理します。
構成
LLM 構成
サーバーは、デフォルト構成で複数の LLM プロバイダーをサポートします。
GLHF: deepseek-ai/DeepSeek-V3 モデルを使用
Ollama: 32k コンテキスト ウィンドウの qwen2.5:32b-instruct-q4_K_M モデルを使用します
Groq: deepseek-r1-distill-llama-70b モデルを使用
OpenAI: gpt-4o-mini モデルを使用
Openrouter: deepseek/deepseek-chat モデルを使用
Github: gpt-4o-mini モデルを使用
DeepSeek: deepseek-chat モデルを使用
Gemini: gemini-2.0-flash-exp モデルを使用
環境変数を使用してこれらのデフォルトを上書きできます。
MODEL: 任意のプロバイダーのカスタムモデル名を設定しますBASE_URL: カスタム API エンドポイント URL を設定します (プロバイダーがサポートしている場合)
視力サポート
サーバーは、USE_VISION 環境変数を通じてビジョン機能をサポートします。
ブラウザ操作のビジョン機能を有効にするには、USE_VISION=true を設定します。
ビジョンが必要ない場合にパフォーマンスを最適化するために、デフォルトは false です。
ウェブページのコンテンツを視覚的に理解する必要があるタスクに役立ちます
Xvfb サポート
サーバーは、Xvfb がインストールされているかどうかを自動的に検出し、次の操作を実行します。
利用可能な場合は xvfb-run を使用し、ボット検出なしでブラウザの自動化を改善します。
Xvfbがインストールされていない場合は直接実行にフォールバックします
RUNNING_UNDER_XVFB環境変数を適宜設定します
タイムアウト
デフォルトのタイムアウトは5分(300000ミリ秒)です。これを変更するには、 build/index.jsのTIMEOUT定数を変更してください。
エラー処理
サーバーは、次の詳細なエラー メッセージを提供します。
Pythonスクリプトの実行失敗
ブラウザ操作のタイムアウト
無効なパラメータ
デバッグ
デバッグには MCP インスペクタを使用します。
npm run inspector用途
ライセンス
マサチューセッツ工科大学
Available Tools
4 toolsexecute_jsC
Execute JavaScript code on a webpage
Inputs: url (required), script (required), steps.
get_console_logsC
Get the console logs of a webpage
Inputs: url (required), steps.
get_htmlC
Get the HTML content of a webpage
Inputs: url (required), steps.
screenshotC
Take a screenshot of a webpage
Inputs: url (required), full_page, steps.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: execute_js runs code, get_console_logs retrieves logs, get_html fetches content, and screenshot captures visual output. There is no overlap or ambiguity between these functions.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., execute_js, get_console_logs, get_html, screenshot). The naming is predictable and readable throughout.
With 4 tools, this server is well-scoped for browser automation, covering key operations like executing scripts, retrieving logs, getting content, and taking screenshots. Each tool earns its place without being excessive or insufficient.
The tool set covers essential browser interactions for the domain, including execution, logging, content retrieval, and visualization. A minor gap exists in navigation or page manipulation tools (e.g., navigate, click), but core workflows are well-supported.
Maintenance
Related MCP Connectors
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
A real browser for your agent: screenshots, page checks, Markdown and PDFs.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables browser automation and web scraping through Playwright, supporting navigation, screenshots, element interaction, form filling, JavaScript execution, and content extraction.8Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to perform browser automation tasks including web scraping, taking screenshots, and executing JavaScript using Playwright. It facilitates real-time interaction with web pages and the generation of automated test code.27 npmMIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to control a browser for web automation tasks like navigation, typing, clicking, and taking screenshots.Apache 2.0
- AlicenseBqualityDmaintenanceEnables browser automation using Playwright, including navigation, screenshots, clicking, form filling, and JavaScript execution.8Apache 2.0