Skip to main content
Glama
google-flights-mcp

google-flights-mcp

google-flights-mcp

MCP server for searching Google Flights prices and schedules from Claude.

Two interchangeable data sources behind one interface (google_flights_mcp/providers/base.py):

  • fast-flights (default) — scrapes Google Flights' internal protobuf search API directly. No API key, works out of the box.

  • SerpApi — used automatically when a SERPAPI_KEY environment variable is set. Adds flight numbers, layover detail, and carbon emissions.

Tools

  • search_flights — origin (default LIS), destination, departure_date, optional return_date, passenger counts, cabin_class, currency (default EUR), max_stops, sort_by. Returns a price-ranked list: price, airline(s), departure/arrival times, duration, stops, and a Google Flights link.

  • cheapest_dates — cheapest day(s) to fly in a date window (max 21 days), price-calendar style. Runs one search per day — see "Known limitations" below.

  • airport_search — resolve a city or airport name ("Lisbon") to an IATA code (LIS), backed by the offline airportsdata package.

Related MCP server: Google Flights MCP Server

Known limitations

  • Round trips: for return_date searches, both providers return outbound flight options annotated with an estimated round-trip total price (paired with the cheapest matching return) — not a separately priced return leg. stops/duration/legs describe the outbound flight only. Open the result's booking_link on Google Flights to pick the exact return.

  • cheapest_dates: neither fast-flights nor SerpApi's Google Flights engine expose a real bulk price-calendar endpoint, so this runs one search_flights call per candidate day. Capped at a 21-day window to keep that bounded.

  • EU/UK cookie-consent wall: Google shows a cookie-consent interstitial to requests from those regions before returning real results. The fast-flights provider detects this and auto-submits "Reject all" (the privacy-preserving option) before retrying — see providers/fast_flights_provider.py if this ever needs updating for a change on Google's side.

Install

Quickest (needs uv): no clone needed, it runs straight from PyPI.

claude mcp add google-flights -- uvx google-flights-search-mcp

For Claude Desktop, use "command": "uvx", "args": ["google-flights-search-mcp"].

From source:

Requires Python 3.11+ and uv.

git clone https://github.com/ThiagoJacobLannes/google-flights-mcp
cd google-flights-mcp
uv sync --extra dev

On Windows, if you keep code in a cloud-synced folder (Google Drive, OneDrive), create the venv outside it — sync clients drop desktop.ini marker files into folders, which can crash packages on startup:

uv venv C:\dev\google-flights-mcp-venv
uv pip install --python C:\dev\google-flights-mcp-venv -e ".[dev]"

The command paths below assume that venv location; adjust to wherever yours lives.

Add to Claude Desktop

Merge claude_desktop_config.snippet.json into your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "google-flights": {
      "command": "C:\\dev\\google-flights-mcp-venv\\Scripts\\python.exe",
      "args": ["-m", "google_flights_mcp.server"]
    }
  }
}

Restart Claude Desktop after editing. To use SerpApi instead of the default scraper, add an env block:

{
  "mcpServers": {
    "google-flights": {
      "command": "C:\\dev\\google-flights-mcp-venv\\Scripts\\python.exe",
      "args": ["-m", "google_flights_mcp.server"],
      "env": { "SERPAPI_KEY": "your-serpapi-key" }
    }
  }
}

Get a key at serpapi.com (free tier available).

Other env vars: GOOGLE_FLIGHTS_DEFAULT_ORIGIN (default LIS), GOOGLE_FLIGHTS_DEFAULT_CURRENCY (default EUR).

Running over HTTP (for a remote connector)

C:\dev\google-flights-mcp-venv\Scripts\python.exe -m google_flights_mcp.server --http

Or set MCP_TRANSPORT=streamable-http. Configure the bind address with MCP_HOST (default 127.0.0.1) and MCP_PORT (default 8000); the server listens at http://<host>:<port>/mcp. Put this behind whatever reverse proxy / auth you use for your other remote connectors before exposing it beyond localhost.

Smoke test

Real network call (no mocks) — searches LIS → GRU about a month out:

C:\dev\google-flights-mcp-venv\Scripts\python.exe tools\google-flights-mcp\examples\smoke_test.py

Tests

C:\dev\google-flights-mcp-venv\Scripts\python.exe -m pytest tools\google-flights-mcp\tests

These are unit tests against the provider abstraction (factory selection, passenger validation, the shared cheapest_dates day-loop, airport resolution) — no network access required.

Available Tools

3 tools
cheapest_datesA

Find the cheapest day(s) to fly within a date window (price-calendar style).

Runs one search per candidate departure day in the window (capped at 21 days — neither of this server's data sources expose a real bulk price-calendar endpoint) and returns each day's cheapest fare, sorted by price ascending.

Args: destination: Destination airport IATA code. start_date: First candidate departure date, YYYY-MM-DD. end_date: Last candidate departure date, YYYY-MM-DD (inclusive; max 21 days after start_date). origin: Origin airport IATA code. Defaults to Lisbon (LIS). trip_length: Nights for a round trip, applied to every departure day in the window. Omit to price one-way fares. adults, children, infants: Passenger counts (see search_flights). cabin_class: "economy" | "premium" | "business" | "first". currency: ISO currency code. Defaults to EUR. max_stops: Maximum stops to allow. Omit to allow any.

Inputs: end_date (required), start_date (required), destination (required), adults, +7 more.

search_flightsA

Search flight prices and options on Google Flights.

Args: destination: Destination airport IATA code (e.g. "GRU"). If you only have a city name, call airport_search first. departure_date: Outbound date, YYYY-MM-DD. origin: Origin airport IATA code. Defaults to Lisbon (LIS) if omitted. return_date: Return date YYYY-MM-DD to search a round trip; omit for one-way. For round trips, each result's price is Google's estimated round-trip total for that outbound flight paired with its cheapest matching return — stops/duration/legs describe the outbound only. Open booking_link to pick the exact return flight. adults: Number of adult passengers (default 1). children: Number of child passengers (default 0). infants: Number of lap infants, under 2 with no own seat (default 0). cabin_class: "economy" | "premium" | "business" | "first". currency: ISO currency code. Defaults to EUR. max_stops: Maximum stops to allow (0 = nonstop only, 1 = up to one stop, etc.). Omit to allow any number of stops. sort_by: "price" (default, ascending) or "duration" (ascending).

Inputs: destination (required), departure_date (required), adults, origin, +7 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a clearly different task: airport_search resolves names to IATA codes, search_flights prices a specific itinerary, and cheapest_dates scans a date window. The descriptions even cross-reference each other (e.g. 'call airport_search first'), leaving no realistic chance of misselection.

    Naming Consistency4/5

    All names use snake_case and are readable, but the grammatical pattern varies: search_flights is verb_noun, cheapest_dates is adjective_noun, and airport_search is noun_verb. Minor deviation only, since each name still telegraphs its function.

    Tool Count4/5

    Three tools is lean but each earns its place — resolution, point search, and date-window scan are the minimal viable set for a flight-fare lookup server. It is slightly under-scoped (no detail/booking step) but not thin enough to be a mismatch.

    Completeness4/5

    The core read-only workflow (resolve airport -> search fares -> find cheapest dates) is fully covered, including round trips, passengers, cabin class, and stop filters. Gaps exist around retrieving a specific itinerary's details, booking, or multi-city searches, but agents can work around them via the booking link.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers