flightclaw
Track flight prices from Google Flights. Search routes, monitor prices over time, and get alerts when prices drop.
Install
CODEBLOCK0
Or manually:
CODEBLOCK1
Scripts
Search Flights
Find flights for a specific route and date. Supports multiple airports and date ranges.
CODEBLOCK2
Arguments:
- -
origin - IATA airport code(s), comma-separated (e.g. LHR or LHR,MAN) - INLINECODE1 - IATA airport code(s), comma-separated (e.g. JFK or JFK,EWR)
- INLINECODE2 - Departure date (YYYY-MM-DD)
- INLINECODE3 - End of date range (YYYY-MM-DD). Searches each day from date to date-to inclusive.
- INLINECODE4 - Return date for round trips (YYYY-MM-DD)
- INLINECODE5 - ECONOMY (default), PREMIUMECONOMY, BUSINESS, FIRST
- INLINECODE6 - ANY (default), NONSTOP, ONESTOP, TWOSTOPS
- INLINECODE7 - Number of results (default: 5)
Track a Flight
Add a route to the price tracking list and record the current price. Supports multiple airports and date ranges (creates a separate tracking entry for each combination).
CODEBLOCK3
Arguments:
- - Same as search-flights, plus:
- INLINECODE8 - Alert when price drops below this amount
Check Prices
Check all tracked flights for price changes. Designed to run on a schedule (cron).
CODEBLOCK4
Arguments:
- -
--threshold - Percentage drop to trigger alert (default: 10)
Output: Reports price changes for tracked flights. Highlights drops and alerts when target prices are reached.
List Tracked Flights
Show all flights being tracked with current vs original prices.
CODEBLOCK5
MCP Server
FlightClaw also runs as an MCP server with extended search capabilities:
CODEBLOCK6
MCP tools: search_flights, search_dates, track_flight, check_prices, list_tracked, INLINECODE15
Additional MCP filters: passengers (adults/children/infants), airline filter, price limit, max flight duration, departure/arrival time restrictions, layover duration, sort order, and cheapest-date calendar search.
Currency
Prices are returned in the user's local currency based on their IP location. The currency is auto-detected from the Google Flights API response and displayed with the correct symbol (e.g. $, £, ฿, €). Tracked flights store the currency code in tracked.json.
Data
Price history is stored in skills/flightclaw/data/tracked.json and persists via R2 backup.
flightclaw
从Google Flights追踪航班价格。搜索航线,监控价格变化,并在价格下降时收到提醒。
安装
bash
npx skills add jackculpan/flightclaw
或手动安装:
bash
bash skills/flightclaw/setup.sh
脚本
搜索航班
查找特定航线和日期的航班。支持多个机场和日期范围。
bash
python skills/flightclaw/scripts/search-flights.py LHR JFK 2025-07-01
python skills/flightclaw/scripts/search-flights.py LHR JFK 2025-07-01 --cabin BUSINESS
python skills/flightclaw/scripts/search-flights.py LHR JFK 2025-07-01 --return-date 2025-07-08
python skills/flightclaw/scripts/search-flights.py LHR JFK 2025-07-01 --stops NON_STOP --results 10
多个机场(搜索所有组合)
python skills/flightclaw/scripts/search-flights.py LHR,MAN JFK,EWR 2025-07-01
日期范围(搜索每一天)
python skills/flightclaw/scripts/search-flights.py LHR JFK 2025-07-01 --date-to 2025-07-05
两者结合
python skills/flightclaw/scripts/search-flights.py LHR,MAN JFK,EWR 2025-07-01 --date-to 2025-07-03
参数:
- - origin - IATA机场代码,逗号分隔(例如 LHR 或 LHR,MAN)
- destination - IATA机场代码,逗号分隔(例如 JFK 或 JFK,EWR)
- date - 出发日期(YYYY-MM-DD)
- --date-to - 日期范围结束(YYYY-MM-DD)。从起始日期到结束日期(含)逐天搜索。
- --return-date - 往返航班的返程日期(YYYY-MM-DD)
- --cabin - ECONOMY(默认)、PREMIUMECONOMY、BUSINESS、FIRST
- --stops - ANY(默认)、NONSTOP、ONESTOP、TWOSTOPS
- --results - 结果数量(默认:5)
追踪航班
将航线添加到价格追踪列表并记录当前价格。支持多个机场和日期范围(为每个组合创建独立的追踪条目)。
bash
python skills/flightclaw/scripts/track-flight.py LHR JFK 2025-07-01
python skills/flightclaw/scripts/track-flight.py LHR JFK 2025-07-01 --target-price 400
python skills/flightclaw/scripts/track-flight.py LHR JFK 2025-07-01 --return-date 2025-07-08 --cabin BUSINESS
追踪多个机场和日期
python skills/flightclaw/scripts/track-flight.py LHR,MAN JFK,EWR 2025-07-01 --date-to 2025-07-03 --target-price 400
参数:
- - 与search-flights相同,另加:
- --target-price - 当价格低于此金额时发出提醒
检查价格
检查所有已追踪航班的价格变化。设计用于定时运行(cron)。
bash
python skills/flightclaw/scripts/check-prices.py
python skills/flightclaw/scripts/check-prices.py --threshold 5
参数:
- - --threshold - 触发提醒的价格下降百分比(默认:10)
输出:报告已追踪航班的价格变化。突出显示价格下降并在达到目标价格时发出提醒。
列出已追踪航班
显示所有正在追踪的航班及其当前价格与原始价格对比。
bash
python skills/flightclaw/scripts/list-tracked.py
MCP服务器
FlightClaw也可以作为MCP服务器运行,具有扩展的搜索功能:
bash
pip install flights mcp[cli]
claude mcp add flightclaw -- python3 server.py
MCP工具:searchflights、searchdates、trackflight、checkprices、listtracked、removetracked
额外的MCP过滤器:乘客数量(成人/儿童/婴儿)、航空公司筛选、价格上限、最长飞行时长、出发/到达时间限制、中转时长、排序方式以及最便宜日期日历搜索。
货币
价格根据用户IP位置以当地货币显示。货币从Google Flights API响应中自动检测,并以正确的符号显示(例如 $、£、฿、€)。已追踪的航班将货币代码存储在tracked.json中。
数据
价格历史记录存储在skills/flightclaw/data/tracked.json中,并通过R2备份持久化保存。