Skip to main content
Fli’s MCP server provides two tools for searching flight data. Both tools return real-time results from Google Flights.

search_flights

Search for flights between two airports on a specific date. Returns a list of available flights with prices, durations, and leg details.

Parameters

string
required
Departure airport IATA code (e.g., ‘JFK’, ‘LAX’, ‘SFO’)
string
required
Arrival airport IATA code (e.g., ‘LHR’, ‘NRT’, ‘CDG’)
string
required
Outbound travel date in YYYY-MM-DD format (e.g., ‘2026-03-15’)
string
Return date in YYYY-MM-DD format. Omit for one-way flights.
string
Preferred departure time window in ‘HH-HH’ 24-hour format (e.g., ‘6-20’ for 6am to 8pm). Uses the configured default if not specified.
list[string]
Filter results by airline IATA codes (e.g., [‘BA’, ‘AA’, ‘UA’]). Omit to search all airlines.
string
default:"ECONOMY"
Cabin class preference. Options:
  • ECONOMY - Standard economy seating
  • PREMIUM_ECONOMY - Premium economy with extra legroom
  • BUSINESS - Business class
  • FIRST - First class
string
default:"ANY"
Maximum number of stops allowed. Options:
  • ANY - Include all flight options
  • NON_STOP - Direct flights only
  • ONE_STOP - Up to one connection
  • TWO_PLUS_STOPS - Up to two or more connections
string
default:"CHEAPEST"
How to sort the results. Options:
  • CHEAPEST - Lowest price first
  • DURATION - Shortest flight time first
  • DEPARTURE_TIME - Earliest departure first
  • ARRIVAL_TIME - Earliest arrival first
integer
default:"1"
Number of adult passengers. Must be at least 1.

Response format

Returns a JSON object with the following structure:

Example usage

search_dates

Find the cheapest travel dates between two airports within a date range. Returns a list of dates with their prices, useful for flexible travel planning.

Parameters

string
required
Departure airport IATA code (e.g., ‘JFK’, ‘LAX’, ‘SFO’)
string
required
Arrival airport IATA code (e.g., ‘LHR’, ‘NRT’, ‘CDG’)
string
required
Start of the date range to search in YYYY-MM-DD format (e.g., ‘2026-04-01’)
string
required
End of the date range to search in YYYY-MM-DD format (e.g., ‘2026-04-30’)
integer
default:"3"
Trip duration in days for round-trip searches. Only used when is_round_trip is true. Must be at least 1.
boolean
default:"false"
Whether to search for round-trip flights. Set to true to find round-trip prices, false for one-way.
list[string]
Filter results by airline IATA codes (e.g., [‘BA’, ‘AA’, ‘UA’]). Omit to search all airlines.
string
default:"ECONOMY"
Cabin class preference. Options:
  • ECONOMY - Standard economy seating
  • PREMIUM_ECONOMY - Premium economy with extra legroom
  • BUSINESS - Business class
  • FIRST - First class
string
default:"ANY"
Maximum number of stops allowed. Options:
  • ANY - Include all flight options
  • NON_STOP - Direct flights only
  • ONE_STOP - Up to one connection
  • TWO_PLUS_STOPS - Up to two or more connections
string
Preferred departure time window in ‘HH-HH’ 24-hour format (e.g., ‘6-20’ for 6am to 8pm). Uses the configured default if not specified.
boolean
default:"false"
Whether to sort results by price (lowest first). Set to true for price-sorted results.
integer
default:"1"
Number of adult passengers. Must be at least 1.

Response format

Returns a JSON object with the following structure:

Example usage

Error handling

Both tools return error information in the response when searches fail:
Common errors:
  • Invalid airport codes: Use 3-letter IATA codes (e.g., ‘JFK’ not ‘New York’)
  • Invalid date format: Use YYYY-MM-DD format
  • Invalid parameter values: Check the allowed values for cabin_class, max_stops, etc.
  • Rate limiting: The server automatically retries, but very frequent searches may fail

Rate limits

The MCP server has a built-in rate limit of 10 requests per second with automatic retry logic. If you encounter rate limit errors:
  • Wait a few seconds between searches
  • The server will automatically retry with exponential backoff
  • Consider spacing out multiple consecutive searches

Next steps

Configuration

Customize default values and behavior

Setup guide

Configure the MCP server with Claude Desktop