Google Flights MCP Server logo

Google Flights MCP Server

by opspawn

This MCP server provides tools to interact with Google Flights data using the bundled `fast_flights` library. It allows users to fetch flight information for specific dates or date ranges.

View on GitHub

Last updated: N/A

What is Google Flights MCP Server?

The Google Flights MCP Server is a tool that allows you to programmatically access and retrieve flight data from Google Flights. It provides several functions to fetch one-way and round-trip flight information, as well as find flights within a specified date range.

How to use Google Flights MCP Server?

To use the server, you need to clone the repository, set up a virtual environment, install dependencies (including Playwright browsers), and then run the server.py script. You can then integrate it with an MCP client like Cline or Claude Desktop by adding the server's configuration to the client's settings file, ensuring you use absolute paths to the Python executable and server script.

Key features of Google Flights MCP Server

  • Fetches one-way flights for a specific date.

  • Fetches round-trip flights for specific departure and return dates.

  • Finds available round-trip flights within a specified date range.

  • Supports optional arguments for specifying the number of adults and seat type.

  • Can return only the cheapest flight found for each date pair.

  • Uses STDIO transport by default for communication.

Use cases of Google Flights MCP Server

  • Automated flight price monitoring.

  • Integrating flight search into custom applications.

  • Finding the cheapest flights within a specific date range.

  • Building travel planning tools.

  • Gathering flight data for analysis.

FAQ from Google Flights MCP Server

What is the fast_flights library?

The fast_flights library is used for the core flight scraping functionality. It was originally from https://github.com/AWeirdDev/flights.

Why do I need to install Playwright browsers?

Playwright is used by the fast_flights library to interact with Google Flights in a headless browser environment.

Can flight scraping be unreliable?

Yes, flight scraping can sometimes be unreliable or slow depending on Google Flights changes and network conditions.

Is the find_all_flights_in_range tool resource-intensive?

Yes, the find_all_flights_in_range tool can be resource-intensive as it checks many date combinations.

Where can I find the LICENSE for fast_flights?

Please refer to the included LICENSE file for its terms.