Browser Automation MCP Server
🤖 ブラウザ自動化エージェント
MCP(モデル制御プログラム)をベースに構築された強力なブラウザ自動化ツール。ウェブスクレイピング機能とLLMベースのインテリジェンスを組み合わせます。このエージェントは、Google検索、ウェブページへのナビゲーション、GitHub、Stack Overflow、ドキュメントサイトなど、様々なウェブサイトからコンテンツをインテリジェントにスクレイピングできます。
🚀 機能
🔍 Google 検索統合: あらゆるクエリに対する上位の検索結果を検索して取得します
🕸️ インテリジェントな Web スクレイピング: さまざまな Web サイトの種類に合わせたスクレイピング戦略:
📂 GitHubリポジトリ
💬 Stack Overflow の質問と回答
📚 ドキュメントページ
🌐 一般的なウェブサイト
🧠 AIを活用した処理:スクレイピングしたコンテンツの理解と処理にMistral AIを使用
🥷 ステルスモード: ブラウザの指紋保護を実装し、検出を回避します
💾 コンテンツ保存: スクレイピングしたページのスクリーンショットとテキストコンテンツの両方を自動的に保存します
Related MCP server: Web Search MCP
🏗️ 建築
このプロジェクトでは、MCP を利用したクライアント サーバー アーキテクチャを使用します。
🖥️ サーバー: ブラウザの自動化とWebスクレイピングタスクを処理します
👤 クライアント: Mistral AI と LangGraph を使用して AI インターフェースを提供します
📡 通信: クライアント・サーバー通信にstdioを使用する
⚙️ 要件
🐍 Python 3.8 以上
🎭 劇作家
🧩 MCP(モデル制御プログラム)
🔑 ミストラル AI API キー
📥 インストール
リポジトリをクローンします。
git clone https://github.com/yourusername/browser-automation-agent.git
cd browser-automation-agent依存関係をインストールします:
pip install -r requirements.txtPlaywright ブラウザをインストールします。
playwright installプロジェクト ルートに
.envファイルを作成し、Mistral AI API キーを追加します。
MISTRAL_API_KEY=your_api_key_here📋 使用方法
サーバーの実行
python main.pyクライアントの実行
python client.pyサンプルインタラクション
サーバーとクライアントの両方が実行されたら:
プロンプトが表示されたらクエリを入力してください
エージェントは次のことを行います。
🔍 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_scrapeでwidthとheight調整します👻 ヘッドレスモード: ブラウザ操作を非表示にするには
headless=Trueを設定します🔢 Google検索結果の数:
get_top_google_urlのnum_resultsを変更する
❓ トラブルシューティング
🔌 接続の問題: サーバーとクライアントが別々のターミナルで実行されていることを確認してください
🎭 Playwright エラー: ブラウザに
playwright installされていることを確認してください🔑 APIキーエラー: Mistral APIキーが
.envファイルに正しく設定されていることを確認してください🛣️ パスエラー: 必要に応じて
client.py内のmain.pyへのパスを更新してください
📜 ライセンス
🤝 貢献する
貢献を歓迎します!お気軽にプルリクエストを送信してください。
🧩 MCP、🎭 Playwright、🧠 Mistral AI で構築
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Web data for agents: YouTube transcripts, screenshots, Google News, WHOIS, jobs, tech stack, more.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables web searching and content scraping through Google Custom Search API. Provides tools to search the internet, extract webpage content, and automatically scrape search results for comprehensive information gathering.3-
- AlicenseNot gradedqualityDmaintenanceEnables web searching through Google, DuckDuckGo, and Bing using a headless Chrome browser, returning structured results with titles, URLs, and snippets. Also supports fetching and extracting text content from any webpage.16MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to fetch and extract web content using browser automation, OCR, and multiple extraction methods, handling JavaScript rendering and anti-scraping techniques.17MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to control a browser for web automation tasks like navigation, typing, clicking, and taking screenshots.-