Skip to main content
Glama
chaosisnotrandomitisrhythmic

flights-mcp

flights-mcp

An MCP server for searching flights using Google Flights data via SerpAPI.

Built with FastMCP for use with Claude Code, Claude Desktop, or any MCP-compatible client.

Why

Most flight MCP servers have incomplete airline coverage — missing low-cost carriers like Ryanair, easyJet, or Wizz Air. This server uses Google Flights (via SerpAPI) which aggregates all airlines, giving you the same results you'd see in the browser.

Related MCP server: fli

Features

  • Search one-way and round-trip flights with full Google Flights data

  • Filter by stops, cabin class, price, and sort order

  • Get booking links from airlines and travel agencies

  • Price insights (price level, typical range, price history)

  • All airlines included (Ryanair, easyJet, Iberia, Lufthansa, etc.)

Tools

mcp_search_flights

Search for flights on a specific route and date.

Parameter

Type

Default

Description

departure

str

required

Departure airport IATA code (e.g. MAD)

arrival

str

required

Arrival airport IATA code (e.g. BER)

date

str

required

Departure date YYYY-MM-DD

return_date

str

None

Return date for round trips

passengers

int

1

Number of adult passengers

stops

int

None

1=nonstop, 2=1 stop max, 3=2 stops max

travel_class

int

1

1=economy, 2=premium, 3=business, 4=first

sort_by

int

1

1=top, 2=price, 3=departure, 4=arrival, 5=duration

currency

str

EUR

ISO currency code

max_price

int

None

Maximum price filter

mcp_get_booking_options

Get booking links for a specific flight using its booking_token from search results.

Parameter

Type

Default

Description

booking_token

str

required

Token from a flight search result

currency

str

EUR

ISO currency code

Setup

1. Get a SerpAPI key

Sign up at serpapi.com and grab your API key. Free tier includes 100 searches/month.

2. Add to Claude Code

claude mcp add flights \
  -e SERPAPI_API_KEY=your_key_here \
  -- uv --directory /path/to/flights-mcp run flights-mcp

Or add manually to ~/.claude.json:

{
  "mcpServers": {
    "flights": {
      "type": "stdio",
      "command": "uv",
      "args": ["--directory", "/path/to/flights-mcp", "run", "flights-mcp"],
      "env": {
        "SERPAPI_API_KEY": "your_key_here"
      }
    }
  }
}

3. Restart Claude Code

The server will be available after restart. Try: "Search for direct flights from Madrid to Berlin on March 19".

Development

git clone https://github.com/chaosisnotrandomitisrhythmic/flights-mcp.git
cd flights-mcp
uv sync
SERPAPI_API_KEY=your_key uv run flights-mcp

Architecture

src/flights_mcp/
├── __init__.py    # Exports mcp instance and run_server
├── server.py      # FastMCP server setup and tool definitions
└── tools.py       # Pure business logic (no MCP awareness)
  • tools.py — Pure Python functions that call SerpAPI and return dicts. No MCP dependency. Easy to test independently.

  • server.py — Thin @mcp.tool() wrappers that serialize results to JSON. Defines the MCP interface.

License

MIT

Available Tools

2 tools
mcp_get_booking_optionsGet Booking OptionsA
Read-only

Get booking links and prices for a specific flight.

Use the booking_token from a search result to get actual booking URLs from airlines and travel agencies.

Args: booking_token: The booking_token from a flight in search results currency: Price currency ISO code (default EUR)

Returns: JSON with booking_options array containing provider, price, and booking URL

ParametersJSON Schema
NameRequiredDescriptionDefault
currencyNoEUR
booking_tokenYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description adds that it calls external providers for booking URLs and returns a structured JSON array. No contradictions, and it supplements the annotation with dependency and output details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Compact and well-structured with a summary, usage note, args, and returns. Each line adds value; no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-param read-only tool with an output schema, the description covers purpose, input dependency, and return shape. Adequate without needing error handling details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has no descriptions (0% coverage), but description explains booking_token as from flight search results and currency as ISO code with default EUR. Fully compensates for schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States it retrieves booking links and prices for a specific flight, using a booking_token from search. This clearly differentiates from the sibling search_flights tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the dependency on a booking_token from a search result, implying it should be used after mcp_search_flights. Does not explicitly name the sibling or state when not to use, but context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mcp_search_flightsSearch FlightsA
Read-only

Search for flights on a specific route and date.

Args: departure: Departure airport IATA code (e.g. MAD, BER, MUC) arrival: Arrival airport IATA code (e.g. BER, MAD, LHR) date: Departure date in YYYY-MM-DD format return_date: Optional return date in YYYY-MM-DD format (omit for one-way) passengers: Number of adult passengers (default 1) stops: Stop filter — 1=nonstop only, 2=1 stop max, 3=2 stops max (default: any) travel_class: 1=economy, 2=premium economy, 3=business, 4=first (default 1) sort_by: Sort order — 1=top flights, 2=price, 3=departure time, 4=arrival time, 5=duration currency: Price currency ISO code (default EUR) max_price: Maximum price filter in the specified currency

Returns: JSON with best_flights, other_flights arrays, and Google Flights URL

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
stopsNo
arrivalYes
sort_byNo
currencyNoEUR
departureYes
max_priceNo
passengersNo
return_dateNo
travel_classNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds output details (best_flights, other_flights, Google Flights URL), but an output schema exists, reducing the need for that. It discloses no additional behavioral caveats such as rate limits, failure modes, or result-size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a one-sentence purpose, followed by a compact Args list and a brief Returns note. Every line contributes useful information, and the length is justified by the 10-parameter surface area.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the high parameter count and complete lack of schema descriptions, this tool description is sufficiently complete for an agent to invoke it correctly. It covers all parameters, defaults, filters, and return shape, leaving no critical ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description fully compensates by explaining every parameter with examples (IATA codes), format (YYYY-MM-DD), defaults, and enumerated meanings (stops, travel_class, sort_by, currency). This adds significant value beyond the bare input schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Search for flights on a specific route and date,' which clearly identifies the verb, resource, and core scoping criteria. This distinguishes it from the sibling mcp_get_booking_options by focusing on the flight search itself rather than booking options.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool: searching flights on a route and date. It does not explicitly mention the sibling alternative or provide exclusions, but the use case is unambiguous and easy for an agent to apply.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedmcp_get_booking_options
    • First observedmcp_search_flights

TDQS

A4.4/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one searches for flights, the other retrieves booking options for a selected flight. There is no overlap or ambiguity.

Naming Consistency5/5

Both tool names follow the same verb_noun pattern with the mcp_ prefix: mcp_search_flights and mcp_get_booking_options. This is consistent and predictable.

Tool Count3/5

With only two tools, the server feels thin for a full flight search domain. It is borderline, as the two tools cover the core search-then-book flow, but the count is at the low end of acceptable.

Completeness4/5

The tool set covers the essential flight search and booking link retrieval process. Minor gaps exist, such as lacking airport code lookup or multi-city search, but the primary workflow is complete for standard one-way/round-trip searches.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Integrates Google Flights data into AI workflows for natural language flight searches, price comparisons, flexible date searches, and multi-city itinerary planning with support for various cabin classes and passenger types.
    9
    4
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables flight search and fare calendar exploration by interacting with Google Flights' API, supporting detailed filters for origin, destination, dates, cabin class, airlines, and more.
    3,128
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to search for real-time flights between airports using the SearchAPI.io Google Flights API, returning prices, schedules, airlines, and carbon emissions.
    -

Latest Blog Posts

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/chaosisnotrandomitisrhythmic/flights-mcp'

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