MCPレシピ

MCP Recipes

FourA MCPサーバーをインストールした後、任意のMCP互換クライアント(Claude Desktop、Claude Code、Cursor、Windsurf、VS Code)内で実行できる、すぐに貼り付けて使える5つのプロンプトです。

各レシピは、一般的なスクレイピングジョブのために、foura_singlefoura_proxyfoura_browserの1つ以上をオーケストレーションします。使用方法は2つあります:

  1. 組み込みプロンプトを呼び出す: すべてのMCPクライアントは、サーバーが提供するプロンプトをスラッシュコマンドまたは/promptsパネルとして表示します。プロンプトを選択し、引数を入力して実行します。MCPサーバーはテンプレート化されたワークフローを返し、LLMは適切なツールを使用してそれを実行します。
  2. 以下の文章をコピーして、自身のチャットに貼り付けます。効果は同じですが、見つけやすさは劣ります。

MCPサーバーは、これらをネイティブプロンプトとして同梱しています:scrape_product_pageextract_articlemonitor_pricingcheck_endpoint_healthbulk_fetch_urls

大きなページに関する注意 (v0.2.0+): デフォルトでは、サイズに関係なくレスポンスボディはstructuredContent内にインラインで返されます。これはClaude Desktopを含むすべてのMCPクライアントで動作します。MCPのresources/readをサポートするクライアントを使用していて、かつ大きなページでトークンを節約したい場合は、ツール呼び出しでoffload_large: trueを渡してください。これにより、50 KB以上のレスポンスは、クライアントがオンデマンドで取得するresource_linkとして返されます。以下の組み込みプロンプトは、デフォルト(インライン)を想定しています。

1. 商品ページをスクレイピングする

シングルページアプリケーション(SPA)のサイトや、アンチボットチャレンジの背後にあるページを含む、Eコマースの商品詳細ページ向けです。

組み込み: scrape_product_page(url)

手動プロンプト:

Fetch the product page at <URL> using foura_browser — most product pages are single-page apps and need JavaScript to render.

From the response body extract:
- product title
- price (with currency)
- primary product image URL (absolute, not relative)
- availability / stock status
- product SKU or ID if visible

Return as JSON: {"title": "...", "price": 0, "currency": "USD", "image_url": "...", "in_stock": true, "sku": "..."}

このレシピが適しているケース:価格比較エージェント、再入荷通知ツール、競合分析スプレッドシート。

2. 記事を抽出する

ニュース記事、ブログ投稿、技術ドキュメントなど、ナビゲーション、広告、フッターのノイズがないクリーンな本文を取得したいすべてのケース向けです。

組み込み: extract_article(url)

手動プロンプト:

Fetch <URL> using foura_single with unblocker:true. Most news and blog sites are server-rendered, so HTTP is fastest (200ms-2s).

If foura_single returns a 403, captcha page, or empty content, retry the same URL with foura_proxy (maxTries:3) — it routes through a rotating proxy pool.

From the response, extract:
- headline (the main H1, not the page title bar)
- author byline (may be inside .author, [rel=author], itemprop)
- publication date (look for <time>, .published, or JSON-LD)
- main article body (strip navigation, ads, related-content, footer, comments)
- canonical URL (rel=canonical or og:url)

Return as JSON: {"title": "...", "author": "...", "date_published": "ISO8601", "body": "...", "canonical_url": "..."}

このレシピが適しているケース:リサーチ要約ツール、特定サイト専用のRSS、日々のニュースダイジェスト。

3. 価格を監視する

価格ページや商品のオファー向けで、オプションで目標価格との比較も行えます。

組み込み: monitor_pricing(url, target_price?)

手動プロンプト:

Use foura_proxy with maxTries:5 and unblocker:true to fetch <URL>. Pricing pages often have aggressive bot detection, so go through the proxy pool from the start.

Extract the current price (look for visible $/€/£ amounts, JSON-LD Offer schema, [itemprop=price]).

If a target price is provided, compare: report whether current is below/at/above target and the absolute difference.

Return as JSON: {"url": "...", "current_price": 0.00, "currency": "USD", "target_price": 0, "difference": 0, "status": "below|at|above"}

このレシピが適しているケース:値下がりアラートエージェント、旅行運賃ウォッチャー、B2B競合価格トラッカー。

4. エンドポイントのヘルスチェック

稼働時間プローブおよびAPIエンドポイントの検証向けです。

組み込み: check_endpoint_health(url, expected_text?)

手動プロンプト:

Use foura_single with GET on <URL>, timeout_ms:5000, and validate.status.accept:[200]. If an expected substring is provided, also set validate.data.accept:["<EXPECTED>"] so the request only counts as success when the body contains it.

Report:
- reachable (true if any response came back, false on connection error/timeout)
- status_code (HTTP code from target)
- total_time_ms (from the total_time field)
- validation_passed (true if status + body validation conditions were met)

Return as JSON: {"url": "...", "reachable": true, "status_code": 200, "total_time_ms": 0, "validation_passed": true}

このレシピが適しているケース:外部稼働時間モニター、デプロイスモークテスト、サードパーティAPIウォッチドッグ。

5. 複数のURLを並行して取得する

レスポンスボディをインライン化せずに、多数のURLに関するメタデータを取得したいバッチジョブ向けです。

組み込み: bulk_fetch_urls(urls)

手動プロンプト:

Parse the following comma-separated URLs and fetch each one concurrently using foura_single (unblocker:true).

URLs: <COMMA_SEPARATED>

For any URL that returns 403, captcha page, or empty body — retry that single URL with foura_proxy (maxTries:3).

Return a JSON array, one entry per URL in input order:
[{"url": "...", "status": 200, "success": true, "body_size_bytes": 0, "via": "single|proxy", "error": null}, ...]

Do NOT inline full response bodies in the output — only metadata. If you need body content, call foura_single individually after this report.

このレシピが適しているケース:サイトマップの到達可能性スイープ、リンク切れ監査、「これら50個の商品URLのうち、どれがまだ存在するか」のチェック。

6. 複数回の呼び出し間でプロキシIPを固定する(ツール間連携)

複数回の連続する呼び出しを同じクライアントから送信されているように見せる必要がある場合(例:複数ステップのチェックアウトフローをスクレイピングする、レンダリング後にページのJSアセットを取得するなど)、動作しているプロキシを1つ選択し、そのIDを再利用します。

手動プロンプト:

First, call foura_proxy with maxTries:5 and a quick probe URL (httpbin.org/ip is fine) to find a working proxy. Capture the returned `proxy` ID (looks like "4DZ3VE").

Then for every follow-up call:
- HTTP request: foura_single with the SAME `proxy` value — same exit IP, you preserve any IP-based session.
- Rendered page: foura_browser with the SAME `proxy` value — the browser exits through the same pool IP.

If a specific proxy ID starts failing mid-workflow, call foura_proxy again with ignoreProxies:["<failed_id>"] to get a fresh one.

このレシピが適しているケース:セッション状態がIPに紐づいているページのスクレイピング、レンダリング後のCSS/JSサブリソースの取得、特定の国からサイトがどのように動作するかを検証するA/Bテスト、または予測可能な送信元IPを必要とする複数回呼び出しのフロー。

7. WAFチャレンジチェーン(Tier-1:Vercel / Cloudflare / Akamai)

Vercel Security Checkpoint、Cloudflareの「Just a moment」、Akamai Bot ManagerなどのTier-1 WAFチャレンジの背後にあるサイトに対する標準的なパターンです。これらのターゲットに対して直接foura_browserを呼び出すと、通常、チャレンジ通過後のコンテンツではなく、チャレンジページ自体がキャプチャされてしまいます。これは、チャレンジの遅延リロードが完了する前にスナップショットが実行されるためです。まずfoura_proxy経由で解決し(通過するまで多数の送信元IPを試すことでチャレンジをクリアします)、返されたプロキシIDをfoura_browserにチェーンします。

手動プロンプト:

Step 1 — find an exit IP that clears the challenge:
  foura_proxy({
    maxTries: 30,               // tier-1 WAFs typically need this range
    request: { method: "GET", url: "<TARGET_URL>", unblocker: true }
  })
On success the response carries `proxy: "<BASE36_ID>"`. Capture it.

Step 2 — render the post-challenge page through the same IP:
  foura_browser({
    url: "<TARGET_URL>",
    proxy: "<BASE36_ID>"        // reuse the cleared exit
  })

If foura_proxy still fails after 30 attempts with the same block,
the gate is likely a country / ASN allowlist (country-licensed
bookmakers, government sites). Rotation will never help — pivot
strategy (different data source, partner agreement, etc.).

このレシピを使用すべきトリガー:

  • foura_singleが、ヘッダーx-vercel-mitigated: challengeまたはcf-mitigated: challengeを伴うステータス429を返す場合
  • ボディのタイトルがVercel Security CheckpointJust a momentAttention RequiredWe're verifying your browserのいずれかに一致する場合
  • foura_browserが実際のコンテンツではなく、小さなチャレンジHTMLを直接キャプチャしてしまう場合

このレシピが適しているケース:Vercel WAFの背後にあるVercel/NetlifyでホストされたSPA(iqair.comや、多くのReactレンダリングされたマーケティングサイト)、アタックモード期間中のCloudflare保護されたストア、Akamai保護された高トラフィックの小売サイト。

7つのレシピすべてに適用されるヒント

  • まずはfoura_singleから始めましょう。 これは最速のツール(200ms〜2s)であり、大半の公開サイトで動作します。403やCAPTCHAが発生した場合はfoura_proxyへ、JavaScriptコンテンツが不足している場合はfoura_browserへとエスカレーションします。
  • unblocker:trueは低コストです。 通信レベルでリアルなブラウザヘッダーを追加します。User-Agentやaccept-encodingのスニッフィングで制限をかけているサイトでも、リクエストを通過させることができます。
  • 検証ルールによりリトライを節約できます。 validate.data.fail:["captcha", "blocked"]を設定することで、明らかにブロックされたレスポンスを成功として処理するのではなく、失敗としてカウントしてリトライやプロキシのエスカレーションをトリガーできます。
  • 大きなボディはデフォルトでインラインになります (v0.2.0+). 任意のツール呼び出しでoffload_large: trueを渡すと、resource_link + resources/readに切り替わり、大きなページでのトークンを節約できます。これはresources/readをサポートするクライアントでのみ有効です(現在、Claude Desktopはサポートしていません)。

ここにないレシピをご希望ですか?

ユースケースを添えてsupport@foura.aiまでメールでお問い合わせください。MCPサーバーは、REST APIのリリースと同じペースで新しいプロンプトを提供します。

最終更新日: 2026年7月1日