Google Flights MCP Server
title: Google Flights MCP emoji: ✈️ colorFrom: blue colorTo: indigo sdk: docker pinned: false
Google Flights MCP Server
A Model Context Protocol (MCP) server for intelligent flight search and travel planning
Overview
Integrates Google Flights data directly into your AI workflow with natural language searches, intelligent price comparisons, and automated travel planning.
Data Sources:
fast-flights (Primary): Free, no API key required
SerpAPI (Fallback): Richer data including flight numbers, layovers, carbon emissions, and multi-seller booking options — used when
SERPAPI_API_KEYis set (250 free searches/month)
Tools
Tool | Description |
| One-way flights for a specific date |
| Round-trip flights with fixed dates (supports |
| Search all round-trip combinations within a date range |
| Filter flights by airline codes or alliance (STAR_ALLIANCE, SKYTEAM, ONEWORLD) |
| Calculate travel dates relative to today |
| Generate a shareable Google Flights search link |
Resources
airports://all— Browse available airportsairports://{code}— Get info for a specific airport (e.g.airports://LAX)
Prompts
10 built-in travel planning prompts: find_best_deal, weekend_getaway, last_minute_travel, business_trip, family_vacation, budget_backpacker, loyalty_program_optimizer, holiday_peak_travel, long_haul_international, stopover_explorer.
Quick Start
Option 1: Install from PyPI
uvx mcp-server-google-flightsOption 2: Run from source
git clone https://github.com/HaroldLeo/google-flights-mcp.git
cd google-flights-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .Configuration
Claude Desktop
{
"mcpServers": {
"google-flights": {
"command": "uvx",
"args": ["mcp-server-google-flights"],
"env": {
"SERPAPI_API_KEY": "your_serpapi_key_here"
}
}
}
}From source
{
"mcpServers": {
"google-flights": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/google-flights-mcp/src/mcp_server_google_flights/server.py"],
"env": {
"SERPAPI_API_KEY": "your_serpapi_key_here"
}
}
}
}Get a free SerpAPI key: serpapi.com/users/sign_up (250 free searches/month)
Remote Deployment (Hugging Face Spaces)
This server supports remote deployment as an SSE MCP server.
Deploy to HF Spaces
Create a new Space at huggingface.co/new-space with Docker SDK
Push this repository to the Space
(Optional) Add
SERPAPI_API_KEYas a Space secret
The Dockerfile and transport switching are already configured — set MCP_TRANSPORT=sse (done automatically in the Dockerfile) to run in SSE mode.
Connect to a deployed Space
{
"mcpServers": {
"google-flights": {
"url": "https://YOUR-USERNAME-google-flights-mcp.hf.space/sse"
}
}
}Environment Variables
Variable | Description |
| SerpAPI key for richer flight data (optional) |
|
|
| Host for SSE mode (default: |
| Port for SSE mode (default: |
Troubleshooting
No flights found: Try a different date or route. Google Flights rate-limits scraping — SerpAPI fallback is more reliable.
401 error: Update to the latest version. Older versions used a remote Playwright service that now requires auth.
Slow searches: search_round_trips_in_date_range is limited to 30 date combinations to avoid rate limiting. Narrow your date range or use min_stay_days/max_stay_days.
License
MIT — see LICENSE