Gopaxo

MCP Gopaxo — اربط ذكاءك الاصطناعي بمحرك مقارنة القطار والحافلة والطائرة

خادم Model Context Protocol العام من Gopaxo: اربط Claude أو Cursor أو وكيل الذكاء الاصطناعي الخاص بك بـ /api/mcp وقارن القطار والحافلة ومشاركة السيارة والطائرة بلغة طبيعية.

وصول محمي بـ token : نقطة النهاية /api/mcp تتطلب token Bearer شخصيًا. اطلبه مجانًا عبر النموذج المخصص. الرد عبر البريد الإلكتروني خلال يومَي عمل.

Endpoint
https://www.gopaxo.com/api/mcp
النقل
Streamable HTTP (بدون حالة)
إصدار الخادم
gopaxo-mcp@0.1.0

ما هو Model Context Protocol؟

Model Context Protocol هو معيار مفتوح نشرته Anthropic أواخر 2024. يصف بروتوكول JSON-RPC 2.0 يتيح لنموذج لغوي استدعاء أدوات خارجية، والوصول إلى موارد، وتلقي مطالبات منظمة. تعتمده العملاء الرئيسيون (Claude Desktop وClaude Code وCursor وVS Code وCline وContinue…) بشكل أصلي.

عمليًا، عندما تطلب من مساعدك «جد لي Paris-Lyon لغدٍ بأقل من 30 €»، يستدعي أداة search_trips من خادمنا، ويستقبل ردًا JSON منظمًا بجميع الرحلات المتاحة، ثم يعرضه بصيغة قابلة للقراءة — تمامًا كأنك على gopaxo.com.

طلب رمز وصول

الوصول إلى MCP خاضع لـ token Bearer شخصي لحماية شركائنا الناقلين. الـ token مجاني ويُسلَّم عند الطلب في ثلاث خطوات:

  1. 1

    ملء النموذج

    الاسم، البريد المهني، المؤسسة، ووصف الاستخدام المتوقع. تذهب طلباتك إلى dev@gopaxo.com.

  2. 2

    تحقق Gopaxo

    ندرس الطلب، نولّد token فريدًا ونضيفه إلى سجل tokens المعتمدة. المتوسط: أقل من يومَي عمل.

  3. 3

    استلام الـ token

    تستلم الـ token عبر البريد الإلكتروني. ألصقه في ترويسة Authorization لعميل MCP الخاص بك — التكوين المفصَّل أدناه.

اطلب token الآن

التثبيت

Claude Desktop / Claude.ai

افتح الإعدادات → Developer → Edit Config (أو يدويًا ~/Library/Application Support/Claude/claude_desktop_config.json على macOS)، ثم أضف:

{
  "mcpServers": {
    "gopaxo": {
      "transport": "http",
      "url": "https://www.gopaxo.com/api/mcp",
      "headers": {
        "Authorization": "Bearer VOTRE_TOKEN_GOPAXO"
      }
    }
  }
}

أعد تشغيل Claude Desktop — تظهر أدوات Gopaxo الأربع في قائمة «Available tools».

Claude Code (CLI)

أمر واحد، ويُضاف MCP إلى مشروعك:

claude mcp add --transport http gopaxo https://www.gopaxo.com/api/mcp \
    --header "Authorization: Bearer VOTRE_TOKEN_GOPAXO"

ثم تحقق في Claude Code بالأمر /mcp لسرد الخوادم النشطة.

Cursor / VS Code

في الملف .cursor/mcp.json (Cursor) أو في تكوين MCP لـ VS Code:

{
  "mcpServers": {
    "gopaxo": {
      "url": "https://www.gopaxo.com/api/mcp",
      "headers": {
        "Authorization": "Bearer VOTRE_TOKEN_GOPAXO"
      }
    }
  }
}

أعد تحميل النافذة ليتعرف الوكيل على الأدوات.

الاختبار بـ MCP Inspector

لاستكشاف الخادم دون تكامل مسبق، يفتح MCP Inspector واجهة ويب للفحص:

npx @modelcontextprotocol/inspector https://www.gopaxo.com/api/mcp \
    --header "Authorization: Bearer VOTRE_TOKEN_GOPAXO"

تعرض الأداة قائمة tools وJSON-Schema الخاص بها، وتتيح تنفيذ استدعاءات تجريبية.

الاستخدام البرمجي — TypeScript

عبر الـ SDK الرسمي @modelcontextprotocol/sdk:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://www.gopaxo.com/api/mcp"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${process.env.GOPAXO_MCP_TOKEN}`,
      },
    },
  },
);
const client = new Client({ name: "my-agent", version: "0.1.0" });
await client.connect(transport);

// Find the cheapest Paris → Lyon for tomorrow
const trips = await client.callTool({
  name: "search_trips",
  arguments: {
    from: "Paris",
    to: "Lyon",
    departureDate: "2026-04-25",
    passengers: "adulte",
  },
});
console.log(trips.structuredContent);

الأدوات المتاحة

أربع أدوات تغطي كامل تدفق Gopaxo، من تحليل مدينة إلى اقتراح مسار بسعر. جميع العمليات للقراءة فقط (لا حجز من جانب MCP — تتم العملية على موقع الناقل الشريك عبر الرابط المُعاد).

autocomplete_cities

read-onlyidempotentopen-world

Resolve a free-text city query to a list of Gopaxo / Tictactrip stops (city groups). Returns the 1-7 best matches, each with a human-readable label, an ISO-2 country code, and the gpuid needed for precise follow-up calls. Use this tool before `search_trips` whenever the user input is ambiguous or you need the canonical name.

عرض JSON-Schema الخاص بالمعامِلات
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 2,
      "description": "Free-text search, e.g. 'paris', 'bordeaux', 'london', 'bcn'. The Tictactrip autocomplete is fuzzy and accepts accents and partial names."
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}

search_trips

read-onlyopen-world

Compare all available outbound (and optional return) trips between two locations on a given date, across train, bus, carpool and plane partners. Returns normalised trips with price in euros, duration, provider, stops and a partner `redirectionLink` to finalise the booking.

عرض JSON-Schema الخاص بالمعامِلات
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "description": "Origin city or station name (e.g. 'Paris', 'Lyon', 'Londres'). Prefer the label returned by the autocomplete tool for exact matches."
    },
    "to": {
      "type": "string",
      "description": "Destination city or station name."
    },
    "fromId": {
      "type": "string",
      "description": "Optional Tictactrip gpuid for the origin. When absent, the server resolves it via autocomplete."
    },
    "toId": {
      "type": "string",
      "description": "Optional Tictactrip gpuid for the destination."
    },
    "departureDate": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Date of the outbound trip in ISO 8601 (YYYY-MM-DD). Example: '2026-05-03'."
    },
    "returnDate": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Optional return date (YYYY-MM-DD). When provided, the response includes a `returnTrips` array. Omit for a one-way search."
    },
    "passengers": {
      "type": "string",
      "description": "Comma-separated passenger types. Allowed values: adulte, jeune, senior, enfant. Defaults to 'adulte' (1 adult).",
      "default": "adulte"
    }
  },
  "required": [
    "from",
    "to",
    "departureDate"
  ],
  "additionalProperties": false
}

price_calendar

read-onlyidempotentopen-world

Return the cheapest price per day for a given origin/destination around a pivot date (±3 to ±5 days, as 3, 5, 7 or 11-day windows). Useful when the user wants to know if moving their trip by a day or two changes the price.

عرض JSON-Schema الخاص بالمعامِلات
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "description": "Origin label."
    },
    "to": {
      "type": "string",
      "description": "Destination label."
    },
    "fromId": {
      "type": "string",
      "description": "Optional origin gpuid."
    },
    "toId": {
      "type": "string",
      "description": "Optional destination gpuid."
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Centre date (YYYY-MM-DD)."
    },
    "days": {
      "type": "integer",
      "minimum": 3,
      "maximum": 11,
      "default": 7,
      "description": "Total window size centred on `date` (3, 5, 7 or 11 days)."
    },
    "passengers": {
      "type": "string",
      "default": "adulte",
      "description": "Passenger composition (same format as search_trips)."
    }
  },
  "required": [
    "from",
    "to",
    "date"
  ],
  "additionalProperties": false
}

popular_destinations

read-onlyidempotentopen-world

List the most popular destinations from (or to) a given city, using Gopaxo's curated Tictactrip top-cities dataset. Use this for inspiration when the user has only a starting city in mind.

عرض JSON-Schema الخاص بالمعامِلات
{
  "type": "object",
  "properties": {
    "uniqueName": {
      "type": "string",
      "description": "Tictactrip `unique_name` of the pivot city (for example 'paris', 'lyon', 'berlin'). Use autocomplete_cities to resolve."
    },
    "direction": {
      "type": "string",
      "enum": [
        "from",
        "to"
      ],
      "default": "from",
      "description": "Whether to list popular destinations *from* the city ('from') or popular origins *to* the city ('to')."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 12,
      "description": "Max number of destinations to return (1-50)."
    }
  },
  "required": [
    "uniqueName"
  ],
  "additionalProperties": false
}

أمثلة استخدام بلغة طبيعية

  • «جد لي أرخص قطار Paris → Bordeaux للجمعة المقبلة.»
  • «قارن عروض Lyon-Barcelona لعطلة نهاية الأسبوع، قطار وحافلة.»
  • «ما أشهر 10 وجهات انطلاقًا من Lyon؟»
  • «أعطني أدنى سعر Paris-Marseille خلال الأيام السبعة المقبلة.»
  • «ابحث عن round-trip Paris-Milan بـ TGV، ذهاب الثلاثاء وعودة الأحد، لشخصين بالغين.»
  • «هل هناك حافلة مباشرة Lille-Amsterdam غدًا؟ أخبرني بالسعر.»

الأسئلة الأكثر شيوعًا حول Gopaxo

ما هو MCP (Model Context Protocol)؟

Model Context Protocol هو معيار مفتوح نشرته Anthropic في أواخر 2024 يسمح لنموذج لغوي (Claude، ChatGPT، Gemini، Mistral، إلخ) باستدعاء أدوات خارجية بشكل مهيكل.

كيف تستخدم Gopaxo الـ MCP؟

يُتيح Gopaxo خادم MCP على /api/mcp عبر Streamable HTTP، محمي برمز Bearer. تتوفر أربع أدوات: autocomplete_cities، search_trips، price_calendar، popular_destinations.

كيف أحصل على رمز وصول؟

اذهب إلى /mcp/request-token واملأ النموذج. يراجع فريق Gopaxo الطلب ويرسل إليك رمزًا عبر البريد في غضون يومَي عمل. مجاني.

كيف أمرر الرمز لعميل MCP؟

يُضاف الرمز إلى header Authorization: Bearer <token>. يقبل Claude Desktop وCursor وVS Code حقل headers في إعداداتهم لـ MCP.

ما العملاء المتوافقين مع MCP؟

أي عميل يدعم نقل Streamable HTTP لـ MCP: Claude Desktop، Claude Code، Cursor، VS Code، Cline، Continue، وكذلك Claude Agent SDK.

هل هو مجاني؟

نعم. Gopaxo محرك مقارنة مجاني، والوصول عبر MCP يتبع نفس القواعد: لا رسوم خدمة، لا رسوم إضافية. الرمز يُسلَّم مجانًا.

ما البيانات التي يعيدها خادم MCP؟

كل استدعاء يعيد استجابة JSON مهيكلة. تعيد search_trips السعر، المدة، الأوقات، المحطات، التحويلات، شركة النقل، بصمة CO₂ ورابط الشريك.

ماذا يحدث إذا استخدمت رمزًا غير صالح؟

يعيد الخادم 401 Unauthorized مع header WWW-Authenticate يوضح أين تطلب رمزًا.

هل يمكنني استخدام MCP في منتج تجاري؟

نعم، باحترام شروط الاستخدام لدينا وذكر «powered by Gopaxo» بشكل واضح. يجب عرض الأسعار كما هي.

كيف أختبر خادم MCP بسرعة؟

افتح MCP Inspector عبر npx @modelcontextprotocol/inspector ووجّهه إلى /api/mcp برمزك.

هل تحتاج وصولًا مخصصًا أو دعم مطورين؟

اكتب إلينا على contact@gopaxo.com: تكامل منتج، رفع rate limits، تسويق مشترك، أو مجرد ملاحظات حول MCP.

تواصل معنا