Skip to main content
Glama

Browser Automation MCP Server

by Raghu6798

🤖 ブラウザ自動化エージェント

MCP(モデル制御プログラム)をベースに構築された強力なブラウザ自動化ツール。ウェブスクレイピング機能とLLMベースのインテリジェンスを組み合わせます。このエージェントは、Google検索、ウェブページへのナビゲーション、GitHub、Stack Overflow、ドキュメントサイトなど、様々なウェブサイトからコンテンツをインテリジェントにスクレイピングできます。

🚀 機能

  • 🔍 Google 検索統合: あらゆるクエリに対する上位の検索結果を検索して取得します

  • 🕸️ インテリジェントな Web スクレイピング: さまざまな Web サイトの種類に合わせたスクレイピング戦略:

    • 📂 GitHubリポジトリ

    • 💬 Stack Overflow の質問と回答

    • 📚 ドキュメントページ

    • 🌐 一般的なウェブサイト

  • 🧠 AIを活用した処理:スクレイピングしたコンテンツの理解と処理にMistral AIを使用

  • 🥷 ステルスモード: ブラウザの指紋保護を実装し、検出を回避します

  • 💾 コンテンツ保存: スクレイピングしたページのスクリーンショットとテキストコンテンツの両方を自動的に保存します

🏗️ 建築

このプロジェクトでは、MCP を利用したクライアント サーバー アーキテクチャを使用します。

  • 🖥️ サーバー: ブラウザの自動化とWebスクレイピングタスクを処理します

  • 👤 クライアント: Mistral AI と LangGraph を使用して AI インターフェースを提供します

  • 📡 通信: クライアント・サーバー通信にstdioを使用する

⚙️ 要件

  • 🐍 Python 3.8 以上

  • 🎭 劇作家

  • 🧩 MCP(モデル制御プログラム)

  • 🔑 ミストラル AI API キー

📥 インストール

  1. リポジトリをクローンします。

git clone https://github.com/yourusername/browser-automation-agent.git cd browser-automation-agent
  1. 依存関係をインストールします:

pip install -r requirements.txt
  1. Playwright ブラウザをインストールします。

playwright install
  1. プロジェクト ルートに.envファイルを作成し、Mistral AI API キーを追加します。

MISTRAL_API_KEY=your_api_key_here

📋 使用方法

サーバーの実行

python main.py

クライアントの実行

python client.py

サンプルインタラクション

サーバーとクライアントの両方が実行されたら:

  1. プロンプトが表示されたらクエリを入力してください

  2. エージェントは次のことを行います。

    • 🔍 Googleで関連する結果を検索する

    • 🧭 上位の結果へ移動

    • 📊 ウェブサイトの種類に基づいてコンテンツをスクレイピングする

    • 📸 スクリーンショットとコンテンツをファイルに保存する

    • 📤 処理済みの情報を返す

🛠️ ツールの機能

get_top_google_url

🔍 Google で検索し、指定されたクエリの上位の結果 URL を返します。

browse_and_scrape

🌐 URL に移動し、Web サイトの種類に基づいてコンテンツをスクレイピングします。

scrape_github

📂 GitHub リポジトリから README コンテンツとコード ブロックを抽出することに特化しています。

scrape_stackoverflow

💬 Stack Overflow ページから質問、回答、コメント、コード ブロックを抽出します。

scrape_documentation

📚 ドキュメントコンテンツとコード例の抽出に最適化されています。

scrape_generic

🌐 一般的な Web サイトから段落テキストとコード ブロックを抽出します。

📁 ファイル構造

browser-automation-agent/ ├── main.py # MCP server implementation ├── client.py # Mistral AI client implementation ├── requirements.txt # Project dependencies ├── .env # Environment variables (API keys) └── README.md # Project documentation

📤 出力ファイル

エージェントは、タイムスタンプ付きの 2 種類の出力ファイルを生成します。

  • 📸 final_page_YYYYMMDD_HHMMSS.png : 最終ページ状態のスクリーンショット

  • 📄 scraped_content_YYYYMMDD_HHMMSS.txt : ページから抽出したテキストコンテンツ

⚙️ カスタマイズ

コード内の次のパラメータを変更できます。

  • 🖥️ ブラウザウィンドウのサイズ: browse_and_scrapewidthheight調整します

  • 👻 ヘッドレスモード: ブラウザ操作を非表示にするにはheadless=Trueを設定します

  • 🔢 Google検索結果の数: get_top_google_urlnum_resultsを変更する

❓ トラブルシューティング

  • 🔌 接続の問題: サーバーとクライアントが別々のターミナルで実行されていることを確認してください

  • 🎭 Playwright エラー: ブラウザにplaywright installされていることを確認してください

  • 🔑 APIキーエラー: Mistral APIキーが.envファイルに正しく設定されていることを確認してください

  • 🛣️ パスエラー: 必要に応じてclient.py内のmain.pyへのパスを更新してください

📜 ライセンス

MITライセンス

🤝 貢献する

貢献を歓迎します!お気軽にプルリクエストを送信してください。


🧩 MCP、🎭 Playwright、🧠 Mistral AI で構築

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Google を検索したり、Web ページに移動したり、GitHub、Stack Overflow、ドキュメント サイトなどのさまざまな Web サイトからコンテンツを抽出したりできるブラウザ自動化ツールを通じて、インテリジェントな Web スクレイピングを可能にします。

  1. 🚀 機能
    1. 🏗️ 建築
      1. ⚙️ 要件
        1. 📥 インストール
          1. 📋 使用方法
            1. サーバーの実行
            2. クライアントの実行
            3. サンプルインタラクション
          2. 🛠️ ツールの機能
            1. get_top_google_url
            2. browse_and_scrape
            3. scrape_github
            4. scrape_stackoverflow
            5. scrape_documentation
            6. scrape_generic
          3. 📁 ファイル構造
            1. 📤 出力ファイル
              1. ⚙️ カスタマイズ
                1. ❓ トラブルシューティング
                  1. 📜 ライセンス
                    1. 🤝 貢献する

                      Related MCP Servers

                      • A
                        security
                        F
                        license
                        A
                        quality
                        Enables browser automation using Python scripts, offering operations like taking webpage screenshots, retrieving HTML content, and executing JavaScript.
                        Last updated -
                        4
                        19
                        • Linux
                      • -
                        security
                        F
                        license
                        -
                        quality
                        Provides AI agents and coding assistants with web crawling and RAG capabilities, allowing them to scrape websites and perform semantic searches on the crawled content.
                        Last updated -
                        2
                      • A
                        security
                        A
                        license
                        A
                        quality
                        Enables AI models to fetch text content from URLs, extract links from web pages, and search the web using Brave Search with automatic content retrieval from top results. Provides comprehensive web scraping and search capabilities with robust error handling.
                        Last updated -
                        5
                        MIT License
                      • -
                        security
                        A
                        license
                        -
                        quality
                        Enables AI agents to perform undetectable browser automation that bypasses Cloudflare, antibots, and social media blocks. Provides 105 tools for element extraction, network debugging, and real-world web scraping with a 98.7% success rate on protected sites.
                        Last updated -
                        72
                        MIT License
                        • Apple
                        • Linux

                      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/Raghu6798/Browser_scrape_mcp'

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