MCPレシピ

MCP レシピ

FourA MCP serverをインストールした後、MCP互換クライアント(Claude Desktop、Claude Code、Cursor、Windsurf、VS Code)内で実行できる6つのコピペ用プロンプトです。

各レシピは、一般的なスクレイピングタスクにfoura_auto(スマートなデフォルト)または1つ以上の低レベルなfoura_singlefoura_proxyfoura_browserを使用します。使用方法は以下の2つです:

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

MCPサーバーはこれらをネイティブプロンプトとして提供します: smart_fetchscrape_product_pageextract_articlemonitor_pricingcheck_endpoint_healthbulk_fetch_urls

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

GitHubでオープンソース化されています。npmでは@fouradata/mcpとして利用可能です。

スマートフェッチ(自動): ここから開始

最もシンプルなレシピ: 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, 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. 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 (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. 国別の出口を選択して再利用する

ターゲットが特定の国からのリクエストとして認識する必要がある場合に使用します。これには、ブラウザのレンダリング前に 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.

このレシピが適しているケース: 地域限定コンテンツ、ライセンス市場、地域別の価格設定、またはターゲットから見える国を検証し、選択した出口を再利用する必要があるワークフロー。

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が問題ではない場合に使用します。リクエストはデフォルトで最新の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 block 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.

これが適切なレシピである場合: サーバーレンダリングのターゲットが、出口アドレスではなく、認識したクライアントに基づいてフィルタリングを行う場合です。提示するブラウザの変更に追加コストはかからないため、proxyのローテーションを行う前に試す価値があります。

すべてに適用されるヒント

  • どのツールを使うか迷った場合は、foura_autoを使用してください。 メソッドを選択し、エスカレーションを自動的に処理します。明示的な制御が必要な場合にのみ、特定のツールを使用してください。
  • プレーンなHTTPで十分な場合はfoura_singleから始めてください。 直接のrequestがブロックされた場合はfoura_proxyにエスカレーションし、目的のコンテンツにJavaScriptが必要な場合はfoura_browserにエスカレーションします。
  • ブラウザに似たrequest headerはデフォルトで有効です (unblocker)。 ブロックページが成功としてカウントされないようにコンテンツの検証を維持し、ターゲットがデフォルトを拒否した場合は、browseros、またはversionを使用して提示するブラウザを変更してください。
  • 検証ルールにより再試行を節約できます。 明らかにブロックされたresponseが成功として解析されるのではなく、失敗としてカウントされ、再試行またはproxyのエスカレーションをトリガーするようにvalidate.data.fail:["captcha", "blocked"]を設定してください。
  • 国のスコープは厳密です。 no_eligible_proxyの結果は、exitCountriesなしで再試行する許可ではありません。要件を維持するか、変更する前にユーザーに確認してください。
  • 大きなbodyはデフォルトでインラインです (v0.2.0以降)。 offload_large: trueを渡して、それらの機能をサポートするクライアントでresource_link + resources/readに切り替えてください。

ここにないレシピが必要な場合

ユースケースを記載してsupport@foura.aiにメールを送信してください。MCPサーバーは、REST APIのリリースと同じ頻度で新しいプロンプトを提供します。

最終更新日: 2026年8月6日