
Flyan
io.github.victorlane由 GitHub 帳號 victorlane 發布v0.4.4更新於 Oct 24, 2026
Search Ryanair flights from your AI agent. Unofficial.
概覽
非官方 MCP 伺服器,讓助理用自然語言搜尋瑞安航空單程票價、可達目的地與最便宜出發日期。
- 可以做什麼
- 依出發機場、目的地機場或國家、日期區間、價格上限與出發時段搜尋單程航班
- 查詢從某機場出發在指定價格內能飛往何處
- 探索從某機場可達的目的地,並依國家或地區分組
- 查詢某條航線在一個月內最便宜的一天
- 價格預設以歐元回傳,也可設定為其他貨幣
- 適用情境
- 適合讓助理回答瑞安航空票價問題,例如八月從都柏林飛西班牙的便宜航班,或某條航線最便宜的出發日,不必開啟瀏覽器。
- 執行需求
- 以 Python 套件形式在本機執行,透過 uv 或 pipx 安裝後提供 flyan-mcp 指令並寫入 MCP 用戶端設定。不需要 API 金鑰或帳號。需要能連線瑞安航空介面的網路。可選環境變數 FLYAN_CURRENCY 用來設定計價貨幣。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Flyan,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Flyan SDK
[PyPI version] [Python versions] [CI] [CodeQL] [PyPI downloads] [License]
An open-source unofficial API wrapper to get flight data from Ryanair.
[!TIP] New: MCP server for AI agents. Plug Flyan into Claude Desktop, Claude Code, or Cursor and search Ryanair flights in natural language. Jump to the MCP Quickstart.
Contents
- Installation
- Quick Start
- API Reference
- Data Models
- Examples
- Explore Mode
- Use with Claude, Cursor, and other MCP clients
- Supported Airports
- Supported Currencies
- Rate Limiting
- Contributing
- Disclaimer
Installation
Or using uv:
Quick Start
API Reference
RyanAir Class
Constructor
Creates a new RyanAir client instance.
Parameters:
currency(str, optional): Preferred currency for pricing. Defaults to "EUR". Must be a valid currency code from the supported currencies list.
Example:
Methods
get_oneways(params: FlightSearchParams) -> list[Flight]
Search for one-way flights.
Parameters:
params(FlightSearchParams): Search parameters
Returns:
list[Flight]: List of available flights
FlightSearchParams Class
Parameters for searching flights.
Parameters:
from_airport(str): IATA code of departure airport (e.g., "DUB")from_date(datetime): Earliest departure dateto_date(datetime): Latest departure datedestination_country(str, optional): Country code for destinationmax_price(int, optional): Maximum price filterto_airport(str, optional): IATA code of arrival airportdeparture_time_from(str, optional): Earliest departure time (HH:MM format)departure_time_to(str, optional): Latest departure time (HH:MM format)
Example:
ReturnFlightSearchParams Class
Extended parameters for return flight searches.
Data Models
Flight
Represents a single flight.
Attributes:
departure_airport(Airport): Departure airport informationarrival_airport(Airport): Arrival airport informationdeparture_date(datetime): Departure date and timearrival_date(datetime): Arrival date and timeprice(float): Flight pricecurrency(str): Price currencyflight_key(str): Unique flight identifierflight_number(str): Flight numberprevious_price(Optional[str | float]): Previous price if available
Airport
Represents airport information.
Attributes:
country_name(str): Country nameiata_code(str): IATA airport codename(str): Airport nameseo_name(str): SEO-friendly namecity_name(str): City namecity_code(str): City codecity_country_code(str): Country code
ReturnFlight
Represents a return flight booking.
Attributes:
outbound(Flight): Outbound flightinbound(Flight): Return flightsummary_price(float): Total price for both flightssummary_currency(str): Currency for total priceprevious_price(str | float): Previous total price if available
NetworkAirport
Represents an airport in Ryanair's live network. Returned by the explore methods.
Attributes:
iata_code(str): IATA airport codename(str): Airport nameseo_name(str): SEO-friendly namecountry_code(str): Lowercase ISO2 country code (e.g. "ie", "es")city_code(str): City code (e.g. "LONDON", "DUBLIN")region_code(Optional[str]): Region code (e.g. "SCOTLAND", "ANDALUSIA")currency_code(str): Local currency codetime_zone(str): IANA timezone (e.g. "Europe/Dublin")base(bool): True if this is a Ryanair baselatitude(float),longitude(float): Coordinatesroutes(list[str]): Raw route strings (year-round)seasonal_routes(list[str]): Raw route strings (seasonal-only)categories(list[str]): Marketing categories assigned by Ryanairaliases(list[str]): Alternative names
Helpers: airport_routes(), country_routes(), seasonal_airport_routes(),
typed_routes(), typed_seasonal_routes().
DestinationFare
Returned by explore_with_fares(). Pairs a reachable destination with its
cheapest sampled fare, if one was returned by the price probe.
Attributes:
airport(NetworkAirport): The destination airportfare(Optional[Flight]): The cheapest sampled fare in the window, orNoneif the route is in the network but no priced inventory came back (no flights in the window, sold out, etc.)
Examples
Search by Country
Filter by Time and Price
Error Handling
Explore Mode
Explore Mode answers the question "where can I actually fly from here?". It reads Ryanair's live network metadata once and exposes the reachable destinations from any airport, optionally grouped, filtered, or joined with the cheapest fare in a date window.
All methods below are available on both RyanAir and AsyncRyanAir.
List every destination
Filter by country, region or city
Country codes are lowercase ISO2. Region and city codes come from the live
network (uppercase, e.g. SCOTLAND, ANDALUSIA, COSTA_DE_SOL, LONDON,
MILAN).
Group destinations
Airports without a region_code are collected under the empty-string key,
so callers can decide whether to surface or drop them.
Seasonal-only destinations
Ryanair's seasonalRoutes list is sparsely populated upstream, so this often
returns [] outside of summer/winter schedule transitions. The method is
provided so callers do not need to peek at the raw route strings.
Destinations with their cheapest fare
explore_with_fares() joins the network destinations with a oneWayFares
probe, so each destination comes back with its cheapest sampled Flight (or
None if no fare was returned for that route in the window). It costs one
network call plus one fare call.
Async usage
AsyncRyanAir mirrors every explore method:
If you call multiple explore methods in a row, wrap the transport in
CachingTransport so the network metadata is fetched once and reused.
Use with Claude, Cursor, and other MCP clients
[!IMPORTANT] Two commands and you're done:
Now your agent can search Ryanair flights in natural language. No API keys, no accounts.
Flyan ships an optional Model Context Protocol server so your agent can search Ryanair fares from natural-language prompts like "find me a cheap flight from Dublin to Spain in August under €150" or "what's the cheapest day in July to fly DUB to BCN".
Quickstart
1. Install Flyan with the MCP extra:
Or with pip:
This installs a flyan-mcp console script on your PATH.
2. Add it to your agent:
Claude Code (one-liner):
Claude Desktop: open ~/Library/Application Support/Claude/claude_desktop_config.json
on macOS (or %APPDATA%\Claude\claude_desktop_config.json on Windows) and add:
Then restart Claude Desktop.
Cursor: Settings → MCP → Add new server, name flyan, command flyan-mcp.
Currency
The server returns prices in EUR by default. To get them in another
currency, set the FLYAN_CURRENCY env var to any supported ISO 4217 code
before launching flyan-mcp:
Or pass it through your agent's MCP config:
Unknown or unsupported codes silently fall back to EUR.
3. Try it. Ask your agent:
"Find me a one-way from Dublin to anywhere in Spain in the first week of August under €150."
The agent should call find_flights with destination_country="es", then
summarize the cheapest options.
Exposed tools
The server exposes four curated tools so the agent can pick reliably:
find_flightsfor one-way searches with optional country, IATA, or price filtersfind_anywhere_underfor "where can I go for under £X" promptsexplore_destinationsfor "what countries can I reach from X"cheapest_per_dayfor "what's the cheapest day this month to fly X to Y"
No API keys, accounts, or rate-limit setup. Ryanair's API is anonymous and
the server reuses a single RyanAir client across calls.
Supported Airports
The SDK supports all airports in Ryanair's network. Airport codes must be valid 3-letter IATA codes. The live list is fetched from Ryanair's aggregate endpoint via client.get_network(); iterate network.airports for the full set.
Popular airports include:
- DUB - Dublin
- STN - London Stansted
- BCN - Barcelona
- MAD - Madrid
- FCO - Rome Fiumicino
- BRU - Brussels
- AMS - Amsterdam
Supported Currencies
The SDK supports multiple currencies. Some popular ones include:
- EUR - Euro
- USD - US Dollar
- GBP - British Pound
- CHF - Swiss Franc
See currencies.json for the complete list.
Rate Limiting
The SDK includes automatic retry logic with exponential backoff to handle rate limiting and temporary API issues. It will retry failed requests up to 5 times before giving up.
Contributing
This is an open-source project. Contributions are welcome!
Disclaimer
This is an unofficial API wrapper and is not affiliated with Ryanair. Use at your own risk and ensure you comply with Ryanair's terms of service.
來源:README.md,提交 8b8c7fc
工具
0版本歷史
1- v0.4.4最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分