cheapdates-mcp
This MCP server provides flight search and fare research via Google Flights and ITA Matrix, including cheapest-date calendars, detailed itineraries, fare comparisons, airline/alliance filters, and loyalty benefit assessments.
Cheapest dates: Use
cheapest_dates_toolto get the cheapest fare for each departure date between a start and end date, for one-way or round trips (trip_length).Search controls: Specify origin/destination as IATA codes, currency, nonstop preference, seat type, backend (
sweep,graph, orauto), and optionally include airline names.Detailed itineraries and fares: Additional tools (
search_flights_tool,select_flight_tool,compare_fares_tool) support detailed flight searches, return-leg selection, and ITA Matrix fare research with booking-class comparisons.Airline and loyalty features:
airline_partners_toolandassess_benefits_toolprovide airline/alliance partner info and benefit assessments using optional traveler profiles, distinguishing sourced policies, exclusions, and missing evidence.Result handling: Provides per-date statuses (
priced,no_results,error) and top-level statuses (ok,no_results,partial,error); invalid inputs or total failures return tool errors.
Provides tools to find the cheapest dates to fly a given route using Google Flights data, supporting one-way and round-trip searches, with options for nonstop flights, currency, seat class, and backend selection.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cheapdates-mcp Show me the cheapest dates to fly JFK to LHR in October 2026."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cheapdates
Flight calendars, detailed itineraries, airline/alliance filters, and free ITA Matrix fare research. CLI + MCP server.
The default workflow uses HTTP only: no Chromium, clicking, account, personal API key or subscription.
The MCP includes cheapest_dates_tool, search_flights_tool, select_flight_tool,
compare_fares_tool, airline_partners_tool, and assess_benefits_tool.
Optional traveler profiles record any loyalty program, status tier and requested benefits.
Benefit assessments distinguish sourced tier policies, explicit exclusions and missing evidence
for each operator. Initial reviewed coverage includes SkyMiles on LATAM/Virgin Atlantic and
LATAM Pass on Delta; other combinations remain unknown. No personal defaults or account numbers
are needed. Required benefits default to an empty list and Basic fares are not excluded
by default. exclude_basic_economy=true is an explicit user choice sent to Google as an
unverified preference, not a guarantee of non-Basic fares. These tools do not list every
airline fare family. Search limit=null returns all matching candidates in the provider
response; coverage metadata reports output truncation.
See detailed search and fare comparison for examples, booking-class comparisons,
and the distinction between requested filters and verified itinerary details.
cheapdates has two calendar backends:
sweep (default) — one Google flight search per date, with airline names and no browser.
graph (explicit opt-in) — headless Chromium opens Google's price graph. One response covers roughly 60 dates, but provides no airline details.
auto always selects sweep. Sweep reads both Google result groups so a cheaper offer in
one group is not overlooked. Detailed search and return selection also use HTTP.
Fare research uses ITA Matrix, with its quote kept separate from Google's price.
Use IATA airport codes, not city names. For Santiago, Chile use SCL. For New York, choose
the intended airport (JFK, EWR, or LGA); the tool does not silently pick one for you.
Whitespace and lowercase codes are accepted. Validation checks code format, not airport existence
or route availability.
Need the airline? Set include_airlines=true in MCP/Python or --include-airlines in the CLI.
This selects sweep, including when backend="graph" was requested. The price and airline come from
the same returned offer. Graph alone has always provided calendar prices only, so its airlines
field is null; an airline from a separate search must not be attributed to that calendar price.
Install
git clone https://github.com/afgoes/cheapdates.git && cd cheapdates && uv sync # see INSTALL.md
# Optional, only if you explicitly use --backend graph:
uv run python -m playwright install chromiumRelated MCP server: google-flights-mcp
CLI
cheapdates JFK LHR 2026-10-01 2026-11-30 # one-way
cheapdates JFK LHR 2026-10-01 2026-11-30 -r 7 # round trip, 7 nights
cheapdates JFK LHR 2026-10-01 2026-11-30 --nonstop --json
cheapdates JFK LHR 2026-10-01 2026-11-30 -b sweep # force fast-flights
cheapdates JFK SCL 2026-09-23 2026-09-29 -r 7 --include-airlines --jsonMCP (Claude Code)
claude mcp add cheapdates -- uv run --directory /path/to/cheapdates cheapdates-mcpTool: cheapest_dates_tool(origin, destination, start, end, trip_length?, currency?, nonstop?, seat?, backend?, include_airlines?).
Example arguments for a seven-night trip with airline names:
{
"origin": "JFK",
"destination": "SCL",
"start": "2026-09-23",
"end": "2026-09-29",
"trip_length": 7,
"include_airlines": true
}For long ranges, narrow the date window to reduce HTTP requests. Graph is an optional browser alternative.
Airline names are returned when Google supplies them; they do not establish flight numbers,
nonstop service, or all return-leg details. Use nonstop=true to request nonstop results.
Results and failures
Result
status:ok,no_results,partial, orerror.Day
status:priced,no_results, orerror;errorcontains a diagnostic when applicable.A missing fare after a completed search differs from a failed fetch or parser error.
Partial results retain successful dates and report failed dates individually.
MCP returns a tool error for invalid inputs or when every requested date fails.
CLI emits exit code 2 for invalid arguments and 1 for partial/total search failure, including with
--json.Sweep requests have a 20-second timeout, retry only transport errors/HTTP 429/5xx up to three attempts, and never retry deterministic parser errors.
The existing result fields are retained. status and per-day error are additive.
Update and test
git pull --ff-only
uv sync --locked
uv run pytest -qRestart the MCP client after updating so it reloads the tool schema. The tests use fixtures and mocked responses; live flight searches are separate and prices can change.
Python
import datetime as dt
from cheapdates import cheapest_dates
r = cheapest_dates("JFK", "LHR", dt.date(2026,10,1), dt.date(2026,11,30), trip_length=7)
print(r.cheapest)Caveats
Reverse-engineered; Google can change the page or response at any time. The parser is fixture-tested
(pytest), and the graph backend falls back to sweep on failure.
Available Tools
1 toolcheapest_dates_toolA
Cheapest fare for each departure date between start and end (YYYY-MM-DD) on origin→destination.
trip_length: None for one-way, or N for a round trip returning N days after departure. Returns {cheapest, days:[{depart, ret, price, airlines}], backend, warnings}. The 'graph' backend reads Google Flights' own price calendar (fast, ~60 days per call); 'sweep' searches each date individually. 'auto' picks graph when a browser is available.
Inputs: end (required), start (required), origin (required), destination (required), +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is zero ambiguity—an agent cannot confuse it with any other. The tool's purpose is clearly described.
The single tool name 'cheapest_dates_tool' is descriptive but uses a bare noun with a redundant 'tool' suffix rather than a verb_noun pattern. Since there is no set of names to compare, it is not inconsistent, but the naming style is slightly unconventional.
The server exposes only one tool, which is at the borderline of being too thin. While the tool encapsulates a coherent function, a larger set (e.g., specific date lookup, fare alerts) could better justify a dedicated MCP server.
The tool fully covers the stated purpose—finding cheapest fares across a date range. It supports one-way and round-trip queries, provides pricing and airline details, and handles backend selection automatically. Minor gaps like booking integration or fare alerts are outside its shown scope.
Maintenance
Related MCP Connectors
Google Flights for any route and date: price, airlines, flight numbers, times, stops, layovers, aircraft, legroom and CO2. One way or round trip, any cabin and currency. Runs on Apify, $0.20 per 1,000 flights.
Google Flights prices for any route and date: round trips, cabins, stops, airlines, cheapest dates.
whentofly: flexible-date economy/business flight search + price-level context for AI agents
Live Google Flights fares: search routes, discover cheap deals from an origin.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables flight search and fare calendar exploration by interacting with Google Flights' API, supporting detailed filters for origin, destination, dates, cabin class, airlines, and more.6,847 PyPI3,490MIT
- AlicenseAqualityBmaintenanceEnables searching and analyzing Google Flights data including prices, emissions, cabin classes, layovers, and price tracking, all without an API key.12225 npm5ISC
- AlicenseAqualityCmaintenanceEnables searching Google Flights for one-way, round-trip, and multi-city itineraries, plus fare tracking and price alerts via SerpAPI.9MIT
- FlicenseAqualityBmaintenanceEnables LLMs to search Google Flights for one-way and round-trip flights, with configurable filters for airports, dates, passengers, cabin, stops, airlines, price, bags, and more, returning booking links and detailed trip information.1-