Metadata-Version: 2.4
Name: mcp-fliggy-travel
Version: 0.1.1
Summary: 飞猪旅行一站式MCP Server — 行程规划/火车票/机票/酒店/景点/美食/市内交通，自然语言输入，实时价格+预订链接
Author: Fliggy Travel MCP Team
License-Expression: MIT
License-File: LICENSE
Keywords: fliggy,flight,food,hotel,mcp,train,transport,travel,旅行,机票,火车票,美食,酒店,飞猪
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Other/Nonlisted Topic
Requires-Python: >=3.10
Requires-Dist: cryptography>=44.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp[cli]>=1.9.2
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# ✈️ 飞猪旅行一站式 MCP Server

行程规划 / 火车票查询 / 机票查询 / 酒店搜索 / 景点门票 / 美食推荐 / 市内交通，7 大功能一站搞定。

所有工具支持**自然语言输入**，返回实时价格和预订链接。

## 🛠 工具列表

| # | 工具 | 功能 | 示例 |
|---|------|------|------|
| 1 | `travel_plan` | 行程规划 | "三亚5天亲子游预算1万" |
| 2 | `search_train` | 火车票查询 | "上海到北京明天的高铁" |
| 3 | `search_flight` | 机票查询 | "上海飞三亚6月1日" |
| 4 | `search_hotel` | 酒店搜索 | "三亚亚龙湾500元以内亲子酒店" |
| 5 | `search_poi` | 景点门票 | "杭州5A景区门票" |
| 6 | `search_food` | 美食推荐 | "上海南京路附近火锅" |
| 7 | `search_transport` | 市内交通 | "上海浦东机场到外滩" |

## 🆚 核心差异化

| | 传统OTA API | 飞猪旅行 MCP |
|---|---|---|
| **输入方式** | 结构化参数（城市代码、日期格式） | **自然语言**，像人一样说话 |
| **工具数量** | 需多个独立API | **7合1**，一个MCP全搞定 |
| **智能推荐** | 无，原始数据返回 | **行程规划**自动推荐交通+住宿+景点 |
| **跨服务提示** | 无 | 查完火车票自动提示酒店/美食 |
| **预订链接** | 无 | **实时预订链接**，可直接下单 |

## 📦 安装

```bash
pip install mcp-fliggy-travel
```

## ⚙️ 配置

需要配置飞猪 FlyAI API 密钥和高德地图 API Key：

```bash
export FLYAI_API_KEY="your_flyai_api_key"
export FLYAI_SIGN_SECRET="your_flyai_sign_secret"
export GAODE_API_KEY="your_gaode_api_key"
```

- **FLYAI_API_KEY**（必填）：飞猪 FlyAI 平台 API Key，[申请地址](https://flyai.open.fliggy.com/)
- **FLYAI_SIGN_SECRET**（必填）：飞猪 FlyAI 签名密钥，申请 API Key 时一同获取
- **GAODE_API_KEY**（选填）：高德地图 API Key，不配置时使用内置 Key（美食推荐和市内交通功能需要）

## 🚀 MCP 客户端配置

```json
{
  "mcpServers": {
    "fliggy-travel": {
      "command": "uvx",
      "args": ["mcp-fliggy-travel"],
      "env": {
        "FLYAI_API_KEY": "your_flyai_api_key",
        "FLYAI_SIGN_SECRET": "your_flyai_sign_secret",
        "GAODE_API_KEY": ""
      }
    }
  }
}
```

## 📝 使用示例

- "帮我规划三亚5天亲子游" → `travel_plan`
- "上海到北京明天的高铁" → `search_train`
- "查一下上海飞三亚的机票" → `search_flight`
- "三亚亚龙湾500元以内的酒店" → `search_hotel`
- "杭州有什么5A景区" → `search_poi`
- "推荐上海外滩附近的火锅" → `search_food`
- "浦东机场到外滩怎么走" → `search_transport`

## 📄 许可证

MIT License
