Google航班MCP工具 是 AI Skill Hub 本期精选MCP工具之一。已获得 2.6k 颗 GitHub Star,综合评分 8.2 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
集成Google Flights的开源MCP工具,提供CLI命令行和Python库接口。支持航班查询、价格监控、行程规划等功能。适合旅行开发者、AI应用集成者和自动化爱好者快速接入航班数据服务。
Google航班MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
集成Google Flights的开源MCP工具,提供CLI命令行和Python库接口。支持航班查询、价格监控、行程规划等功能。适合旅行开发者、AI应用集成者和自动化爱好者快速接入航班数据服务。
Google航班MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/punitarani/fli
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"google--mcp--": {
"command": "npx",
"args": ["-y", "fli"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Google航班MCP工具 执行以下任务... Claude: [自动调用 Google航班MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"google__mcp__": {
"command": "npx",
"args": ["-y", "fli"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
A powerful Python library that provides programmatic access to Google Flights data with an elegant CLI interface. Search flights, find the best deals, and filter results with ease.
🚀 What makes fli special? Unlike other flight search libraries that rely on web scraping, Fli directly interacts with Google Flights' API through reverse engineering. This means: Fast: Direct API access means faster, more reliable results Zero Scraping: No HTML parsing, no browser automation, just pure API interaction Reliable: Less prone to breaking from UI changes Modular: Extensible architecture for easy customization and integration
pip install pydantic curl_cffi httpx python examples/python/basic_one_way_search.py ```
Available Examples:
basic_one_way_search.py - Simple one-way flight searchround_trip_search.py - Round-trip flight bookingdate_range_search.py - Find cheapest datesmulti_city_search.py - Multi-city itinerary across several legsadvanced_filters_search.py - Alliances, airline exclusions, layovers, localecomplex_flight_search.py - Advanced filtering and multi-passengertime_restrictions_search.py - Time-based filteringdate_search_with_preferences.py - Weekend filteringprice_tracking.py - Price monitoring over timeerror_handling_with_retries.py - Robust error handlingresult_processing.py - Data analysis with pandascomplex_round_trip_validation.py - Advanced round-trip with validationadvanced_date_search_validation.py - Complex date search with filteringuv sync --all-extras
pipx install flights
bun run multi_city_search.ts ```
Example Categories:
Each example is self-contained — change the airports, dates, and filters at the top of the script to fit your search.
uv run mkdocs serve
```bash
docker build -t fli-dev -f .devcontainer/Dockerfile .
make ci-docker ```
pip install flights
```bash
```python from datetime import datetime, timedelta from fli.models import ( Airport, PassengerInfo, SeatType, MaxStops, SortBy, FlightSearchFilters, FlightSegment ) from fli.search import SearchFlights
Runnable examples live in examples/python/:
```bash
uv run python examples/python/basic_one_way_search.py uv run python examples/python/round_trip_search.py uv run python examples/python/date_range_search.py
Examples are organized by language, with parallel scripts so you can compare the two APIs:
examples/python/examples/typescript/```bash
fli flights)| Option | Description | Example |
|---|---|---|
--return, -r | Return date | 2026-10-30 |
--time, -t | Departure time window | 6-20 |
--airlines, -a | Airline IATA codes | BA,KL |
--exclude-airlines, -A | Airline IATA codes to **exclude** | DL,B6 |
--alliance | Restrict to alliance(s) | ONEWORLD, SKYTEAM |
--exclude-alliance | Alliance(s) to **exclude** | STAR_ALLIANCE |
--min-layover | Minimum layover (minutes) | 90 |
--max-layover | Maximum layover (minutes) | 360 |
--currency | ISO 4217 currency code | EUR, JPY |
--language | BCP-47 language code (Google hl=) | en-GB |
--country | ISO 3166-1 alpha-2 country (gl=) | GB |
--class, -c | Cabin class | ECONOMY, BUSINESS |
--stops, -s | Maximum stops | NON_STOP, ONE_STOP |
--sort, -o | Sort results by | CHEAPEST, DURATION |
--format | Output format | text, json |
fli dates)| Option | Description | Example |
|---|---|---|
--from | Start date | 2026-01-01 |
--to | End date | 2026-02-01 |
--duration, -d | Trip duration in days | 3 |
--round, -R | Round-trip search | (flag) |
--airlines, -a | Airline IATA codes | BA,KL |
--exclude-airlines, -A | Airline IATA codes to **exclude** | DL,B6 |
--alliance | Restrict to alliance(s) | ONEWORLD |
--exclude-alliance | Alliance(s) to **exclude** | STAR_ALLIANCE |
--min-layover | Minimum layover (minutes) | 90 |
--max-layover | Maximum layover (minutes) | 360 |
--currency | ISO 4217 currency code | EUR, JPY |
--language | BCP-47 language code | en-GB |
--country | ISO 3166-1 alpha-2 country | GB |
--class, -c | Cabin class | ECONOMY, BUSINESS |
--stops, -s | Maximum stops | NON_STOP, ONE_STOP |
--time | Departure time window | 6-20 |
--sort | Sort by price | (flag) |
--[day] | Day filters | --monday, --friday |
--format | Output format | text, json |
fli multi)| Option | Description | Example |
|---|---|---|
--leg, -l | Flight leg (ORIGIN,DEST,DATE format) | SEA,HKG,2026-12-26 |
--time, -t | Departure time window | 6-20 |
--airlines, -a | Airline IATA codes | DL CX |
--class, -c | Cabin class | ECONOMY, BUSINESS |
--stops, -s | Maximum stops | NON_STOP, ONE_STOP |
--sort, -o | Sort results by | CHEAPEST, DURATION |
To use the flight search capabilities in Claude Desktop, add this configuration to your claude_desktop_config.json:
Location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"flight-search": {
"command": "fli-mcp",
"args": []
}
}
}
After adding this configuration:
1. Restart Claude Desktop 2. You can now ask Claude to search for flights naturally: "Find flights from JFK to LAX on December 25th" "What are the cheapest dates to fly from NYC to London in January?" * "Search for business class flights from SFO to NRT with no stops"
Fli includes a Model Context Protocol (MCP) server that allows AI assistants like Claude to search for flights directly. This enables natural language flight search through conversation.
Fli 是一个功能强大的 Python 库,专门用于通过程序化方式访问 Google Flights 数据,并提供优雅的 CLI 命令行界面。与依赖 Web Scraping(网页爬虫)的其他库不同,Fli 直接与 Google Flights 进行交互,确保了数据的准确性与高效性。无论是通过命令行搜索航班、寻找最佳优惠,还是进行复杂的筛选,Fli 都能为你提供流畅的体验。
Fli 提供了极其丰富的搜索功能,支持单程、多城市以及灵活的出发时间搜索。用户可以根据航空公司、舱位等级(包括 Economy、Premium Economy、Business 及 First Class)以及中转偏好进行精细化筛选。此外,系统内置了智能排序功能,支持按价格、时长、出发及到达时间进行排列,并配备了完善的内置保护机制,如 Rate limiting(频率限制)和自动重试,确保请求的稳定性。
在使用 Fli 之前,请确保您的环境中已安装 Python 及其相关依赖。推荐使用 `pip` 安装 `pydantic`、`curl_cffi` 和 `httpx` 等核心库。如果您希望通过源码运行示例脚本,建议使用 `uv` 工具进行环境同步(`uv sync --all-extras`),以确保所有开发依赖项均已正确配置。
您可以根据使用场景选择不同的安装方式:对于 CLI 命令行工具的使用,推荐使用 `pipx install flights` 进行安装;对于开发者,可以通过 `pip install flights` 直接安装 Python 包。此外,项目支持使用 `uv` 进行文档构建(`uv run mkdocs serve`),并提供了 Docker 开发环境配置,方便在容器化环境中进行开发与测试。
Fli 支持两种主要的使用模式:首先是 CLI 命令行模式,您可以直接在终端通过命令进行航班查询;其次是 Python API 模式,开发者可以将 Fli 集成到自己的 Python 程序中。项目目录下提供了丰富的示例脚本,如 `basic_one_way_search.py`(单程搜索)、`round_trip_search.py`(往返搜索)以及 `date_range_search.py`(日期范围搜索),帮助您快速上手。
在 CLI 使用中,您可以通过参数对搜索进行精细控制,例如使用 `--return` 指定返程日期,使用 `--time` 设置出发时间窗口,或使用 `--airlines` 筛选特定航空公司。特别地,Fli 支持 Claude Desktop 的集成,您只需在 `claude_desktop_config.json` 配置文件中添加相应的 `mcpServers` 配置,即可让 Claude 具备直接搜索航班的能力。
Fli 内置了对 Model Context Protocol (MCP) 的支持。通过集成的 MCP Server,AI 助手(如 Claude)可以直接调用 Fli 的搜索能力。这种工作流允许用户通过自然语言对话进行航班查询,AI 会自动解析意图并调用底层的搜索逻辑,实现从对话到实时航班数据的无缝衔接。
高活跃开源项目,MCP集成设计先进,Python接口友好。航班数据实时性强,适配AI Agent应用。文档完整,维护频繁。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,Google航班MCP工具 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | fli |
| 原始描述 | 开源MCP工具:Google Flights MCP, CLI and Python Library。⭐2.6k · Python |
| Topics | 航班查询API接口MCP工具Python库谷歌服务 |
| GitHub | https://github.com/punitarani/fli |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-21 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端