$git clone https://github.com/punitarani/fliA 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.
| 1 | # 🛫 Fli - Flight Search MCP Server and Library |
| 2 | |
| 3 | [](https://deepwiki.com/punitarani/fli) |
| 4 | |
| 5 | A powerful Python library that provides programmatic access to Google Flights data with an elegant CLI interface. Search |
| 6 | flights, find the best deals, and filter results with ease. |
| 7 | |
| 8 | > 🚀 **What makes `fli` special?** |
| 9 | > Unlike other flight search libraries that rely on web scraping, Fli directly interacts with Google Flights' API |
| 10 | > through reverse engineering. |
| 11 | > This means: |
| 12 | > |
| 13 | > * **Fast**: Direct API access means faster, more reliable results |
| 14 | > * **Zero Scraping**: No HTML parsing, no browser automation, just pure API interaction |
| 15 | > * **Reliable**: Less prone to breaking from UI changes |
| 16 | > * **Modular**: Extensible architecture for easy customization and integration |
| 17 | |
| 18 | ## MCP Server |
| 19 | |
| 20 | ```bash |
| 21 | pipx install flights |
| 22 | |
| 23 | # Run the MCP server on STDIO |
| 24 | fli-mcp |
| 25 | |
| 26 | # Run the MCP server over HTTP (streamable) |
| 27 | fli-mcp-http # serves at http://127.0.0.1:8000/mcp/ |
| 28 | ``` |
| 29 | |
| 30 |  |
| 31 | |
| 32 | ### Connecting to Claude Desktop |
| 33 | |
| 34 | ```json |
| 35 | { |
| 36 | "mcpServers": { |
| 37 | "fli": { |
| 38 | "command": "/Users/<user>/.local/bin/fli-mcp" |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | ``` |
| 43 | |
| 44 | > **Note**: Replace `<user>` with your actual username. |
| 45 | > You can also find the path to the MCP server by running `which fli-mcp` in your terminal. |
| 46 | |
| 47 | ### MCP Tools Available |
| 48 | |
| 49 | The MCP server provides two main tools: |
| 50 | |
| 51 | | Tool | Description | |
| 52 | |----------------------|-------------------------------------------------------------| |
| 53 | | **`search_flights`** | Search for flights on a specific date with detailed filters | |
| 54 | | **`search_dates`** | Find the cheapest travel dates across a flexible date range | |
| 55 | |
| 56 | #### `search_flights` Parameters |
| 57 | |
| 58 | | Parameter | Type | Description | |
| 59 | |---------------------|--------|-------------------------------------------------------------| |
| 60 | | `origin` | string | Departure airport IATA code(s) — comma-separated for multi | |
| 61 | | `destination` | string | Arrival airport IATA code(s) — comma-separated for multi | |
| 62 | | `departure_date` | string | Travel date in YYYY-MM-DD format | |
| 63 | | `return_date` | string | Return date for round trips (optional) | |
| 64 | | `cabin_class` | string | ECONOMY, PREMIUM_ECONOMY, BUSINESS, or FIRST | |
| 65 | | `max_stops` | string | ANY, NON_STOP, ONE_STOP, or TWO_PLUS_STOPS | |
| 66 | | `departure_window` | string | Time window in 'HH-HH' format (e.g., '6-20') | |
| 67 | | `airlines` | list | Filter by airline codes (e.g., ['BA', 'AA']) | |
| 68 | | `exclude_airlines` | list | Airline IATA codes to **exclude** (e.g., ['DL', 'B6']) | |
| 69 | | `alliance` | list | Restrict to alliances: ONEWORLD, SKYTEAM, STAR_ALLIANCE | |
| 70 | | `exclude_alliance` | list | Alliance names to **exclude** from results | |
| 71 | | `min_layover` | int | Minimum layover duration in minutes (multi-stop only) | |
| 72 | | `max_layover` | int | Maximum layover duration in minutes (multi-stop only) | |
| 73 | | `currency` | string | ISO 4217 code (e.g. 'EUR', 'JPY') — flows to `curr=` param | |
| 74 | | `language` | string | BCP-47 language code (e.g. 'en-GB') — flows to `hl=` param | |
| 75 | | `country` | string | ISO 3166-1 alpha-2 country code (e.g. 'GB') for `gl=` param | |
| 76 | | `sort_by` | string | CHEAPEST, DURATION, DEPARTURE_TIME, or ARRIVAL_TIME | |
| 77 | | `passengers` | int | Number of adult passengers | |
| 78 | |
| 79 | #### `search_dates` Parameters |
| 80 | |
| 81 | | Parameter | Type | Description | |
| 82 | |---------------------|--------|-------------------------------------------------------------| |
| 83 | | `origin` | string | Departure air |