Google Flights itineraries with fares, legs, carbon emissions and price history, as JSON.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A hosted Model Context Protocol (MCP) server that gives Claude, Cursor, Windsurf and any other MCP client one Google Flights tool. Search one-way, round-trip and multi-city itineraries with fares, flight legs, carbon emissions and price history, all as structured JSON, with no Google account and no retired travel API to work around.
An MCP client and a HasData API key from the dashboard, free to create with no card, and the trial covers about 66 calls at the 15-credit rate. This is a remote server, so the simplest path is a URL and an x-api-key header, with no container to run and no Google account anywhere in the flow. A client that only speaks stdio reaches it through a thin launcher, published as @hasdata/google-flights-mcp on npm and hasdata-google-flights-mcp on PyPI, shown below.
The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.
| Field | Value |
|---|---|
| URL | https://mcp.hasdata.com/api/mcp?apis=google_travel_flights |
| Transport | HTTP, streamable |
| Auth header | x-api-key: HASDATA_API_KEY |
Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
Settings, then Connectors, then Add custom connector, then paste https://mcp.hasdata.com/api/mcp?apis=google_travel_flights and sign in.
For the config-file route, Claude Desktop loads only local (stdio) servers, so it reaches a remote server through a stdio launcher. The @hasdata/google-flights-mcp package is that launcher, and it reads the key from the environment. Add this to claude_desktop_config.json:
For Python instead of Node, swap the launcher for the PyPI package, which uvx runs without a manual install:
~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
~/.codeium/windsurf/mcp_config.json. Windsurf calls the field serverUrl, not url:
.vscode/mcp.json in the workspace:
Prompts, not code. Paste one in and the agent picks the tool itself. Each is annotated with the calls it takes, because every successful call costs 15 credits.
Find one-way flights from JFK to London Heathrow on September 15, sorted by price, and give me the three cheapest with airline and carbon estimate.
One call, 15 credits. Fares, legs and emissions all come back together.
Same route but non-stop only, in business class, and tell me which option has the lowest emissions.
One call, 15 credits. Cabin and stops are filters on the one request.
Is $295 a good price for JFK to LHR right now, given the price history?
One call, 15 credits. The response carries priceInsights with a typical range and a price level.
Round trip JFK to LHR, out September 15 back September 22, cheapest fare.
Two calls, 30 credits. Google returns outbound options first, then the return leg is a second call keyed by the option you pick.
A round trip is two calls by design. The first returns outbound itineraries each with a departureToken, and you pass that token back to get the matching return flights. One-way and the price check are a single call each.
One tool, read-only. The sample below is trimmed from a real call, and fares move constantly. Read it as a shape. The tool name links to its endpoint reference, which carries the full parameter list.
The sample is the payload, not the whole response. A tools/call result carries one text block, and that text is itself JSON holding url, status, text and json, with the scraped data under json. From a raw JSON-RPC response the path is result.content[0].text, parsed, then .json. A chat client unwraps that for you and code talking to the endpoint directly does not.
hasdata_google_travel_flights_getGoogleFlights
Itineraries for a route and date, with fares, legs, emissions and price history.
| Parameter | Type | Required | Notes |
|---|---|---|---|
departureId | string | yes | IATA code such as JFK, or a location kgmid like /m/02_286. Comma-separate several airports |
arrivalId | string | yes | Same format as departureId |
outboundDate | string | yes | YYYY-MM-DD |
type | string | roundTrip by default, oneWay, or multiCity with multiCityJson | |
returnDate | string | Required when type is roundTrip | |
travelClass | string | economy, premiumEconomy, business or first | |
stops | string | nonStop, oneStopOrFewer or twoStopsOrFewer | |
sortBy | string | topFlights default, plus price, duration, emissions, departureTime, arrivalTime | |
adults / children / infantsInSeat / infantsOnLap | number | Passenger mix | |
maxPrice / maxDuration / bags | number | Ceilings and carry-on count | |
includeAirlines / excludeAirlines | string | Comma-separated IATA airline codes, one or the other, not both | |
departureToken | string | Select an outbound option and fetch its return or next leg | |
bookingToken | string | Fetch booking options for a chosen itinerary | |
currency / gl / hl | string | Currency and the country and language of the search | |
deepSearch | boolean | Match what Google shows in a browser, slower to return |
The reference also documents includeConnections, excludeConnections, layoverDuration, outboundTimes, returnTimes, showHidden, lessEmissions and multiCityJson.
Results split into bestFlights and otherFlights. Each itinerary carries price, type, totalDuration in minutes, a flights array of legs, a carbonEmissions object, and a bookingToken. Each leg holds the departureAirport and arrivalAirport (each with id, name and local time), duration, airline, flightNumber, airplane, legroom, travelClass, an extensions array, and oftenDelayedByOver30Min on legs Google flags. A non-stop itinerary has one leg, a connection has several.
carbonEmissionsis in grams, not kilograms.thisFlight: 433000is 433 kg.differencePercentcompares it totypicalForThisRoute, so a negative number is a greener-than-average flight.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/hasdata-google-flights)<a href="https://allmcps.com/mcp/hasdata-google-flights"><img src="https://allmcps.com/api/badge/hasdata-google-flights?style=directory" alt="HasData Google Flights on AllMCPs" /></a>