Skip to main content
Glama

Web2Actions

Webサイトを、あなたのAIエージェントが使えるMCPサーバーに変換 — APIは不要です。

Web2Actionsは、Webサイトのブラウザトラフィックを監視し、サイトの実際のネットワークエンドポイントをリバースエンジニアリングして、Model Context Protocol (MCP) 経由でAIエージェントが呼び出せる名前付きツール群にまとめます。公開APIは必要ありません。

動作の仕組み

  1. キャプチャ — サイトに一度ログインし、ブラウザのトラフィックを記録します。

  2. 生成 — LLMがキャプチャしたトラフィックを、入力・出力・リスクタグを持つクリーンな名前付きツールとしてコネクタ定義に変換します。

  3. 検証 — すべてのツールをライブサイトに対してスモークテストします。

  4. 公開 — 検証済みのコネクタを標準的なMCPサーバーとして公開します。

キャプチャは人が行うものであり、自動ではありません。 すべてのボタンを推測したり、あなたの代わりにサイトをクリックしたりはしません。実際のブラウザがあなたのマシン上で開き、あなた自身がログインしてツールにしたい操作を行い、そのトラフィックを記録します。この考え方はホスト型プロダクトでも同じで、それはあなたが操作するポップアップブラウザです。CLIはそのブラウザを実行するだけです。

Related MCP server: Clarity MCP Server

インストール

pip install -e .

コマンド

すべてのコマンドは web2actions <command> [options] の形式です。

model — LLMプロバイダーとモデルを選択します(保存されます)

web2actions model                       # show current
web2actions model google/gemini-2.5-flash   # set default model (persisted)
web2actions model --provider openrouter # set default provider
web2actions model --alias sonnet=anthropic/claude-sonnet-4  # alias
web2actions model --aliases             # list aliases

capture — サイトのトラフィックを記録します

URLのブラウザを開き、ログインやクリック中に発生したネットワークトラフィックを記録し、JSONダンプを書き出します。

# Open the site; log in and click around manually; press Enter when done.
web2actions capture https://app.example.com

# Filter out analytics/static noise and save to a chosen file.
web2actions capture https://app.example.com --filter -o dump.json

# Automate a simple form login (fill + submit), then continue capturing.
web2actions capture https://app.example.com --login \
  --username you@example.com --password "..." \
  --username-selector "#username" --password-selector "#password" \
  --submit-selector "#submit-btn" --success-indicator "#dashboard"

オプション: --login, --username, --password, --username-selector, --password-selector, --submit-selector, --success-indicator, --filter, --output/-o。

generate — キャプチャしたトラフィックをコネクタ定義に変換します

web2actions generate dump.json --model claude-sonnet-4 -o connector.json

オプション: --model(または WEB2ACTIONS_MODEL 環境変数)、--output/-o。

validate — コネクタをスキーマに対して検証します

web2actions validate connector.json
# -> VALID

serve — コネクタをMCPサーバー(stdio)として公開します

web2actions serve connector.json

コネクタをstdio経由でAIエージェントのMCPクライアントに接続します。

エンドツーエンドの例

web2actions capture https://example.com --filter -o dump.json
web2actions generate dump.json --model claude-sonnet-4 -o connector.json
web2actions validate connector.json
web2actions serve connector.json

既存の例から始める(キャプチャ不要)

web2actions validate connector-spec/examples/simple-crm.json
web2actions serve connector-spec/examples/simple-crm.json

ご自身のLLMを持ち込む(BYOK)

Web2Actionsはlitellmを利用しています。litellmは、OpenAI互換という単一のインターフェースを介して100以上のプロバイダーに接続します。コマンドだけでプロバイダーとモデルを選択できるため、コードの変更は不要で、選択内容は次回以降の実行にも保持されます。

サポートされているプロバイダー

litellmは**OpenAI、Anthropic、Google Gemini、OpenRouter、DeepSeek、Groq、xAI、Mistral、OpenAI互換のローカルサーバー(Ollama / llama.cpp / vLLM)、Bedrock、Azureなど、**100以上のプロバイダーをサポートしています。

各プロバイダーは標準のAPIキー環境変数(例: OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENROUTER_API_KEY, DEEPSEEK_API_KEY, GROQ_API_KEY, XAI_API_KEY)を読み取ります。ローカルサーバーの場合はキーがまったく不要です。

簡単なコマンドでデフォルトモデルを設定する

# Pick a provider + model once; it is remembered (saved to ~/.web2actions/config.toml)
web2actions model openai/gpt-4o-mini
web2actions model anthropic/claude-sonnet-4
web2actions model gemini/gemini-2.5-flash
web2actions model openrouter/anthropic/claude-sonnet-4
web2actions model deepseek/deepseek-chat

# Show the current model
web2actions model

# Set a default provider
web2actions model --provider openrouter

# Add a short alias, then use it anywhere
web2actions model --alias sonnet=anthropic/claude-sonnet-4
web2actions generate dump.json --model sonnet

# List your aliases
web2actions model --aliases

一度設定すると、generate はそのモデルを自動的に使用します:

web2actions model google/gemini-2.5-flash
export GEMINI_API_KEY=...            # only needed the first time, per provider
web2actions generate dump.json       # uses gemini-2.5-flash

実行ごとに上書きする

1回のコマンドで別のプロバイダー/モデルを使用するには --model を渡すか、WEB2ACTIONS_MODEL 環境変数を設定します。優先順位は --model > WEB2ACTIONS_MODEL > 保存済み設定です。

web2actions generate dump.json --model openai/gpt-4o-mini

キーが設定されていない場合

generate は丁寧に失敗し、どのキーを設定すればよいかを教えます。生のスタックトレースでクラッシュすることはありません。

リポジトリ構成

  • connector-spec/ — コネクタ定義スキーマ+バリデータ

  • capture/ — ブラウザセッション+トラフィック記録+ノイズフィルタリング

  • generate/ — LLM抽出(低コスト経路)+サンドボックス化されたフォールバック

  • validate/ — ライブツールのスモークテスト+リスクタグ付け

  • mcp-runtime/ — あらゆるコネクタを提供する共有MCPサーバー

  • cli/ — web2actions コマンドラインラッパー

ライセンス

Apache-2.0。オープンソースのCLI-Anything / CLI-Anything-Webプロジェクトを基盤に作成しています。

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers