MCPレシピ
MCP レシピ
FourA MCP serverのインストール後、MCP対応クライアント(Claude Desktop、Claude Code、Cursor、Windsurf、VS Code)ですぐに使える9つのプロンプトです。
各レシピは、一般的なスクレイピング作業向けにfoura_auto(スマートデフォルト)または低レベルのfoura_single、foura_proxy、foura_browserを使用します。利用方法は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として提供されています。
スマート取得(自動): まずはこちらから
最もシンプルなレシピ: 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. 国指定の出口の選択と再利用
ターゲットが特定の国一覧からのリクエストを受信する必要がある場合(ブラウザレンダリング前にプロキシ選択を行う必要がある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. 保護されたページ: プロキシを優先し、JavaScriptが必要な場合はブラウザを使用
直接のリクエストが拒否ページを返す場合は、コンテンツ検証を伴う制限付きのproxy試行を使用してください。検証済みレスポンスが成功しても目的のコンテンツにJavaScriptが必要な場合は、その正確な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.
このレシピが適している場合: 送信元アドレスではなく、検出されたクライアント情報に基づいてフィルタリングを行うサーバーレンダリング対象。ブラウザ情報の変更には追加コストがかからないため、proxy ローテーションの前に試す価値があります。
すべてに共通するヒント
- 使用するツールに迷った場合は foura_auto を使用してください。 メソッドの選択とエスカレーションが自動的に行われます。明示的な制御が必要な場合にのみ、特定のツールを選択してください。
- 通常の HTTP で十分な場合は
foura_singleから開始してください。 直接 request がブロックされた場合はfoura_proxyへ、目的のコンテンツに JavaScript が必要な場合はfoura_browserへエスカレーションします。 - ブラウザ相当の request header はデフォルトで有効です (
unblocker)。 拒否ページが成功として扱われないようコンテンツ検証を維持し、対象がデフォルトを拒否する場合はbrowser、os、または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 のリリースと同じ頻度で新しいプロンプトを提供します。