flyai
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseflyai
flyai
通过 调用飞猪 MCP 服务,提供多种旅行查询、预订能力所有命令输出为单行 JSON(stdout),错误/提示在 stderr所有命令统一输出单行 JSON 到 stdout,错误与提示输出到 stderr,便于与 、 等工具管道组合,实现筛选、排序和二次处理
flyai-clijqpythonCall the Fliggy MCP service via to provide various travel inquiry and reservation capabilities. All command outputs are single-line JSON (stdout), and errors/prompts are output to stderr. All commands uniformly output single-line JSON to stdout, and errors and prompts are output to stderr, facilitating pipeline combination with tools like and to achieve filtering, sorting, and secondary processing
flyai-clijqpython快速入门(Quick start)
Quick start
- 配置环境变量:设置 (可选) 和
FLYAI_MCP_URL(必选)FLYAI_API_KEY - 安装 CLI:
npm i -g @fly-ai/flyai-cli - 验证:执行 ,若返回 JSON 则说明配置正确
flyai fliggy-fast-search --query "三亚怎么玩" - 获取帮助:运行 查看所有命令和选项
flyai --help - 详细指南:各子命令的必填/可选参数及输出格式见下方
References
- Configure environment variables: Set (optional) and
FLYAI_MCP_URL(required)FLYAI_API_KEY - Install CLI:
npm i -g @fly-ai/flyai-cli - Verification: Execute , if JSON is returned, the configuration is correct
flyai fliggy-fast-search --query "How to play in Sanya" - Get help: Run to view all commands and options
flyai --help - Detailed guide: Required/optional parameters and output formats for each sub-command are available in below
References
主要功能
Main Features
时空查询
Spatiotemporal Query
- 时间查询 通过 获取准确的当前时间
date +%Y-%m-%d
- Time Query: Obtain the accurate current time via
date +%Y-%m-%d
综合查询
Comprehensive Query
- 旅行综合搜索 ():通过自然语言或关键词,一次性获取跨品类智能推荐,帮助用户快速发现旅行灵感与打包方案
fliggy-fast-search,将住宿与其他服务打包以一个相对优惠的价格出售酒店套餐,将机票与其他服务打包以一个相对优惠的价格出售机票套餐
- Travel Comprehensive Search (): Obtain cross-category intelligent recommendations through natural language or keywords to help users quickly discover travel inspirations and package solutions
fliggy-fast-search, which bundle accommodation with other services and sell at a relatively favorable priceHotel packages, which bundle flight tickets with other services and sell at a relatively favorable priceFlight packages
专业查询
Professional Query
通过专业筛选条件,获取某一品类的完整、精准结果,满足用户对航班、酒店或景点的深度对比需求
- 机票搜索 ():提供丰富的航班选择
search-flight - 酒店搜索 ():提供丰富的酒店选择
search-hotels - 景点搜索 ():提供丰富的景点选择
search-poi
Obtain complete and accurate results for a certain category through professional filtering conditions to meet users' needs for in-depth comparison of flights, hotels, or scenic spots
- Flight Search (): Provide a wide range of flight options
search-flight - Hotel Search (): Provide a wide range of hotel options
search-hotels - Scenic Spot Search (): Provide a wide range of scenic spot options
search-poi
References
References
- 旅行综合搜索
references/fliggy-fast-search.md - 酒店搜索
references/search-hotels.md - 机票搜索
references/search-flight.md - 景点搜索
references/search-poi.md
- Travel Comprehensive Search
references/fliggy-fast-search.md - Hotel Search
references/search-hotels.md - Flight Search
references/search-flight.md - Scenic Spot Search
references/search-poi.md
展示要求(Friendly display)
Display Requirements (Friendly display)
- 总体原则:严格按 正确格式输出,通过图文并貌的方式展示信息有
markdown必须展示jumpUrl,有预定链接或picUrl必须展示图片mainPic - 预定链接:单独输出一行 ,
[点击购买]({jumpUrl})从返回数据中获取jumpUrl时,单独输出一行机票搜索,[点击购买]({jumpUrl})从返回数据中获取jumpUrl时,单独输出一行酒店搜索,[点击购买]({jumpUrl})通过jumpUrl中references/fliggy-fast-search.md生成酒店预定链接输出规则时,单独输出一行景点搜索,[点击购买]({jumpUrl})通过jumpUrl中references/search-flight.md生成景点预定链接输出规则 - 图片展示:单独输出一行 ,
从返回数据中获取,友好的展示图片picUrl时,单独输出一行酒店搜索,从返回数据中获取,友好的展示预定地址mainPic - 层级结构:层次分明,使用标题(,
#,##等)来区分不同的部分和子部分简洁明了,每个条目尽量简短,避免冗长的句子时间顺序,行程安排按时间顺序排列,每天的活动也按时间顺序列出重要信息突出,使用加粗 (###) 或斜体 (** 文本 **) 来强调重要的信息,如日期、地点、费用等* 文本 * - 表格展示:使用 表格正确展示
markdown
严格按展示要求输出
- General Principle: Output strictly in correct format, display information in a combination of text and images. Must display the
markdownif there is aBooking Link, and must display images if there isjumpUrlorpicUrlmainPic - Booking Link: Output a separate line , where
[Book Now]({jumpUrl})is obtained from the returned datajumpUrlFor, output a separate lineFlight Search, where[Book Now]({jumpUrl})is obtained from the returned data ForjumpUrl, output a separate lineHotel Search, where[Book Now]({jumpUrl})is generated according to the "Hotel Reservation Link Output Rules" injumpUrlForreferences/fliggy-fast-search.md, output a separate lineScenic Spot Search, where[Book Now]({jumpUrl})is generated according to the "Scenic Spot Reservation Link Output Rules" injumpUrlreferences/search-flight.md - Image Display: Output a separate line , where
is obtained from the returned data to display images in a user-friendly mannerpicUrlFor, output a separate lineHotel Search, whereis obtained from the returned data to display the reservation address in a user-friendly mannermainPic - Hierarchical Structure: Clear hierarchy, use headings (,
#,##, etc.) to distinguish different sections and sub-sections. Concise and clear, each entry should be as short as possible to avoid lengthy sentences. Chronological order, travel arrangements should be listed in chronological order, and daily activities should also be listed in chronological order. Highlight important information, use bold (###) or italic (** Text **) to emphasize important information such as dates, locations, costs, etc.* Text * - Table Display: Display correctly using tables
markdown
Output strictly in accordance with the display requirements