0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Web-Runner-mcp: AIのための高度なWebブラウザ操作プロトコル

Last updated at Posted at 2025-04-12

Github
https://github.com/sinzy0925/web-runner-mcp

Web-Runner-mcp: AIのための高度なWebブラウザ操作プロトコル

を紹介させてください。

  • タロ.AIのPlaywrightでのスクレイピングアプリの作り方をそのままアプリ化しました。

  • 予め、ブラウザで操作する内容をJSONで作成して、その通り実行するツールです。
    JSONの作り方は、youtubeで説明しています。

https://www.youtube.com/watch?v=UM2SeexM5lE
動画では、Web-Runner-Powered-by-PlayWrightと言ってますが、同じものです。

サンプルを複数Githubに入れてますので、どんな感じで動き、どんなデータが取れるかすぐに確認できます。

動画でも説明してます。
https://www.youtube.com/watch?v=Qd0OuXy1xCE

手っ取り早く、動きを確認する方法は以下です!!
(分からないところは、ご質問ください!)

1. セットアップ

(1) リポジトリのクローン:

git clone https://github.com/sinzy0925/web-runner-mcp.git
cd web-runner-mcp

(2) Python環境の準備 (Python 3.12 推奨):
※重要
Python 3.13以上ではエラーになります!!!
【重要】

# 仮想環境を作成 (例: venv312)
python -m venv venv312
# 仮想環境をアクティベート
# Windows PowerShell
.\venv312\Scripts\Activate

# Linux/macOS
source venv312/bin/activate

(3) 依存ライブラリのインストール:
requirements.txt ファイルを使ってインストールします。

pip install -r requirements.txt

(4) Playwright ブラウザのインストール:

playwright install

(5) GUIクライアントからの実行
手動でのテストやデバッグには、GUIクライアント (web_runner_mcp_client_GUI.py) が便利です。

ターミナル(仮想環境アクティベート済み)で以下のコマンドを実行します。

python web_runner_mcp_client_GUI.py
  • 起動したウィンドウ上部のドロップダウンリストから実行したいJSONファイルを選択します。

  • 「実行 ▶」ボタンをクリックします。

  • 実行結果が下のテキストエリアに表示されます。

  • 「JSONジェネレーター」ボタンで json_generator.html を開くこともできます。

  • READMEにも書きましたが、いずれJSONファイルを自然言語で作成できるように必ずしますので、しばらくお待ちください!
    (設計はできてます。)

No Scraping No Life !

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?