وصفات MCP

وصفات MCP

ست مطالبات جاهزة للّصق يمكنك تشغيلها داخل أي عميل متوافق مع MCP (Claude Desktop، Claude Code، Cursor، Windsurf، VS Code) بعد تثبيت خادم FourA MCP .

تستخدم كل وصفة foura_auto (الافتراضي الذكي) أو أداة واحدة أو أكثر من الأدوات ذات المستوى الأدنى foura_single، foura_proxy، foura_browser لمهمة كشط بيانات شائعة. توجد طريقتان لاستخدامها:

  1. استدعاء المطالبة المدمجة، يعرض كل عميل MCP المطالبات المقدمة من الخادم كأمر شرطة مائلة أو لوحة /prompts. اختر المطالبة، املأ الوسائط، وقم بالتشغيل. يُرجع خادم MCP سير العمل المقولب، وينفذه LLM باستخدام الأدوات الصحيحة.
  2. نسخ النص أدناه في الدردشة الخاصة بك. نفس التأثير، ولكن أقل قابلية للاكتشاف.

يشحن خادم MCP هذه كمطالبات أصلية: smart_fetch، scrape_product_page، extract_article، monitor_pricing، check_endpoint_health، bulk_fetch_urls.

ملاحظة حول الصفحات الكبيرة (الإصدار 0.2.0 وما بعده): افتراضيا، تعود هياكل response مضمنة في structuredContent بغض النظر عن الحجم، وهذا يعمل في كل عميل MCP بما في ذلك Claude Desktop. إذا كنت تستخدم عميلا يدعم MCP resources/read وكنت ترغب في توفير token في الصفحات الكبيرة، فقم بتمرير offload_large: true في استدعاء الأداة. تأتي الردود التي تبلغ 50 كيلوبايت أو أكثر على شكل resource_link يجلبها عميلك عند الطلب. تفترض المطالبات المدمجة أدناه الإعداد الافتراضي (المضمن).

مفتوح المصدر على GitHub، وعلى npm باسم @fouradata/mcp.

جلب ذكي (تلقائي): ابدأ من هنا

أبسط وصفة: قم بتمرير URL إلى foura_auto ودعه يقوم بمحاولات محدودة عبر طرق request المتاحة. استخدمها متى أردت المحتوى ولم تكن بحاجة إلى اختيار الأداة الأولى بنفسك.

مدمج: 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. استخراج صفحة منتج

لصفحات تفاصيل منتجات التجارة الإلكترونية، بما في ذلك مواقع تطبيقات الصفحة الواحدة والصفحات التي تقف خلف تحديات مكافحة الروبوتات.

مدمج: 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?)

prompt يدوي:

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

لفحوصات وقت التشغيل والتحقق من صحة الـ endpoint الخاصة بـ 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.

متى تكون هذه الطريقة هي الأنسب: فحص إمكانية الوصول إلى خريطة الموقع، مراجعة الروابط المعطلة، أو التحقق من "أي من روابط URL الخاصة بـ 50 منتجًا لا تزال موجودة".

6. اختيار وإعادة استخدام مخرج محدد بدولة

استخدم هذا عندما يجب أن يرى الهدف الـ request من دولة ضمن مجموعة محددة من الدول، بما في ذلك صفحات JavaScript حيث يجب أن يتم اختيار الـ proxy قبل تصيير المتصفح.

مطالبة يدوية:

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 مطلوبة

استخدم محاولة 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 هي المشكلة. يقدم الطلب أحدث إصدار من 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. فهي تختار الطريقة وتتعامل مع التصعيد نيابة عنك. استخدم أداة معينة فقط عندما تريد تحكماً صريحاً.
  • ابدأ بـ foura_single عندما يكون HTTP العادي كافياً. صعد إلى foura_proxy عندما يتم حظر الطلب المباشر وإلى foura_browser عندما يحتاج المحتوى المطلوب إلى JavaScript.
  • يتم تشغيل request headers المشابهة للمتصفح افتراضياً (unblocker). حافظ على التحقق من صحة المحتوى حتى لا تُحسب صفحة الحظر كنجاح، وقم بتغيير المتصفح المقدم باستخدام browser أو os أو version عندما يرفض الهدف الإعداد الافتراضي.
  • قواعد التحقق توفر إعادة المحاولة. عيّن validate.data.fail:["captcha", "blocked"] بحيث تُحسب response المحظورة بوضوح كفشل وتؤدي إلى إعادة المحاولة أو تصعيد proxy، بدلاً من تحليلها كنجاح.
  • نطاق الدولة صارم. إن نتيجة no_eligible_proxy ليست إذناً بإعادة المحاولة بدون exitCountries؛ حافظ على المتطلب أو اسأل المستخدم قبل تغييره.
  • تكون large bodies مضمنة افتراضياً (v0.2.0+). مرر offload_large: true للتبديل إلى resource_link + resources/read على العملاء الذين يدعمون هذه الإمكانات.

هل تريد وصفة غير موجودة هنا؟

أرسل بريداً إلكترونياً إلى support@foura.ai مع حالة الاستخدام. يوفر خادم MCP مطالبات جديدة بنفس وتيرة إصدارات REST API.

آخر تحديث: 6 أغسطس 2026