Model Context Protocol

MCP server.

A JSON-RPC 2.0 MCP server at /api/mcp. It exposes the same five capabilities as the REST API, dispatched through the identical handlers — one logic layer, two transports. Implements initialize, tools/list, and tools/call.

Available tools

ToolMirrorsTier
search_aircraft_types /v1/reference/aircraft-types free
get_aircraft_type /v1/reference/aircraft-types/:slug free
get_airport_snapshot /v1/reference/airports/snapshots/:id free
search_aircraft_dossiers /v1/dossiers free
get_aircraft_dossier /v1/dossiers/:id free
export_aircraft_dossiers /v1/dossiers/export free
whoami /v1/me free
search_airports /v1/airports free
get_airport /v1/airports/:icao free
search_opportunities /v1/opportunities x402-paid
estimate_quote /v1/quote free
submit_trip_intent /v1/intents x402-paid
get_booking_status /v1/intents/:id free
list_capabilities /v1/discovery free

Input schemas

Each tool's inputSchema, verbatim from the server's tool definitions.

json
// search_opportunities  — x402-paid
{ "type": "object", "properties": {
  "from": { "type": "string" }, "to": { "type": "string" },
  "window": { "type": "string" }, "limit": { "type": "integer" } } }

// estimate_quote — estimate-v2; requires departure_date; free during research
{ "type": "object",
  "required": ["origin", "destination", "pax", "cabin_class", "departure_date"],
  "properties": {
    "origin": { "type": "string" }, "destination": { "type": "string" },
    "pax": { "type": "integer" },
    "cabin_class": { "type": "string",
      "enum": ["light", "midsize", "super_mid", "heavy", "ultra"] },
    "departure_date": { "type": "string" }, "departure_time": { "type": "string" } } }

// submit_trip_intent  — x402-paid
{ "type": "object",
  "required": ["origin", "destination", "pax", "cabin_class", "contact"],
  "properties": {
    "origin": { "type": "string" }, "destination": { "type": "string" },
    "pax": { "type": "integer" },
    "cabin_class": { "type": "string",
      "enum": ["light", "midsize", "super_mid", "heavy", "ultra"] },
    "contact": { "type": "object", "required": ["channel", "ref"],
      "properties": { "channel": { "type": "string" }, "ref": { "type": "string" } } } } }

// get_booking_status  — free (owner)
{ "type": "object", "required": ["intent_id", "owner_token"],
  "properties": { "intent_id": { "type": "string" },
    "owner_token": { "type": "string" } } }

// list_capabilities  — free
{ "type": "object", "properties": {} }
inputSchema per tool.

tools/list

List the available tools and their schemas.

http
POST /api/mcp
Content-Type: application/json

{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      { "name": "search_opportunities", "description": "...", "inputSchema": { "type": "object", "properties": { } } },
      { "name": "estimate_quote",       "description": "...", "inputSchema": { "type": "object", "required": ["origin","destination","pax","cabin_class"], "properties": { } } },
      { "name": "submit_trip_intent",   "description": "...", "inputSchema": { "type": "object", "required": ["origin","destination","pax","cabin_class","contact"], "properties": { } } },
      { "name": "get_booking_status",   "description": "...", "inputSchema": { "type": "object", "required": ["intent_id","owner_token"], "properties": { } } },
      { "name": "list_capabilities",    "description": "...", "inputSchema": { "type": "object", "properties": { } } }
    ]
  }
}
Response — descriptions and schemas abbreviated.

tools/call

Invoke a tool by name. The result is wrapped in MCP content blocks; the tool payload is JSON in the text field.

http
POST /api/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "estimate_quote",
    "arguments": {
      "origin": "KTEB",
      "destination": "KPBI",
      "pax": 3,
      "cabin_class": "midsize"
    }
  }
}
json
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "isError": true,
    "content": [
      {
        "type": "text",
        "text": "{\"error\":\"estimate_unavailable\",\"detail\":{\"reason\":\"disabled\"}}"
      }
    ]
  }
}
Response — quote payload as text content.

Client config

Point any MCP client at the server with one entry.

json
{
  "mcpServers": {
    "basifly": {
      "url": "/api/mcp"
    }
  }
}
mcp.json