ClaudeCodeMod

All shelves / MCP servers

Search Google Flights

punitarani/fli · 3k stars · Python · MIT

MCP server Google Flights MCP, CLI and Python Library

Install

In your shell
pip install flights

These repos do not share one command. When an entry shows a command, it was copied as published. Check the repo's README before you run it.

Open the repo

Files

README.md

🛫 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/<user>/.local/bin/fli-mcp"
    }
  }
}

Note: Replace <user> 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:

#### search_flights Parameters

Total travelers (passengers + children + infants_in_seat + infants_on_lap) must be between 1 and 9, and infants_on_lap cannot exceed passengers. A round trip costs 1 + top_n page fetches (one outbound search, plus one per outbound candidate expanded into return flights), so top_n is capped at 10. Round-trip results all from one airline? Raise top_n, or sort differently — the default sort only ever expands the cheapest top_n outbounds, which are often the same carrier.

#### search_dates Parameters

Same passenger limits as search_flights: total 1-9, infants_on_lap ≤ 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
  • Multi-city 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

Search transport

Searches are served by Google's public search page rather than the FlightsFrontendService RPC. Since 2026-08 GetShoppingResults and GetCalendarGraph require an x-goog-batchexecute-bgr header that only the page's own JavaScript can produce, so a plain HTTP client gets HTTP 200 with no payload. Fli issues GET https://www.google.com/travel/flights?tfs=<protobuf> instead and reads the results out of the page's inline AF_initDataCallback blob keyed ds:1.

What that means in practice:

  • Three filters are not supported. emissions, bags and

exclude_basic_economy have no tfs field and cannot be reconstructed from the decoded rows, so they are dropped with a warning. Stops, cabin, passengers, alliances and layover bounds ride in the request; airline include/exclude, price cap, max duration and departure windows are applied to the results after fetching.

  • Multi-city raises SearchUnsupportedError. Google loads those results

client-side through the gated RPC, so the page carries no rows to read. Search each leg separately.

  • get_booking_options is unavailable. It calls GetBookingResults, which

is gated the same way, and currently raises SearchRejectedError. The

Facts

Kind
MCP server
Repo
punitarani/fli
Group
Uncategorized
Stars
3k
License
MIT
Language
Python
Last push
2026-09-20
Forks
400
Homepage
deepwiki.com/punitarani/fli
Topics
api, flights-api, google-flights, google-flights-api, mcp, mcp-server

More on this shelf

  1. 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
  2. 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
  3. 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
  4. 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
  5. 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
  6. 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k