home / mcp / google flights mcp server

Google Flights MCP Server

An MCP server for Google Flights

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "haroldleo-google-flights-mcp": {
      "command": "mcp-server-google-flights",
      "args": [],
      "env": {
        "AMADEUS_ENV": "test",
        "SERPAPI_API_KEY": "YOUR_SERPAPI_API_KEY",
        "AMADEUS_CLIENT_ID": "your_amadeus_client_id",
        "AMADEUS_CLIENT_SECRET": "your_amadeus_client_secret"
      }
    }
  }
}

You can run and use a travel-focused MCP server that powers AI-assisted flight search and planning. This server exposes a suite of tools to find, compare, and plan flights across multiple carriers and data sources, helping you quickly identify the best itineraries. It supports multi-passenger searches, flexible dates, and complex itineraries, making it ideal for AI-assisted travel planning workflows.

How to use

You interact with the Google Flights MCP Server through an MCP client. Start the server locally and connect your MCP client to it via STDIO transport. Use the available flight search tools to perform one-way, round-trip, or multi-city searches, with options to filter by airline, number of stops, cabin class, and more. Take advantage of the date intelligence and return-cheapest filtering to quickly surface the best-value options. If you want to plan a full trip, combine multiple tools to assemble a complete itinerary and compare prices across dates and routes.

Useful usage patterns to get started: - Do a quick one-way search for a specific date to gauge price ranges - Run a round-trip search with explicit departure and return dates to compare total costs - Explore flexible date ranges to uncover cheaper windows - Build a multi-city itinerary by passing a sequence of segments with dates - Apply direct-flight or maximum-stop filters to narrow results

How to install

Prerequisites you need before installation: - Python 3.10 or higher - An MCP-compatible client (examples include Claude Desktop or Cline)

Option 1: Install from PyPI (recommended) using the MCP runner you prefer:
- Use uvx (recommended, isolated environment)
- Or install globally with pip
- Or install with pipx for isolated global installation
# Using uvx (no installation needed, runs in isolated environment)
uvx mcp-server-google-flights

# Or install globally with pip
pip install mcp-server-google-flights

# Or install with pipx for isolated global installation
pipx install mcp-server-google-flights

Option 2: Install from source - Clone the project - Create and activate a virtual environment - Install in development mode

# Clone the repository
git clone https://github.com/HaroldLeo/google-flights-mcp.git
cd google-flights-mcp

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install in development mode
pip install -e .

Configuration

You configure your MCP client to connect to the Google Flights MCP Server. The recommended setup uses a SerpAPI key for rich data, with an optional fallback to a free scraper. You can also run both the Google Flights server and the Amadeus server for full coverage.

Example configuration for Claude Desktop and SerpAPI-enabled setup (with 250 free searches per month):

{
  "mcpServers": {
    "google-flights": {
      "command": "uvx",
      "args": ["mcp-server-google-flights"],
      "env": {
        "SERPAPI_API_KEY": "YOUR_SERPAPI_API_KEY"
      }
    }
  }
}

Without SerpAPI, you can connect using a basic setup that relies on the internal fast-flights data source (limited data):

{
  "mcpServers": {
    "google-flights": {
      "command": "uvx",
      "args": ["mcp-server-google-flights"]
    }
  }
}

If you want both servers for full coverage, you can configure them together. The Amadeus server is separate and provides comprehensive tools for bookings, hotels, and more. Example (both servers together):

{
  "mcpServers": {
    "google-flights": {
      "command": "mcp-server-google-flights",
      "env": {
        "SERPAPI_API_KEY": "YOUR_SERPAPI_API_KEY"
      },
      "args": []
    },
    "amadeus": {
      "command": "mcp-server-amadeus",
      "env": {
        "AMADEUS_CLIENT_ID": "YOUR_AMADEUS_CLIENT_ID",
        "AMADEUS_CLIENT_SECRET": "YOUR_AMADEUS_CLIENT_SECRET",
        "AMADEUS_ENV": "test"
      },
      "args": []
    }
  }
}

Troubleshooting

If the server has trouble connecting or responding, check that the MCP client is configured with absolute paths and that the Python executable is correctly referenced. Restart the MCP client and review logs for errors. If you encounter authentication issues with older setups, update to the latest package to switch to the standard fetch mode.

Common issues and quick fixes:

- Server not connecting: verify absolute paths, Python path, and restart the client. Check logs for startup errors.

- 401 authentication error: update to the latest package and use the standard fetch mode.

Usage Examples

Here are practical example prompts you can try once the server is running. The MCP will map your queries to the appropriate tools and return structured results.

Example: Simple round trip: Find round-trip flights from New York to London for July 15–25, 2026 for 2 adults in economy.

Example: Flexible dates: What are the cheapest dates to visit Tokyo for about a week in March 2026?

Example: Multi-city: Plan a trip San Francisco -> Paris (3 days) -> Rome (4 days) -> SF starting June 1, 2026.

Example: Direct flights only: Find direct flights from Chicago to Seattle on March 15, 2026.

API Reference (highlights)

Flight search tools include a range of capabilities such as one-way, round-trip, flexible date ranges, multi-city planning, direct flights, airline filtering, and maximum-stop controls. You also have utility tools to calculate travel dates and generate Google Flights URLs.

Resources

Access airport data and related resources through the MCP resources namespace, including browsing all airports and fetching details for specific codes like JFK.

Notes

The server supports SerpApi fallback when configured. It uses a data source hierarchy to improve reliability and provides clear indicators in results when fallback data was used.

Available tools

search_one_way_flights

Find one-way flights for a specific date with options to filter by origin, destination, passenger mix, cabin class, and return the cheapest option if requested.

search_round_trip_flights

Find round-trip flights with fixed outbound and return dates, returning combinations with total prices.

search_round_trips_in_date_range

Search all valid round-trip combinations within a specified date range, with filters for stays and passenger counts.

get_multi_city_flights

Search complex itineraries consisting of multiple flight segments with specified dates and destinations.

search_direct_flights

Search for direct flights only, filtering out any itineraries with connections.

search_flights_by_airline

Filter results by specific airlines or alliances to match loyalty programs or preferences.

search_flights_with_max_stops

Search flights constrained by a maximum number of stops to balance price and convenience.

get_travel_dates

Calculate travel dates relative to today for quick planning.

generate_google_flights_url

Create a shareable Google Flights search URL from origin, destination, and dates.