Skip to main content

mcp-fliggy-travel v0.5.0(SCF 代理版 / 用户自带 Key)

飞猪旅行一站式 MCP Server:11 个工具(行程规划、机票、火车票、酒店、景点门票、美食、市内交通等)。 数据源:飞猪旅行 SCF 代理(9 个工具)+ 高德地图 SCF 代理(美食/交通)。

v0.5.0 核心设计:每个使用者必须配置自己的飞猪 API Key 才能调用飞猪工具。

  • MCP 包、SCF 代码、公开源码中不含任何开发者 Key;
  • 签名密钥只存在 SCF 环境变量(FLYAI_SIGN_SECRET),使用者完全不可见;
  • 调用飞猪时以使用者的 Key 作为鉴权,调用量计入使用者自己的 Key,与开发者配额完全隔离。

⚠️ 版本演进

  • v0.4.2:源码内置 SCF 地址与令牌,任何人可盗刷 → 已废弃。
  • v0.4.3:SCF 地址/令牌改为环境变量注入,但后端仍使用开发者的共享 Key,所有用户共享同一配额。
  • v0.5.0:强制用户自带 Key。SCF 不再配置共享 Key,缺少用户 Key 的请求一律 401 拒绝。

环境变量

部署方(魔搭后台配置,使用者不可见/不可改)

变量 必填 说明
FLYAI_PROXY 是(飞猪工具) 飞猪 SCF 代理地址,如 https://xxx.ap-guangzhou.tencentscf.com
FLYAI_PROXY_TOKEN 是(飞猪工具) 飞猪 SCF 代理令牌(与代理侧 PROXY_TOKEN 一致)
GAODE_PROXY_TOKEN 按需 高德 SCF 代理令牌(美食/交通用)

使用者(魔搭 MCP 连接时的环境变量,必须填写)

变量 必填 说明
FLYAI_API_KEY 是 你自己的飞猪开放平台 API Key。前往飞猪开放平台(open.fliggy.com)申请;填入后所有飞猪调用以此 Key 计费

未填写 FLYAI_API_KEY 时,飞猪相关工具返回明确错误提示:去飞猪开放平台申请 Key。

魔搭 hosted MCP 部署步骤

  1. 发布本包到 PyPI(0.5.0)。
  2. 在魔搭后台,将 MCP 的安装参数改为 mcp-fliggy-travel==0.5.0。
  3. 在魔搭后台"环境变量配置"中填写部署方变量:FLYAI_PROXY、FLYAI_PROXY_TOKEN。
  4. 使用者在魔搭上连接该 MCP 时,在环境变量中填写自己的 FLYAI_API_KEY。
  5. 自测:不带 Key 调用 → 401/错误提示;带自己 Key 调用 → 正常返回。

本地直跑(调试)

FLYAI_PROXY=https://your-proxy-url \
FLYAI_PROXY_TOKEN=your-token \
FLYAI_API_KEY=sk-你的key \
uvx mcp-fliggy-travel==0.5.0

安装运行(MCP 客户端)

{
  "mcpServers": {
    "fliggy-travel": {
      "command": "uvx",
      "args": ["--from", "mcp-fliggy-travel==0.5.0", "mcp-fliggy-travel"],
      "env": {
        "FLYAI_API_KEY": "sk-你的key",
        "FLYAI_PROXY": "https://your-proxy-url",
        "FLYAI_PROXY_TOKEN": "your-token"
      }
    }
  }
}

工具列表

工具 说明
🗺️ travel_plan 行程规划:自然语言描述需求,智能推荐行程方案
🚄 search_train 火车票查询:余票、价格、时刻表、预订链接
✈️ search_flight 机票查询:实时票价、航班号、起降时间
🏨 search_hotel 酒店搜索:按目的地、星级、价格、关键词筛选
🎫 search_poi 景点门票:门票价格、购票链接
🍜 search_food 美食推荐:周边餐厅、评分、人均、地址(高德)
🚇 search_transport 市内交通:打车预估、公交地铁方案(高德)
⚡ search_fast 极速搜索:飞猪通用搜索极速版
🏨 search_marriott_hotel 万豪酒店搜索
📄 get_marriott_hotel_info 万豪酒店详情
🎁 search_marriott_package 万豪酒店套餐搜索

Metadata

Release files for mcp-fliggy-travel 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-fliggy-travel 0.5.0
File Size Uploaded Provenance
mcp_fliggy_travel-0.5.0.tar.gz 14.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-fliggy-travel 0.5.0
File Interpreter ABI Platform
mcp_fliggy_travel-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.5 kB

Release files / mcp_fliggy_travel-0.5.0.tar.gz

Download URL mcp_fliggy_travel-0.5.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1890c7f47cfebc151eb99ae1430db196f2aeb58f824616d43cd00b514185de1d
BLAKE2b-256 checksum
How to use checksums
f3c198dad939f0383e9387acf9ed3eb87fd05d4b22b9f60996c3e9cdd78577bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / mcp_fliggy_travel-0.5.0-py3-none-any.whl

Download URL mcp_fliggy_travel-0.5.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d565ddc74987efe9bdd1ed3132ebf3f580ae793be7453f1ba2380bdac4806c92
BLAKE2b-256 checksum
How to use checksums
8dd64632c5db31244c29d702d96b874e159ef54d8ebdcd21e03040cb3095c0c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for mcp-fliggy-travel 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page