Skip to main content

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.

Metadata

Release files for google-flights-search-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-flights-search-mcp 0.1.0
File Size Uploaded Provenance Actions
google_flights_search_mcp-0.1.0.tar.gz 16.8 kB With provenance Details for google_flights_search_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for google-flights-search-mcp 0.1.0
File Interpreter ABI Platform Actions
google_flights_search_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for google_flights_search_mcp-0.1.0-py3-none-any.whl

Total release size: 34.0 kB

Release files / google_flights_search_mcp-0.1.0.tar.gz

Download URL google_flights_search_mcp-0.1.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8741f2a3f31f5a14ceb082b6118a5b3d59fc328ce07e8ff2e19390aec521add7
BLAKE2b-256 checksum
How to use checksums
b5398eebe56ddcede472bcf89996f3cd1bad627031a9e17604bc77dfa58ba83b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / google_flights_search_mcp-0.1.0-py3-none-any.whl

Download URL google_flights_search_mcp-0.1.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
017fbdf040a786bb00bd5f98ee3994f77e869298555d9e4a6ef38df61a4cf32c
BLAKE2b-256 checksum
How to use checksums
3712d62a01ddbd1df5c3b63a14b3b2893d9c558bd904e8a95e2fea07c5ce1442
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for google-flights-search-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for google_flights_search_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page