flights-mcp

flights-mcp

An MCP server for holiday flight planning powered by Google Flights via SerpAPI, enabling real-time flight search, destination discovery, airport comparison, and multi-country trip planning.

Category
访问服务器

README

flights-mcp

An MCP server for holiday flight planning powered by Google Flights via SerpAPI. Give any Claude-compatible AI assistant the ability to search real-time flight prices, discover destinations, compare airports, plan multi-country trips, and get booking links.

What it can do

Find airports

Resolve any place name — a city, region, or country — into airport IATA codes. Understands that "Nottingham" means East Midlands (EMA), that "London" covers six airports, that "Argentina" has a dozen options, and that "Patagonia" covers airports across both Argentina and Chile (BRC, USH, FTE, PUQ, NQN, CRD, REL, BBA).

Explore destinations

Open-ended holiday planning: "Where can I fly from East Midlands in June for under £500?" Returns destinations with flight prices, hotel prices, best travel dates, flight duration, and stops — all sourced from Google Travel Explore.

Also works for domestic route discovery: explore from AEP (Buenos Aires domestic) to see all Argentine destinations, or SCL to see Chilean routes.

Can filter by interest:

  • Beaches (/m/0b3yr)
  • Outdoors (/g/11bc58l13w)
  • History (/m/03g3w)
  • Museums (/m/09cmq)
  • Skiing (/m/071k0)

Search flights

Full Google Flights search with every filter available:

  • One-way, round-trip, or multi-city
  • Economy through First class
  • Nonstop only or max stops
  • Specific airlines or alliances (Star Alliance, SkyTeam, Oneworld)
  • Departure/arrival time windows
  • Max price, max duration, layover duration
  • Low-emission flights only
  • Basic economy exclusion (US domestic)

Returns full flight details: price, duration, stops, airline, aircraft type, legroom, amenities, carbon emissions, and price insights (lowest price, typical range, price history).

Search across a date range

Find the cheapest day to fly: "When's the cheapest time to fly London to Buenos Aires in April?" Searches every date in a range and returns results sorted by price. Up to 30 days, one API call per date.

Compare departure airports

Find the cheapest airport to fly from: "Should I fly from East Midlands, Birmingham, or Manchester to Buenos Aires?" Looks up all airports near a location and searches from each one in parallel, returning a ranked price comparison.

Plan an open-jaw trip

Fly into one country and out of another without backtracking. Handles the full combination search automatically: finds all nearby departure airports, tries both directions (fly into Argentina/out of Chile vs fly into Chile/out of Argentina), and returns both options ranked by total combined price. Only 4 API credits regardless of how many airports are compared.

Check price insights

Get a quick read on whether prices for a route are currently cheap, typical, or expensive — without retrieving full flight listings. Returns the lowest recorded price, typical price range, price level, and a human-readable verdict (e.g. "Prices are 18% below typical — good time to book."). Uses 1 API credit.

Find cheapest arrival airport

The arrival-side counterpart to "compare departure airports". Resolves a destination like "Tokyo" or "Patagonia" to all nearby airports and searches each in parallel, returning a ranked list by price. Answers "Should I fly into EZE or AEP?" or "Which Patagonia airport is cheapest from London?". Uses one API credit per airport.

Find flights with a stopover

Search for a split itinerary via a hub city for a set number of days. "I want to fly London to Tokyo but spend 3 days in Dubai on the way — what are the cheapest options?" Searches origin → stopover and stopover → destination as separate one-way legs, optionally including a return leg too. Stopover location is resolved to airports automatically. Uses 2 API credits (3 with return).

Search a price calendar

Find the cheapest combination of departure and return dates for a round trip. "What's the cheapest week to fly London to New York in July?" Generates every (outbound, return) date pair from two date ranges and searches them all in parallel, returning results sorted by price with trip duration. Capped at 30 combinations. Uses 1 API credit per combination.

Plan a multi-stop trip

Chain together multiple legs for internal/domestic routing within a multi-country holiday. "I'm flying into Buenos Aires on Oct 17, want to visit Patagonia on Oct 23, then end in Santiago on Oct 28 — what are the cheapest flights for each leg?"

Location names are resolved to airports automatically — "Patagonia" becomes BRC, USH, FTE, PUQ, NQN, CRD, REL, BBA and a single search covers all of them. Returns the cheapest flight per leg plus up to 3 alternatives so you can compare specific airports (e.g. cheapest might be BRC/Bariloche but you can see FTE/El Calafate options for Perito Moreno). Uses N-1 API credits for N stops.

Get return flights

After finding an outbound flight, retrieve matching return options using the departure_token from the outbound result.

Get booking options

Get direct booking links from airlines and OTAs for a specific flight using the booking_token from any search result.


Tools

Tool Description
find_airports Resolve a city/region/country to airport IATA codes
explore_destinations Discover where to fly and for how much
search_flights Full flight search with all filters
search_flights_flexible Find cheapest day to fly across a date range
search_price_calendar Find cheapest outbound + return date combination
check_price_insights Are prices cheap, typical, or expensive right now?
compare_airport_prices Compare prices from all departure airports near a location
find_cheapest_arrival_airport Compare prices into all arrival airports near a destination
plan_open_jaw_trip Fly into one country, return from another — find cheapest combo
plan_multi_stop_trip Plan internal legs of a multi-country trip
find_stopover_flights Split a long-haul via a stopover city for N days
get_return_flights Get return flights for a chosen outbound
get_booking_options Get booking links for a specific flight

Setup

1. Get a SerpAPI key

Sign up at serpapi.com and get your API key. The free tier includes 100 searches/month.

2. Configure the environment

cp .env.example .env
# Edit .env and set your key:
# SERPAPI_KEYS=your_key_here

Multiple keys can be comma-separated for automatic rotation when one hits its quota:

SERPAPI_KEYS=key_one,key_two,key_three

3. Build

npm install
npm run build

4. Add to Claude Desktop

Edit your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "flights": {
      "command": "node",
      "args": ["/absolute/path/to/flights-mcp/build/index.js"],
      "env": {
        "SERPAPI_KEYS": "your_serpapi_key_here"
      }
    }
  }
}

Example workflows

"Where's cheap to fly from Nottingham this summer?"

  1. find_airports("Nottingham") → EMA, BHX, MAN, LHR, LGW, STN
  2. explore_destinations(departure_id: "EMA,BHX,MAN", month: 7, travel_duration: 2) → ranked list of destinations with prices

"Cheapest way to get from Nottingham to Buenos Aires"

  1. compare_airport_prices(location: "Nottingham", arrival_id: "EZE", outbound_date: "2026-06-01", return_date: "2026-06-15") → ranked by price across EMA, BHX, MAN, LHR, LGW

"When's cheapest to fly London to Tokyo in May?"

  1. search_flights_flexible(departure_id: "LHR", arrival_id: "HND,NRT", date_from: "2026-05-01", date_to: "2026-05-31") → price per day sorted cheapest first

"Nottingham to Argentina and Chile in October, cheapest open-jaw"

  1. plan_open_jaw_trip(departure_location: "Nottingham", destination_a: "Argentina", destination_b: "Chile", outbound_date: "2026-10-17", return_date: "2026-10-31") → compares EMA/BHX/MAN/LHR/LGW → EZE/AEP vs SCL, returns cheapest of: (UK→Argentina, Chile→UK) and (UK→Chile, Argentina→UK) with total prices

"Are London to Tokyo prices high right now?"

  1. check_price_insights(departure_id: "LHR", arrival_id: "HND,NRT", outbound_date: "2026-07-15", return_date: "2026-07-29") → price level, typical range, context string

"Which Tokyo airport is cheapest to fly into from London?"

  1. find_cheapest_arrival_airport(departure_id: "LHR", arrival_location: "Tokyo", outbound_date: "2026-07-15", return_date: "2026-07-29") → ranked comparison of NRT vs HND

"London to Tokyo but stop in Dubai for 3 nights"

  1. find_stopover_flights(departure_id: "LHR", arrival_id: "NRT", outbound_date: "2026-07-15", stopover_location: "Dubai", stopover_days: 3, return_date: "2026-07-29") → LHR→DXB leg + DXB→NRT leg + NRT→LHR return

"Cheapest week to fly London to New York in July"

  1. search_price_calendar(departure_id: "LHR", arrival_id: "JFK,EWR", outbound_date_from: "2026-07-01", outbound_date_to: "2026-07-14", return_date_from: "2026-07-10", return_date_to: "2026-07-31") → up to 30 (outbound, return) combinations sorted by price

"Buenos Aires to Patagonia to Santiago — internal legs"

  1. plan_multi_stop_trip(trip: [{location: "Buenos Aires", date: "2026-10-17"}, {location: "Patagonia", date: "2026-10-23"}, {location: "Santiago", date: "2026-10-28"}]) → 2 API calls: AEP/EZE → BRC/USH/FTE/PUQ/NQN/CRD/REL/BBA, then those → SCL. Returns cheapest + alternatives per leg with total price.

"Argentina and Chile full trip"

  1. plan_open_jaw_trip(...) → find cheapest UK ↔ Argentina/Chile international legs
  2. plan_multi_stop_trip(...) → find cheapest internal legs between cities
  3. get_booking_options(booking_token: "...") → direct booking links for each flight

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选