mcpField
G
Google Flights

Google Flights

Local
thiagolannes.comMaps & Travel0Updated 5d ago

About Google Flights

An MCP server for searching Google Flights fares and schedules. It supports flexible date searches and airport-code lookup, with a default provider that needs no API key and an optional SerpApi provider for added flight details.

Key features

  1. 01Search fares and schedules
  2. 02Find cheapest travel dates
  3. 03Resolve airport names to IATA codes
  4. 04Choose between two data providers

Use cases

  1. 01Compare flight options for a trip
  2. 02Find low-fare days within a date window
  3. 03Convert a city or airport name to a code

MCP support

Exposes flight search, cheapest-date lookup, and airport search tools to MCP clients. It can run over HTTP for a remote connector.

Configuration

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

mcp.json · Universal config
{
"mcpServers": {
"thiagojacoblannes-google-flights": {
"command": "uvx",
"args": [
"google-flights-search-mcp"
]
}
}
}
Run commanduvx google-flights-search-mcp

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
pypigoogle-flights-search-mcp0.1.0

Tools

3

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
adultsintegerNo
originstringNo
infantsintegerNo
sort_byenumNoprice | duration
childrenintegerNo
currencystringNo
max_stopsanyNo
cabin_classenumNoeconomy | premium | business | first
destinationstringYes
return_dateanyNo
departure_datestringYes

Details

From the project README

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.

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.

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.