# google-flights [Health: Active]

**Category:** 🚆 Travel & Transportation  
**Repository:** https://github.com/andreacappelletti97/google-flights-mcp  
**GitHub Stars:** 5  
**npm Downloads (last month):** 900  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/google-flights

## Description
MCP server for Google Flights: search, price tracking, cabin comparison, emissions, and more.

## Tools
Capabilities this server exposes over MCP:

- **search_flights** — One-way & round-trip search. Returns prices, airlines, durations, stops, aircraft, seat pitch, CO2 emissions, and price context.
- **search_multi_city** — Multi-leg itinerary search (2-5 segments). **Currently unavailable**: Google serves multi-city results only to its own signed page requests (see Limitations). Search each leg with `search_flights`.
- **get_calendar_heatmap** — Cheapest one-way fare for each day from `departureDate` (14 days by default, up to 31). Cheapest dates at a glance.
- **get_price_insights** — Rank the departure dates in a range (up to 31 days) from cheapest to most expensive.
- **compare_cabin_classes** — Compare economy, premium economy, business, and first class prices for the same route.
- **track_price** — Record current price and report trend (dropping/rising/stable). Persists in SQLite.
- **get_price_history** — View all recorded price observations for a tracked route.
- **list_tracked_routes** — List all routes being price-tracked with last known price.
- **lookup_airport** — Search 8,800+ airports by city, name, IATA code, or country.
- **find_nearby_airports** — Find alternative airports within a radius (default: 200km). Uses Haversine distance.
- **get_flight_url** — Generate a direct Google Flights booking URL.
- **analyze_layovers** — Analyze connection quality for multi-stop flights. Reports risk level, connection type, aircraft.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "google-flights": {
    "command": "npx",
    "args": ["-y","google-flights-mcp"]
  }
}
```

## Documentation

## What google-flights does

google-flights exposes Google Flights data through MCP tools for flight research and fare monitoring. Search results can include prices, airlines, durations, stops, aircraft, seat pitch, CO2 emissions, and Google's assessment of whether a fare is low, typical, or high.

The server also supports date and cabin comparisons. `get_calendar_heatmap` finds the cheapest one-way fare for each day in a window beginning at a specified departure date, while `get_price_insights` ranks dates by price. `compare_cabin_classes` compares economy, premium economy, business, and first class for the same route.

Airport utilities cover searches across more than 8,800 airports and nearby-airport alternatives based on distance. `get_flight_url` creates a direct Google Flights URL, and `analyze_layovers` evaluates connection risk, connection type, and aircraft details.

## How it works

The server loads Google's public flight-search page and extracts the result data embedded in that page. It does not use an official Google Flights API. This approach provides access to information such as emissions, price context, daily fare data, aircraft, and seat details.

Identical searches are cached for five minutes. Requests affected by HTTP 429 or 5xx responses use exponential backoff with jitter and honor `Retry-After` headers. A circuit breaker pauses requests after five consecutive failures and attempts recovery after 30 seconds. Structural checks report an explicit error if Google's response format changes.

Round trips and calendar operations can require several page requests. The server limits concurrent work for these fan-out operations. Price tracking stores observations in SQLite at `~/.google-flights-mcp/prices.db`; each `track_price` call records the current cheapest price and compares it with earlier observations.

## Setup and configuration

The package can run directly through `npx`:

```json
{
  "mcpServers": {
    "google-flights": {
      "command": "npx",
      "args": ["-y", "google-flights-mcp"]
    }
  }
}
```

For Claude Code, the equivalent command is:

```bash
claude mcp add google-flights -- npx -y google-flights-mcp
```

A source installation uses `git clone`, `npm install`, and `npm run build`, followed by an MCP client configuration that starts `dist/index.js` with Node.js. Restart the client after adding the server.

## Tools and capabilities

- `search_flights` handles one-way and round-trip searches.
- `search_multi_city` describes two- to five-segment searches, but multi-city results are currently unavailable through Google's accessible endpoint; search each leg separately with `search_flights`.
- `get_calendar_heatmap` and `get_price_insights` inspect fare changes across windows of up to 31 days.
- `track_price`, `get_price_history`, and `list_tracked_routes` manage SQLite-backed price observations.
- `lookup_airport` searches by city, airport name, IATA code, or country; `find_nearby_airports` uses Haversine distance and defaults to a 200 km radius.
- `compare_cabin_classes`, `get_flight_url`, and `analyze_layovers` support comparison, booking-link generation, and connection review.

## Limitations and notes

Google can throttle frequent requests, and fare data reflects the time of the query rather than a guaranteed booking price. Currency is selected by Google according to IP address and locale. Calendar tools may issue one page request per day, up to 31 requests. `maxPrice` and `maxDuration` are applied after results are retrieved, so capped searches may return fewer options. Google's public page and embedded response structure can change, even though the server validates the structure and handles transient failures.

_Full upstream README: https://allmcps.com/mcp/google-flights/readme_

