flights-mcp
Search flights using Google Flights data via SerpAPI, covering all airlines including low-cost carriers like Ryanair and easyJet.
README
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.
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。