Skip to main content
Glama

Google-Flights-MCP-Server

Google Flights MCP Server

This MCP server provides tools to interact with Google Flights data using the bundled fast_flights library.

Features

Provides the following MCP tools:

  • get_flights_on_date: Fetches available one-way flights for a specific date between two airports.
    • Args: origin (str), destination (str), date (str, YYYY-MM-DD), adults (int, optional), seat_type (str, optional), return_cheapest_only (bool, optional, default False).
  • get_round_trip_flights: Fetches available round-trip flights for specific departure and return dates.
    • Args: origin (str), destination (str), departure_date (str, YYYY-MM-DD), return_date (str, YYYY-MM-DD), adults (int, optional), seat_type (str, optional), return_cheapest_only (bool, optional, default False).
  • find_all_flights_in_range: Finds available round-trip flights within a specified date range. Can optionally return only the cheapest flight found for each date pair.
    • Args: origin (str), destination (str), start_date_str (str, YYYY-MM-DD), end_date_str (str, YYYY-MM-DD), min_stay_days (int, optional), max_stay_days (int, optional), adults (int, optional), seat_type (str, optional), return_cheapest_only (bool, optional, default False).

Setup

  1. Clone the repository:
    git clone https://github.com/opspawn/Google-Flights-MCP-Server.git cd Google-Flights-MCP-Server
  2. Create a virtual environment (recommended):
    python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
  3. Install dependencies:
    pip install -r requirements.txt
  4. Install Playwright browsers (needed by fast_flights):
    playwright install

Running the Server

You can run the server directly using Python:

python server.py

The server uses STDIO transport by default.

Integrating with MCP Clients (e.g., Cline, Claude Desktop)

Add the server to your MCP client's configuration file. Example for cline_mcp_settings.json or claude_desktop_config.json:

{ "mcpServers": { "google-flights": { "command": "/path/to/your/.venv/bin/python", // Use absolute path to venv python "args": [ "/absolute/path/to/flight_mcp_server/server.py" // Use absolute path to server script ], "env": {}, "disabled": false, "autoApprove": [] } // ... other servers } }

Important: Replace the paths in command and args with the absolute paths to your virtual environment's Python executable and the server.py script on your system.

Notes

  • This server bundles the fast_flights library (originally from https://github.com/AWeirdDev/flights) for its core flight scraping functionality. Please refer to the included LICENSE file for its terms.
  • Flight scraping can sometimes be unreliable or slow depending on Google Flights changes and network conditions. The tools include basic error handling.
  • The find_all_flights_in_range tool can be resource-intensive as it checks many date combinations.
-
security - not tested
A
license - permissive license
-
quality - not tested

该 MCP 服务器允许 AI 助手使用 Google Flights 在线搜索航班信息。它可以查找特定日期的航班,也可以搜索一定范围内的日期以查找所有选项或仅查找最便宜的选项。

  1. 特征
    1. 设置
      1. 运行服务器
        1. 与 MCP 客户端集成(例如 Cline、Claude Desktop)
          1. 笔记

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              An MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.
              Last updated -
              3
              30
              116
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol (MCP) based search API server that provides standardized access to Google Maps, Google Flights, Google Hotels and other services. This server enables AI assistants to access various search services through a unified interface.
              Last updated -
              58
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              This MCP Server provides a natural language interface to interact with Google's Policy Analyzer API, allowing users to analyze policies and evaluate compliance through conversations.
              Last updated -
              • Linux
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/opspawn/Google-Flights-MCP-Server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server