mcpField
F
flightdata

flightdata

Local
github.com/CloudCorpRecordsMaps & Travel0Updated 2d ago

About flightdata

flightdata is a local bridge for searching Google Flights, aimed at travel-planning tools and agents. It returns itinerary details and filters searches, while forwarding results from HasData without storing fares.

Key features

  1. 01One-way, round-trip, and multi-city searches
  2. 02Filters for price, stops, airlines, and times
  3. 03Itinerary legs, fares, and emissions
  4. 04CLI and stdio MCP server

Use cases

  1. 01Compare flight options by price or duration
  2. 02Filter flights by stops, airline, or emissions
  3. 03Retrieve itinerary tokens for follow-up

MCP support

Exposes a read-only flight-search tool to MCP clients and forwards calls to the hosted HasData Google Flights MCP server. It does not provide booking or payment tools.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-flightdata": {
"command": "npx",
"args": [
"-y",
"@reneturcios/flightdata"
]
}
}
}
Run commandnpx -y @reneturcios/flightdata

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/flightdata0.1.0
ocighcr.io/cloudcorprecords/flightdata:0.1.0

Tools

1

Saved tool list · updated 2d ago

ParameterTypeRequiredDescription
glstringNoThe two-letter country code for the country you want to limit the search to. Provide one exact documented value (245 allowed), e.g. `ac`, `af`.
hlstringNoThe two-letter language code for the language you want to use for the search. Provide one exact documented value (159 allowed), e.g. `af`, `ak`.
bagsnumberNoNumber of carry-on bags per passenger.
typeenumNoSpecifies the type of flight. Options: - `roundTrip` (default) - `oneWay` - `multiCity` (requires `multiCityJson` for flight details) For round trips, retrieve return flight details with a separate request using `departureToken`.roundTrip | oneWay | multiCity
stopsenumNoRestrict the number of stops (layovers) in the flight itinerary.nonStop | oneStopOrFewer | twoStopsOrFewer
adultsnumberNoNumber of adult passengers (>= 1 if specified).
sortByenumNoSort the flight results based on price, departure time, arrival time, etc.topFlights | price | departureTime | arrivalTime | duration | emissions
childrennumberNoNumber of child passengers.
currencystringNoParameter defines the currency of the returned prices Provide one exact documented value (71 allowed), e.g. `ALL`, `DZD`.
maxPricenumberNoMaximum price limit for the flight search, in the selected currency.
arrivalIdstringYesSpecifies the arrival airport code (IATA) or location kgmid. - **IATA Code**: A 3-letter uppercase code (e.g., `SFO` for San Francisco, `LHR` for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search). - **Location kgmid**: A string starting with `/m/`, found in Wikidata under "Freebase ID" (e.g., `/m/02_286` for New York, NY). Multiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).
deepSearchbooleanNoEnable deep search. Returns the same results as Google Flights in a browser, but takes longer to respond. Default is `false`.
returnDatestringNoThe return travel date in 'yyyy-MM-dd' format. Required when **type** is `roundTrip`.
showHiddenbooleanNoIndicates whether to include hidden options in the results.
departureIdstringYesSpecifies the departure airport code (IATA) or location kgmid. - **IATA Code**: A 3-letter uppercase code (e.g., SFO for San Francisco, LHR for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search). - **Location kgmid**: A string starting with `/m/`, found in Wikidata under "Freebase ID" (e.g., `/m/02_286` for New York, NY). Multiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).
maxDurationnumberNoThe maximum total flight duration in minutes.
returnTimesstringNoSet up to 4 time boundaries (2 for departure, 2 for arrival) to filter return flights. Each number represents the start of an hour. Examples: - `6,20` → 6:00 AM - 9:00 PM departure - `1,15` → 1:00 AM - 4:00 PM departure - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival
travelClassenumNoThe travel class for the flight (Economy, Premium Economy, Business, or First).economy | premiumEconomy | business | first
bookingTokenstringNoUsed to request booking options for selected flights. This token is found in the flight results and cannot be used with `departureToken`.
infantsOnLapnumberNoNumber of infants sitting on an adult's lap.
outboundDatestringYesThe outbound travel date in 'yyyy-MM-dd' format.
infantsInSeatnumberNoNumber of infants occupying seats.
lessEmissionsbooleanNoPrefer flight options with lower carbon emissions.
multiCityJsonstringNoThis parameter specifies flight details for multi-city trips. It is a JSON string containing multiple flight objects. Each object must include the following fields: - **departureId** – The departure airport code or location KGMID. Uses the same format as the main `departureId` parameter. - **arrivalId** – The arrival airport code or location KGMID. Uses the same format as the main `arrivalId` parameter. - **date** – The flight date. Uses the same format as the `outboundDate` parameter. - **times** *(optional)* – The time range for the flight. Uses the same format as the `outboundTimes` parameter.
outboundTimesstringNoSet up to 4 time boundaries (2 for departure, 2 for arrival) to filter flights. Each number represents the start of an hour. Examples: - `6,20` → 6:00 AM - 9:00 PM departure - `1,15` → 1:00 AM - 4:00 PM departure - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival
departureTokenstringNoUsed to select a flight and retrieve return flights for a round trip or the next leg of the itinerary for a multi-city trip.
excludeAirlinesstringNoA comma separated list of airline codes to exclude from results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines.
includeAirlinesstringNoA comma separated list of airline codes to exclusively include in results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines. `excludeAirlines` and `includeAirlines` parameters can't be used together.
layoverDurationstringNoSet the maximum layover duration in minutes to filter flights. For example, `120, 360` filters layovers between 2 hours and 6 hours, while `45, 180` allows layovers from 45 minutes to 3 hours.
excludeConnectionsstringNoA comma separated list of specific airports to exclude as connections.
includeConnectionsstringNoA comma separated list of specific airports to allow as connections.

Details

From the project README

flightdata

flightdata is a small local bridge to the hosted HasData Google Flights MCP server, which returns Google Flights search results as JSON. Give it a departure, a destination and an outbound date, and it fetches matching itineraries: each option's price, total duration and stops, its flight legs with airline, flight number, aircraft, airports and times, and its CO2 emissions, plus the booking and departure tokens the upstream issues for following up on a chosen itinerary.

Searches cover one-way, round-trip and multi-city trips. They can be shaped by passenger mix (adults, children, infants in a seat or on a lap), travel class, carry-on bags, a maximum price, sort order (price, duration, emissions, departure or arrival time), stop limits, included or excluded airlines and connections, departure and return time windows, layover duration bounds, a maximum total duration, an emissions preference and a deep-search mode.

The bridge stores no fares of its own. It serves the upstream server's tool list locally, exactly as captured from the live endpoint, and forwards each tool call upstream, returning the result untouched. The captured surface is a single read-only fare search: there is no booking, reservation, ticketing or payment tool in it.

Tools

  • hasdata_google_travel_flights_getGoogleFlights — search Google Flights. Required: departureId (IATA code or location kgmid; comma-separated multiples allowed), arrivalId (same formats), and outboundDate (yyyy-MM-dd). Optional: returnDate, type (roundTrip / oneWay / multiCity), multiCityJson, gl, hl, currency, travelClass (economy / premiumEconomy / business / first), showHidden, adults, children, infantsInSeat, infantsOnLap, sortBy (topFlights / price / departureTime / arrivalTime / duration / emissions), stops (nonStop / oneStopOrFewer / twoStopsOrFewer), excludeAirlines, includeAirlines, bags, maxPrice, outboundTimes, returnTimes, lessEmissions, layoverDuration, includeConnections, excludeConnections, maxDuration, deepSearch, departureToken and bookingToken. Returns per-itinerary price, duration, stops and legs, emissions, and booking/departure tokens.

Configuration

  • HASDATA_GOOGLE_FLIGHTS_MCP_URL (optional) — override the upstream endpoint. Defaults to https://mcp.hasdata.com/mcp?apis=google_travel_flights. (The override hook is this rebuild's own labelled reconstruction.)
  • HASDATA_API_KEY (optional) — when set, every upstream request carries an x-api-key: <key> header, for the caller's own HasData API key. When it is not set, no key header is sent. (The header name and the env name are pinned by the original's registry record; forwarding the key from this env var is a labelled reconstruction — the original surface was captured keyless.)
Forwarding mechanics

On the first tool call the client opens a streamable HTTP session with the upstream: a JSON-RPC initialize request (protocolVersion 2025-03-26, clientInfo name flightdata), then a notifications/initialized notification, then the tools/call request carrying the caller's arguments unchanged. When the upstream answers initialize with an Mcp-Session-Id header, that value rides on every later request of the session, which is reused for the life of the process. Replies may arrive as plain JSON or as server-sent events; both are read.

Successful upstream results pass through verbatim, including any isError flag the upstream sets. Failures — a JSON-RPC error, a non-2xx status, an unreadable response, or a request that cannot be completed — come back as an isError result whose text starts with flightdata error: (this rendering is this rebuild's own labelled reconstruction).

CLI

The tool is also a subcommand taking one JSON argument string:

npx @reneturcios/flightdata hasdata_google_travel_flights_getGoogleFlights '{"departureId":"SFO","arrivalId":"LHR","outboundDate":"2026-12-01","type":"oneWay","travelClass":"economy","stops":"nonStop"}'
npx @reneturcios/flightdata --version

Exit codes: 0 on success, 1 on an isError result, 2 on a usage error.

MCP server

npx -y @reneturcios/flightdata mcp

MCP client config:

{
  "mcpServers": {
    "flightdata": {
      "command": "npx",
      "args": ["-y", "@reneturcios/flightdata", "mcp"]
    }
  }
}

Docker

docker run -i ghcr.io/cloudcorprecords/flightdata
docker run --rm ghcr.io/cloudcorprecords/flightdata --version

The container's default command is mcp, so the first form is a stdio MCP server; any other arguments reach the CLI normally.

Development

npm install
npm run build
npm test
npm run dev

The test suite runs entirely against a stubbed JSON-RPC upstream — no live network calls.

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.