MCPレシピ
FourA MCP serverをインストールした後、任意のMCP対応クライアント(Claude Desktop、Claude Code、Cursor、Windsurf、VS Code)で実行できる、コピー&ペースト可能な9つのプロンプトです。
各レシピは、一般的なスクレイピング作業向けに、foura_auto(スマートなデフォルト)または低レベルのfoura_single、foura_proxy、foura_browserの1つ以上を使用します。使用方法は2通りあります。
- 組み込みプロンプトの呼び出し: すべてのMCPクライアントは、サーバーが提供するプロンプトをスラッシュコマンドまたは
/promptsパネルとして表示します。プロンプトを選択し、引数を入力して実行します。MCPサーバーがテンプレート化されたワークフローを返し、LLMが適切なツールを使用してそれを実行します。 - 以下のプロンプト文をコピーして自身のチャットに貼り付けます。効果は同じですが、見つけやすさは劣ります。
MCPサーバーには、ネイティブプロンプトとして以下が含まれています: smart_fetch、scrape_product_page、extract_article、monitor_pricing、check_endpoint_health、bulk_fetch_urls。
大きなページに関する注意 (v0.2.0+): デフォルトでは、サイズに関係なくレスポンス本文が
structuredContent内にインラインで返されます。これはClaude Desktopを含むすべてのMCPクライアントで機能します。MCPresources/readをサポートするクライアントを使用していて、かつ大きなページでトークンを節約したい場合は、ツール呼び出しでoffload_large: trueを渡してください。50 KB以上のレスポンスは、クライアントがオンデマンドで取得するresource_linkとして返されます。以下の組み込みプロンプトはデフォルト(インライン)を想定しています。
GitHubでオープンソースとして公開されています。npmでは@fouradata/mcpとして提供されています。
Smart fetch (auto): ここから始める
最もシンプルなレシピ: URLをfoura_autoに渡し、利用可能なリクエストメソッド全体で制限付きの試行を実行させます。コンテンツが必要で、最初のツールを自身で選択する必要がない場合は常にこれを使用してください。
組み込み: smart_fetch(url, must_contain?, extract?)
手動プロンプト:
Fetch <URL> using foura_auto.
Pass validate.data.accept:["<a string the real page must contain>"] so only the real page counts as success. Auto makes bounded attempts and returns an error if none satisfies the validation.
For a plain follow-up, call foura_single with session.proxy as proxy, session.cookies serialized as a Cookie header, and session.userAgent as a User-Agent header. For JavaScript, pass the session values to the matching foura_browser fields.
Return the content, or extract the requested fields as JSON.
このレシピが適しているケース: FourAに手法の選択を任せる初回のリクエスト。特に、コンテンツ検証によって実際のページと拒否ページを判別できる場合に有効です。
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. Use plain HTTP first when the article is present in the server-rendered response.
If foura_single returns a 403, a verification 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 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. endpointのヘルスチェック
稼働監視プローブおよびAPI endpointの検証向け。
組み込み: 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 (the total_time field is in seconds: multiply by 1000)
- 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, a verification 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. 国指定exitの選択と再利用
ターゲットが特定の国セットからのrequestとして認識する必要がある場合に使用します。これには、ブラウザのレンダリング前にproxyの選択が必要なJavaScriptページも含まれます。
手動プロンプト:
First call foura_proxy for the actual target:
{
"maxTries": 5,
"exitCountries": ["FR", "GB"],
"request": { "method": "GET", "url": "<TARGET_URL>" }
}
Treat exitCountries as a strict allowlist. On success, verify that exitCountry is FR or GB and capture the returned proxy ID.
If the page then needs JavaScript, call foura_browser with the returned proxy ID in foura_browser.proxy. Do not start a new proxy selection, because that may choose a different exit.
If foura_proxy returns no_eligible_proxy, preserve the requested country scope and retry later. Change or widen the list only after the user explicitly changes the requirement. Never retry silently without exitCountries.
このレシピが適しているケース: 地域限定コンテンツ、ライセンス対象市場、地域別価格設定、または検証済みのターゲット可視国を必要とし、選択したエグジットを再利用するワークフロー。Country scopingはStartupプラン以上で含まれます。他のプランではfoura_proxyがplan_limit_featureを返し、リトライしても解消されません。
7. 保護されたページ: proxyを優先、JavaScriptが必要な場合はbrowserを使用
直接requestが拒否ページを返す場合は、コンテンツ検証を伴う制限付きproxy試行を使用します。検証済みresponseが成功しても目的のコンテンツにJavaScriptが必要な場合は、browserでその同一proxy IDを再利用します。保護ベンダーが可視であっても、いずれかの方法が成功することを保証するものではありません。
手動プロンプト:
Step 1 - call foura_proxy for <TARGET_URL>. Put a string unique to the real page in request.validate.data.accept. If the user supplied an allowed country list, pass it as exitCountries; do not guess country codes.
Step 2 - if the response passes validation and JavaScript is still required, call foura_browser with the returned proxy ID in the proxy field.
Do not call foura_proxy again after a successful selection, because the new call may choose a different exit. If the bounded attempt fails, report the failure honestly instead of claiming support for the target's protection vendor.
このレシピが適しているケース: 保護されたターゲットにおいて、HTTP経由で機能する出口ノードを選択できるものの、最終的なコンテンツの取得にJavaScriptレンダリングが必要な場合。
8. 静的ページでブロックされる場合: 提示するブラウザを変更する
静的なターゲットがブロックまたはチャレンジページを返し、JavaScriptが原因ではない場合に使用します。requestはデフォルトで最新のGoogle Chromeを提示しますが、ターゲットによっては別のブラウザやプラットフォームを受け入れることがあります。
手動プロンプト:
Step 1 - call foura_single for <TARGET_URL> with request validation: put a string unique to the real page in validate.data.accept.
Step 2 - if the response is a refusal page, or defense comes back with solved false, call foura_single again with a different presented browser, for example {"browser": "Firefox"} or {"browser": "Chrome", "os": "Android"}. Keep the same validation.
If the tool answers that the combination does not exist, pick one from the list it returns. Do not retry the same impossible combination, and do not assume another browser was used instead: the request was refused, not substituted.
Step 3 - if changing the presented browser does not help, escalate to foura_proxy for a different exit, and to foura_browser only when the content genuinely needs JavaScript.
このレシピが適しているケース: 送信元IPアドレスではなく、クライアント情報に基づいてフィルタリングを行うサーバーレンダリングのターゲット。提示するブラウザの変更に追加コストはかからないため、プロキシローテーションの前に試す価値があります。
すべてに適用されるヒント
- 使用するツールに迷った場合はfoura_autoを使用してください。 最適なメソッドを選択し、必要に応じてエスカレーションを自動処理します。特定のツールは、明示的な制御が必要な場合にのみ使用してください。
- 通常のHTTPで十分な場合は
foura_singleから開始してください。 直接リクエストがブロックされた場合はfoura_proxyにエスカレートし、必要なコンテンツにJavaScriptが必要な場合はfoura_browserにエスカレートします。 - ブラウザ風のリクエストヘッダーはデフォルトで有効です (
unblocker)。 拒否ページが成功として扱われないようコンテンツ検証を維持し、ターゲットがデフォルト設定を拒否する場合はbrowser、os、またはversionで提示ブラウザを変更してください。 - 検証ルールによりリトライを削減できます。 明らかにブロックされたレスポンスが成功としてパースされず、失敗としてリトライやプロキシのエスカレーションがトリガーされるよう、
validate.data.fail:["captcha", "blocked"]を設定してください。 - 国スコープは厳格です。
no_eligible_proxyという結果は、exitCountriesなしでリトライする許可を意味しません。要件を維持するか、変更前にユーザーに確認してください。 - 大きなボディはデフォルトでインラインです (v0.2.0以降)。 これらの機能に対応しているクライアントでは、
offload_large: trueを渡してresource_link+resources/readに切り替えてください。
掲載されていないレシピが必要な場合
ユースケースを記載してsupport@foura.aiまでメールをお送りください。MCPサーバーは、REST APIのリリースと同じ頻度で新しいプロンプトを提供します。