酒店搜索与智能推荐 MCP Server — 场景路由+退改解读, 1次调用=搜索+详情+解读, 极省Token
Project description
🏨 mcp-hotel-recommend
酒店搜索与智能推荐 MCP Server — 场景路由 + 退改解读,1 次调用 = 搜索 + 详情 + 解读,极省 Token。
🆚 核心差异化 vs RollingGo
| RollingGo | mcp-hotel-recommend | |
|---|---|---|
| 工具数 | 3 个独立工具 (searchHotels/getHotelDetail/getHotelSearchTags) | 1 个统一工具 hotel_search_and_recommend |
| 调用次数 | AI Agent 需调 3 次:搜索→详情→标签 | 1 次调用完成全部流程 |
| 场景识别 | 无,用户需自己判断筛选条件 | 自动检测:商务/亲子/度假/背包/通用 |
| 退改政策 | 原始 JSON 返回,Agent 需自己解读 | 人类可读解读:05月31日后取消扣¥553 |
| Token 消耗 | 高(3 次调用 + 原始数据) | 极省 Token(精简 emoji 格式) |
| API 透明 | 直接透传 | 智能路由 + 格式化 + 解读 |
🛠 工具
| 工具 | 功能 | 典型场景 |
|---|---|---|
hotel_search_and_recommend |
场景路由搜索 → Top3 详情 → 退改解读 → 极简输出 | "出差上海住哪好" "带娃去三亚住哪" "杭州经济酒店" |
📦 安装
pip install mcp-hotel-recommend
⚙️ 配置
需要 AigoHotel API 密钥:
export HOTEL_API_KEY="your_api_key_here"
🚀 使用
命令行
# STDIO 模式 (默认)
mcp-hotel-recommend
# 或
python -m mcp_hotel_recommend
MCP 客户端配置
在 Claude Desktop / Cherry Studio / ChatBox 等 MCP 客户端中添加:
{
"mcpServers": {
"hotel-recommend": {
"command": "mcp-hotel-recommend",
"env": {
"HOTEL_API_KEY": "your_api_key_here"
}
}
}
}
开发测试
# 安装 FastMCP CLI
pip install "mcp[cli]"
# 交互式测试
mcp dev src/mcp_hotel_recommend/server.py
# 检查工具列表
mcp inspect src/mcp_hotel_recommend/server.py
💡 使用示例
商务出差
hotel_search_and_recommend(
destination="上海",
scene="商务",
check_in="2026-06-15",
check_out="2026-06-17",
query="出差上海住哪好"
)
输出:
💼商务推荐 · 上海 · 2026-06-15
1️⃣ 上海花园饭店 ⭐5 💰¥924/晚
📍 茂名南路58号 | 距目标1131m
🏷️ 商务酒店 免费WiFi 健身房
🔄 退改:05月30日后取消扣¥922
🔗 https://rollinggo.cn/...
亲子出游(场景自动检测)
hotel_search_and_recommend(
destination="三亚",
query="带娃去三亚住哪好"
)
# 自动检测为"亲子"场景
通用搜索
hotel_search_and_recommend(destination="杭州")
🎯 场景路由
| 场景 | 关键词 | 标签策略 |
|---|---|---|
| 💼 商务 | 出差/商务/办公/会议/商旅 | 必选:商务酒店;优选:免费WiFi/24小时前台 |
| 👨👩👧 亲子 | 亲子/家庭/带娃/遛娃 | 必选:亲子酒店;优选:儿童乐园/儿童泳池 |
| 🌴 度假 | 度假/情侣/蜜月/温泉 | 优选:度假酒店/SPA/户外泳池 |
| 🎒 背包 | 穷游/学生/青旅/便宜 | 优选:性价比酒店;排除:仅限成人入住 |
| 🏨 通用 | 无匹配关键词 | 无标签过滤 |
🔄 退改政策解读
自动将原始 JSON 退改政策解读为人类可读文字:
| 原始数据 | 解读结果 |
|---|---|
{amount: 0} |
05月30日前免费取消 |
{amount: 553} |
05月31日后取消扣¥553 |
{amount: 922, fromDate >= 入住日} |
入住当日取消扣¥922 |
| 无退改数据 | 暂无退改信息 |
📄 许可证
MIT License
🏨 mcp-hotel-recommend (English)
Hotel Search & Smart Recommendation MCP Server — Scene routing + cancellation policy interpretation, 1 call = search + detail + interpretation, extreme token saving.
Key Differentiator vs RollingGo
| RollingGo | mcp-hotel-recommend | |
|---|---|---|
| Tools | 3 separate tools | 1 unified tool |
| Calls | 3 calls: search→detail→tags | 1 call for everything |
| Scene Detection | None | Auto-detect: business/family/vacation/backpack/general |
| Cancellation | Raw JSON | Human-readable interpretation |
| Token Usage | High (3 calls + raw data) | Minimal (emoji-formatted) |
Install
pip install mcp-hotel-recommend
Configure
export HOTEL_API_KEY="your_api_key"
MCP Client Config
{
"mcpServers": {
"hotel-recommend": {
"command": "mcp-hotel-recommend",
"env": {
"HOTEL_API_KEY": "your_api_key"
}
}
}
}
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_hotel_recommend-0.1.1.tar.gz.
File metadata
- Download URL: mcp_hotel_recommend-0.1.1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65c90b3d7d1db3f0cb7679e564f31d28825f46ee4795c215891a1dd97c85d278
|
|
| MD5 |
4c0074f26188054397f9eeed00b88e95
|
|
| BLAKE2b-256 |
f325b9356a8b9fd00bcffca66fc5449badbea627473e56562c5f648f938d74ea
|
File details
Details for the file mcp_hotel_recommend-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcp_hotel_recommend-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4b152a0132bf6e8cea9808a78cebb5f9457ec85346e5b90478a3376de0bd260
|
|
| MD5 |
13ed59551abd9a68df129d37b24872ee
|
|
| BLAKE2b-256 |
8787e2d22d92c9dbab6aee273b29b79723543849a5bf68f4260ccbc03cc9a8f1
|