Gopaxo

Gopaxo MCP — Connect your AI to the train, bus and plane comparison engine

Gopaxo's public Model Context Protocol server: plug Claude, Cursor or your AI agent into /api/mcp and compare train, bus, carpooling and plane in natural language.

Token-protected access : the /api/mcp endpoint requires a personal Bearer token. Request it for free via our dedicated form. Reply by e-mail within 2 business days.

Endpoint
https://www.gopaxo.com/api/mcp
Transport
Streamable HTTP (stateless)
Server version
gopaxo-mcp@0.1.0

What is the Model Context Protocol?

The Model Context Protocol is an open standard published by Anthropic in late 2024. It describes a JSON-RPC 2.0 protocol so that a language model can call external tools, access resources and receive structured prompts. Major clients (Claude Desktop, Claude Code, Cursor, VS Code, Cline, Continue…) implement it natively.

In practical terms, when you ask your assistant "find me a Paris-Lyon for tomorrow under €30", it calls the search_trips tool of our server, receives a structured JSON response with all available trips, then presents it in a readable form — exactly as if you were on gopaxo.com.

Request an access token

Access to the MCP requires a personal Bearer token to protect our carrier partners. The token is free and delivered upon simple request in three steps:

  1. 1

    Fill out the form

    Name, professional e-mail, organisation and description of intended use. Your request goes to dev@gopaxo.com.

  2. 2

    Gopaxo validation

    We review the request, generate a unique token and add it to the registry of authorised tokens. Average time: under 2 business days.

  3. 3

    Token delivery

    You receive the token by e-mail. Paste it into the Authorization header of your MCP client — detailed config below.

Request a token now

Installation

Claude Desktop / Claude.ai

Open Settings → Developer → Edit Config (or manually ~/Library/Application Support/Claude/claude_desktop_config.json on macOS), then add:

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

Restart Claude Desktop — the four Gopaxo tools appear in the "Available tools" menu.

Claude Code (CLI)

One command and the MCP is added to your project:

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

Then validate in Claude Code with /mcp to list active servers.

Cursor / VS Code

In the .cursor/mcp.json file (Cursor) or the MCP configuration in VS Code:

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

Reload the window so the agent detects the tools.

Test with MCP Inspector

To explore the server without prior integration, MCP Inspector opens a web introspection interface:

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

The tool displays the list of tools, their JSON-Schema, and lets you run test calls.

Programmatic usage — TypeScript

Via the official @modelcontextprotocol/sdk 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);

Exposed tools

Four tools cover the entire Gopaxo flow, from resolving a city to proposing a priced itinerary. All operations are read-only (no booking on the MCP side — finalisation is done on the partner carrier's site via the returned link).

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.

View the parameter 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.

View the parameter 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.

View the parameter 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.

View the parameter 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
}

Natural-language usage examples

  • "Find me the cheapest train Paris → Bordeaux for next Friday."
  • "Compare Lyon-Barcelona offers for the weekend, train and bus included."
  • "What are the 10 most popular destinations departing from Lyon?"
  • "Give me the lowest price Paris-Marseille over the next 7 days."
  • "Search for a round-trip Paris-Milan by TGV, Tuesday departure, Sunday return, 2 adults."
  • "Is there a direct bus Lille-Amsterdam tomorrow? Tell me the price."

Most frequent questions about Gopaxo

What is MCP (Model Context Protocol)?

Model Context Protocol is an open standard published by Anthropic in late 2024 that lets a language model (Claude, ChatGPT, Gemini, Mistral, etc.) call external tools in a structured way.

How does Gopaxo use MCP?

Gopaxo exposes an MCP server at /api/mcp via Streamable HTTP, protected by a Bearer token. Four tools are available: autocomplete_cities, search_trips, price_calendar, popular_destinations.

How do I get an access token?

Go to /mcp/request-token and fill in the form. The Gopaxo team reviews your request and emails you a token within 2 business days. It's free.

How do I pass the token to an MCP client?

The token goes in the Authorization: Bearer <token> header. Claude Desktop, Cursor and VS Code accept a headers field in their MCP configuration.

Which MCP clients are compatible?

Any client supporting MCP's Streamable HTTP transport: Claude Desktop, Claude Code, Cursor, VS Code, Cline, Continue, plus the Claude Agent SDK.

Is it free?

Yes. Gopaxo is a free comparison engine, and MCP access follows the same rules: no service fees, no markup. The token is issued free of charge.

What data does the MCP server return?

Each call returns a structured JSON response. search_trips returns price, duration, times, stations, connections, carrier, CO₂ footprint and partner link.

What happens if I use an invalid token?

The server returns 401 Unauthorized with a WWW-Authenticate header pointing to where you can request a token.

Can I use the MCP in a commercial product?

Yes, respecting our ToU and visibly citing "powered by Gopaxo". Prices must be displayed as-is.

How do I quickly test the MCP server?

Open MCP Inspector via npx @modelcontextprotocol/inspector and point it at /api/mcp with your token.

Need dedicated access or developer support?

Write to us at contact@gopaxo.com: product integration, raised rate limits, co-marketing, or simple feedback on the MCP.

Contact us