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
Departure airport IATA code (e.g., ‘JFK’, ‘LAX’, ‘SFO’)
Arrival airport IATA code (e.g., ‘LHR’, ‘NRT’, ‘CDG’)
Outbound travel date in YYYY-MM-DD format (e.g., ‘2026-03-15’)
Return date in YYYY-MM-DD format. Omit for one-way flights.
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.
Filter results by airline IATA codes (e.g., [‘BA’, ‘AA’, ‘UA’]). Omit to search all airlines.
Cabin class preference. Options:
ECONOMY- Standard economy seatingPREMIUM_ECONOMY- Premium economy with extra legroomBUSINESS- Business classFIRST- First class
Maximum number of stops allowed. Options:
ANY- Include all flight optionsNON_STOP- Direct flights onlyONE_STOP- Up to one connectionTWO_PLUS_STOPS- Up to two or more connections
How to sort the results. Options:
CHEAPEST- Lowest price firstDURATION- Shortest flight time firstDEPARTURE_TIME- Earliest departure firstARRIVAL_TIME- Earliest arrival first
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
Departure airport IATA code (e.g., ‘JFK’, ‘LAX’, ‘SFO’)
Arrival airport IATA code (e.g., ‘LHR’, ‘NRT’, ‘CDG’)
Start of the date range to search in YYYY-MM-DD format (e.g., ‘2026-04-01’)
End of the date range to search in YYYY-MM-DD format (e.g., ‘2026-04-30’)
Trip duration in days for round-trip searches. Only used when
is_round_trip is true. Must be at least 1.Whether to search for round-trip flights. Set to true to find round-trip prices, false for one-way.
Filter results by airline IATA codes (e.g., [‘BA’, ‘AA’, ‘UA’]). Omit to search all airlines.
Cabin class preference. Options:
ECONOMY- Standard economy seatingPREMIUM_ECONOMY- Premium economy with extra legroomBUSINESS- Business classFIRST- First class
Maximum number of stops allowed. Options:
ANY- Include all flight optionsNON_STOP- Direct flights onlyONE_STOP- Up to one connectionTWO_PLUS_STOPS- Up to two or more connections
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.
Whether to sort results by price (lowest first). Set to true for price-sorted results.
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:- 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