{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
  "name": "com.allflyghts/mcp",
  "description": "Geo-based flight search MCP server. Find cities, airports, and flight routes between any two places on earth — including small towns and remote locations that traditional aggregators cannot handle.",
  "version": "1.0.0",
  "title": "ALLFLYGHTS",
  "websiteUrl": "https://www.allflyghts.com",
  "repository": {
    "url": "https://github.com/allflyghts/allflyghts-mcp",
    "source": "github"
  },
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://mcp.allflyghts.com/mcp",
      "headers": [
        {
          "name": "Authorization",
          "description": "Bearer token issued through the ALLFLYGHTS developer dashboard. Format: 'Bearer <token>'. Get yours at https://www.allflyghts.com/developers",
          "isRequired": true,
          "isSecret": true
        }
      ]
    }
  ],
  "$documentation": {
    "humanReadableDocs": "https://www.allflyghts.com/developers/mcp",
    "openApiSpec": "https://www.allflyghts.com/mcp/openapi.yaml",
    "supportEmail": "support@allflyghts.com",
    "developerSignup": "https://www.allflyghts.com/access/sign-in"
  },
  "$tools": [
    {
      "name": "search_locations",
      "title": "Search Locations",
      "description": "Searches the AllFlyghts public API for matching cities and airports. Returns city/town entries (use for geo-based multi-airport search) and airport entries (use to pin a specific IATA). For best results with diacritics or partial matches, use a 3-5 character prefix.",
      "inputSchema": {
        "type": "object",
        "required": ["query"],
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "City, town, or airport name to search for"
          }
        }
      }
    },
    {
      "name": "get_city",
      "title": "Get City",
      "description": "Fetches one city or airport by its GeoNames id from the AllFlyghts public API. Use when you already have a geonameid from a previous search_locations call and want to confirm or display the location details.",
      "inputSchema": {
        "type": "object",
        "required": ["id"],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "description": "GeoNames id of the location"
          }
        }
      }
    },
    {
      "name": "search_flights",
      "title": "Search Flights",
      "description": "Searches AllFlyghts routes between one or more origin/destination legs. Supports one-way, return, and multi-city/open-jaw itineraries. Each leg's from/to independently supports geo-based city search (multi-airport) or fixed airport IATA, optional date windows, and same-country restriction. Pass airlineGroupedPrices=true to return only itineraries bookable as a single airline ticket.",
      "inputSchema": {
        "type": "object",
        "required": ["legs"],
        "properties": {
          "legs": {
            "type": "array",
            "minItems": 1,
            "description": "Origin→destination pairs. 1 leg = one-way, 2 legs = return, N legs = multi-city / open jaw",
            "items": {
              "type": "object",
              "required": ["from", "to"],
              "properties": {
                "from": { "$ref": "#/$tools/2/inputSchema/properties/legs/items/properties/_route" },
                "to": { "$ref": "#/$tools/2/inputSchema/properties/legs/items/properties/_route" },
                "_route": {
                  "type": "object",
                  "required": ["cityId"],
                  "properties": {
                    "cityId": {
                      "type": "integer",
                      "minimum": 1,
                      "description": "GeoNames id from search_locations or get_city"
                    },
                    "sameCountry": {
                      "type": "boolean",
                      "default": false,
                      "description": "Restrict airport search to this location's country only"
                    },
                    "fromDate": {
                      "type": "string",
                      "description": "Earliest departure date (YYYY-MM-DD)"
                    },
                    "toDate": {
                      "type": "string",
                      "description": "Latest departure date (YYYY-MM-DD) — defines flexible date window"
                    },
                    "tripType": {
                      "type": "string",
                      "description": "Free-form trip type marker (e.g. one-way, return, multi-city)"
                    }
                  }
                }
              }
            }
          },
          "airlineGroupedPrices": {
            "type": "boolean",
            "default": false,
            "description": "When true, results are grouped by airline — only itineraries bookable as a single airline ticket are returned"
          }
        }
      }
    }
  ],
  "$keywords": [
    "flight-search",
    "aviation",
    "travel",
    "geo-based",
    "ndc",
    "routing",
    "airline",
    "airport"
  ],
  "$categories": [
    "travel",
    "aviation",
    "data"
  ],
  "$license": "Proprietary — MCP wrapper code (https://github.com/allflyghts/allflyghts-mcp) is MIT licensed. The ALLFLYGHTS backend service is proprietary."
}
