Skip to main content
Glama
README.md
# flights-mcp — flight price tracking for Claude

An MCP server for **Claude Desktop** that keeps an eye on one-way flight prices on Google Flights.
You save one or more routes (dates × departure airports × arrival airports), ask Claude to
refresh them whenever you like, and every search is kept in the history: Claude tells you what
went up, what went down, each flight's all-time low and which flights disappeared. Everything
also ends up in one **Excel** file per route.

Searches use the [fli](https://github.com/punitarani/fli) library (PyPI package `flights`), which
queries Google Flights directly. It is not an official API: if Google changes something, it may
stop working until the library is updated.

## Install in Claude Desktop

### With the bundle (recommended)

1. Download `flights-mcp.mcpb` from the [Releases](../../releases) page.
2. Double-click the file (or in Claude Desktop: *Settings → Extensions → Install extension*).
3. Choose the folder for Excel files and history (default `~/Documents/Flights`), the currency and the country.

Claude Desktop installs Python and the dependencies by itself: you don't need Python on your computer.

### Manual

You need [uv](https://docs.astral.sh/uv/). Clone the repo and add to
`~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "flights": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/the/repo", "server.py"],
      "env": { "FLIGHTS_DATA_DIR": "/Users/your-user/Documents/Flights" }
    }
  }
}
```

If Claude Desktop can't find `uv`, use its full path (`which uv`, e.g.
`/Users/your-user/.local/bin/uv`). Then restart Claude Desktop.

## Interactive interface

In Claude Desktop (and other clients that support [MCP Apps](https://github.com/modelcontextprotocol/ext-apps)),
`search_flights` and `get_summary` show an interactive table right in the chat: filters by date
and leg, sorting, changes since the previous search, all-time low, a price-trend chart for each
flight, Google Flights links and a button to refresh prices.

This saves tokens: the model receives a 3-4 line summary instead of the full table (about −95% on
a route with twenty-odd flights), while the full data is read only by the widget. In clients
without the interface (e.g. Claude Code) the tools return the full markdown table. You can force
either behaviour with `FLIGHTS_RESPONSE=compact` or `full`.

## Skill for Claude

[skills/flight-search/](skills/flight-search/) contains the skill that teaches Claude how to use
the server (reusing routes, what to write in chat, no repeated tables when the widget is shown).
Personal preferences (home airports, route naming) go in `skills/flight-search/PREFERENCES.md`,
which is git-ignored: start from `PREFERENCES.example.md`.

```bash
./scripts/package_skill.sh            # builds dist/flight-search.zip
./scripts/package_skill.sh --install  # ...and also installs it in ~/.claude/skills (Claude Code)
./scripts/package_skill.sh --public   # dist/release/flight-search.zip, without PREFERENCES.md (for Releases)
```

For Claude Desktop / claude.ai: *Settings → Capabilities → Skills → Upload skill* and pick
`dist/flight-search.zip`. To update it, edit the files, rebuild the zip and upload it again.

## Usage

Just talk to Claude, for example:

> Track flights from Rome Fiumicino (FCO) to Munich and Frankfurt (MUC, FRA) on October 12 and 13, nonstop only.

> Refresh prices for the route october_FCO_germany.

> How did prices look in the last search?

Tools exposed by the server:

| Tool | What it does |
|---|---|
| `list_routes` | Lists saved routes, their status and the data folder |
| `create_route` | Creates or edits a route (dates, IATA airports, stops, max duration, adults, cabin) |
| `delete_route` | Deletes a route (history and Excel are kept) |
| `search_flights` | Searches all legs with future dates, stores them in the history, updates the Excel and returns the summary |
| `get_summary` | Re-reads the last search: prices, changes, all-time low, Google Flights links |
| `export_excel` | Regenerates a route's Excel file |
| `route_data` | Interface only: full data with price history (hidden from the model) |

Dates already in the past are skipped automatically.

## Where the data goes

In the data folder (`FLIGHTS_DATA_DIR`, default `~/Documents/Flights`):

```
Flights/
├── routes/<route>.json   # routes to track
├── flights.db            # history of every search (SQLite)
└── <route>.xlsx          # one Excel per route, regenerated after each search
```

The Excel file has a **Summary** sheet (latest search with changes and all-time low), a
**Price history** sheet (one flight per row, one column per search) and one sheet per search.
If the Excel file is open while a search runs, the history is saved anyway and the Excel can be
regenerated later with `export_excel`.

Settings (environment variables; with the bundle you choose them at install time):

| Variable | Default | |
|---|---|---|
| `FLIGHTS_DATA_DIR` | `~/Documents/Flights` | data folder |
| `FLIGHTS_CURRENCY` | `EUR` | price currency (ISO 4217) |
| `FLIGHTS_COUNTRY` | `IT` | country for Google Flights (ISO 3166-1) |
| `FLIGHTS_RESPONSE` | `auto` | `compact` / `full`: forces the format of responses to the model |

## Command line

The same features are available from the terminal:

```bash
uv run flights list
uv run flights search october_FCO_germany     # no name: every route
uv run flights summary october_FCO_germany
uv run flights export october_FCO_germany
```

## Building the `.mcpb` bundle

```bash
npx @anthropic-ai/mcpb pack . dist/flights-mcp.mcpb
```

## License

MIT

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation4/5

Most tools have clearly distinct purposes: list/create/delete routes, search prices, get a summary, and export Excel. The main ambiguity is route_data versus get_summary, since both expose route data, but route_data is explicitly marked as an interface-only tool not needed by the model.

Naming Consistency4/5

The set mostly follows a predictable verb_noun pattern: list_routes, create_route, delete_route, search_flights, get_summary, export_excel. route_data is the one deviation, being noun_noun rather than action-oriented.

Tool Count5/5

Seven tools is well-scoped for a flight-route tracking server. Each tool maps to a meaningful lifecycle operation: manage routes, run searches, retrieve summaries, and export data.

Completeness4/5

The surface covers route creation, listing, deletion, price searching, summaries, and Excel export, with editing handled through create_route(overwrite=True). Minor gaps include no explicit search cancellation and no direct browse-history operation beyond route_data, which is described as not needed by the model.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues