Skip to main content
Glama

Browser Use Server

by ztobs

ブラウザ使用サーバー

Pythonスクリプトを使用したブラウザ自動化のためのモデルコンテキストプロトコルサーバー。Clineで使用

特徴

ブラウザ操作

  • screenshot : ウェブページ(全ページまたはビューポート)のスクリーンショットをキャプチャします
  • get_html : ウェブページのHTMLコンテンツを取得する
  • execute_js : ウェブページでJavaScriptを実行する
  • get_console_logs : Webページからコンソールログを取得する

すべての操作は、ページの読み込み後のカスタム インタラクション ステップ (要素のクリック、スクロールなど) をサポートします。

前提条件

  1. (オプションですが推奨) ヘッドレス ブラウザ自動化用に Xvfb をインストールします。
# Ubuntu/Debian sudo apt-get install xvfb # CentOS/RHEL sudo yum install xorg-x11-server-Xvfb # Arch Linux sudo pacman -S xorg-server-xvfb

Xvfb(X Virtual Frame Buffer)は仮想ディスプレイを作成し、ボットとして検知されることなくブラウザの自動化を可能にします。Xvfbの詳細については、こちらをご覧ください。

  1. MinicondaまたはAnacondaをインストールする
  2. Conda 環境を作成します。
conda create -n browser-use python=3.11 conda activate browser-use pip install -r requirements.txt
  1. LLM 構成をセットアップします。

サーバーは複数の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
  1. このリポジトリを/home/YOUR_HOME/Documents/Cline/ディレクトリにクローンします。
  2. 依存関係をインストールします:
npm install
  1. サーバーを構築します。
npm run build

MCP構成

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

用途

ブラウザの使用

ライセンス

マサチューセッツ工科大学

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Python スクリプトを使用したブラウザの自動化を可能にし、Web ページのスクリーンショットの取得、HTML コンテンツの取得、JavaScript の実行などの操作を提供します。

  1. 特徴
    1. ブラウザ操作
  2. 前提条件
    1. インストール
      1. Smithery経由でインストール
    2. MCP構成
      1. 使用法
        1. スクリーンショット
        2. HTMLを取得
        3. JavaScriptを実行する
        4. コンソールログを取得する
      2. クラインの使用例
        1. 開発中のWebページ要素の変更
      3. 構成
        1. LLM 構成
        2. 視力サポート
        3. Xvfb サポート
        4. タイムアウト
      4. エラー処理
        1. デバッグ
          1. 用途
            1. ライセンス

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                Facilitates browser automation with custom capabilities and agent-based interactions, integrated through the browser-use library.
                Last updated -
                1
                646
                Python
                MIT License
                • Apple
              • A
                security
                A
                license
                A
                quality
                Enables browser automation with Puppeteer, supporting navigation, form interactions, and connection to active Chrome instances for comprehensive web page interaction.
                Last updated -
                8
                470
                8
                TypeScript
                MIT License
                • Apple
                • Linux
              • -
                security
                A
                license
                -
                quality
                Enables browser automation using the Selenium WebDriver through MCP, supporting browser management, element location, and both basic and advanced user interactions.
                Last updated -
                175
                21
                JavaScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                A browser automation agent that enables Claude to interact with web browsers through the Model Context Protocol, allowing for actions like navigating websites, manipulating elements, and managing browser state.
                Last updated -
                2
                Python
                MIT License
                • Apple

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/ztobs/cline-browser-use-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server