Price Per TokenPrice Per Token
Search Google Flights

Search Google Flights

by punitarani

GitHub 61 1,482 uses Remote
0

About

Fli is a Python library and MCP server that provides programmatic access to Google Flights data through direct API integration. Unlike traditional approaches that rely on web scraping, it reverse-engineers Google's internal API to deliver faster, more reliable flight search results without browser automation. Key capabilities: - Search flights between airport IATA codes with specific departure dates or flexible date ranges to identify cheapest travel windows - Filter results by cabin class (Economy, Premium Economy, Business, First), maximum layovers, departure time windows, and preferred airlines - Sort results by price, total duration, departure time, or arrival time - Support for one-way and round-trip searches with passenger count specification - Available as pip-installable CLI tools (`fli-mcp` for stdio, `fli-mcp-http` for streamable HTTP)

Tools 2

search_flights

Search for flights with flexible filtering options. This tool searches for flights between two airports on a specific date with various filtering options like time ranges, airlines, seat class, etc.

search_cheap_flights

Find the cheapest dates to fly between two airports over a date range. This tool searches for the cheapest flights across a flexible date range, perfect for finding the best deals when your travel dates are flexible.

README

🛫 Fli - Flight Search MCP Server and Library

A powerful Python library that provides programmatic access to Google Flights data with an elegant CLI interface. Search flights, find the best deals, and filter results with ease.

> 🚀 What makes fli special? > Unlike other flight search libraries that rely on web scraping, Fli directly interacts with Google Flights' API > through reverse engineering. > This means: > > * Fast: Direct API access means faster, more reliable results > * Zero Scraping: No HTML parsing, no browser automation, just pure API interaction > * Reliable: Less prone to breaking from UI changes > * Modular: Extensible architecture for easy customization and integration

MCP Server

pipx install flights

Run the MCP server on STDIO

fli-mcp

Run the MCP server over HTTP (streamable)

fli-mcp-http # serves at http://127.0.0.1:8000/mcp/

Connecting to Claude Desktop

{
  "mcpServers": {
    "fli": {
      "command": "/Users//.local/bin/fli-mcp"
    }
  }
}

> Note: Replace ` with your actual username. > You can also find the path to the MCP server by running which fli-mcp in your terminal.

MCP Tools Available

The MCP server provides two main tools:

| Tool | Description | |----------------------|-------------------------------------------------------------| | search_flights | Search for flights on a specific date with detailed filters | | search_dates | Find the cheapest travel dates across a flexible date range |

#### search_flights Parameters

| Parameter | Type | Description | |--------------------|--------|-----------------------------------------------------| | origin | string | Departure airport IATA code (e.g., 'JFK') | | destination | string | Arrival airport IATA code (e.g., 'LHR') | | departure_date | string | Travel date in YYYY-MM-DD format | | return_date | string | Return date for round trips (optional) | | cabin_class | string | ECONOMY, PREMIUM_ECONOMY, BUSINESS, or FIRST | | max_stops | string | ANY, NON_STOP, ONE_STOP, or TWO_PLUS_STOPS | | departure_window | string | Time window in 'HH-HH' format (e.g., '6-20') | | airlines | list | Filter by airline codes (e.g., ['BA', 'AA']) | | sort_by | string | CHEAPEST, DURATION, DEPARTURE_TIME, or ARRIVAL_TIME | | passengers | int | Number of adult passengers |

#### search_dates Parameters

| Parameter | Type | Description | |--------------------|--------|----------------------------------------------| | origin | string | Departure airport IATA code (e.g., 'JFK') | | destination | string | Arrival airport IATA code (e.g., 'LHR') | | start_date | string | Start of date range in YYYY-MM-DD format | | end_date | string | End of date range in YYYY-MM-DD format | | trip_duration | int | Trip duration in days (for round-trips) | | is_round_trip | bool | Whether to search for round-trip flights | | cabin_class | string | ECONOMY, PREMIUM_ECONOMY, BUSINESS, or FIRST | | max_stops | string | ANY, NON_STOP, ONE_STOP, or TWO_PLUS_STOPS | | departure_window | string | Time window in 'HH-HH' format (e.g., '6-20') | | airlines | list | Filter by airline codes (e.g., ['BA', 'AA']) | | sort_by_price | bool | Sort results by price (lowest first) | | passengers | int | Number of adult passengers |

Quick Start

pip install flights

# Install using pipx (recommended for CLI)
pipx install flights

Get started with CLI

fli --help

Features

  • 🔍 Powerful Search
  • * One-way flight searches * Flexible departure times * Multi-airline support * Cabin class selection * Stop preferences * Custom result sorting

  • 💺 Cabin Classes
  • * Economy * Premium Economy * Business * First

  • 🎯 Smart Sorting
  • * Price * Duration * Departure Time * Arrival Time

  • 🛡️ Built-in Protection
  • * Rate limiting * Automatic retries * Comprehensive error handling * Input validation

    CLI Usage

    Search for Flights

    ``bash

    Basic flight search

    fli flights JFK LHR 2025-10-25

    Advanced search with filters

    fli flights JFK LHR 2025-10-25 \ --time 6-20 \ # Departure time window (6 AM - 8 PM) --airlines BA KL \ # Airlines (British Airways, KLM) --class BUSINESS \ # Cabin class --stops N

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81