Skip to main content

酒店搜索与智能推荐 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

mcp_hotel_recommend-0.1.2.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_hotel_recommend-0.1.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_hotel_recommend-0.1.2.tar.gz.

File metadata

  • Download URL: mcp_hotel_recommend-0.1.2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for mcp_hotel_recommend-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1da6e1adc99cbbe38d1a20f24212c3e90f9c5d2e28587201c1c2873d456e0e2f
MD5 0c09fa9ff8f974f503bcd3c2d3265194
BLAKE2b-256 9bc5fe5d219228dabcee9b18c8d06a8b932a0c445824499e93ed451d35aa78ae

See more details on using hashes here.

File details

Details for the file mcp_hotel_recommend-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_hotel_recommend-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa9a1e8b18bdbf3af6c2a4a790efc85fe1c4ec56e1c5bab1dfc3bc3d3f45da1
MD5 5bd58a3ed994a9992b07c44fe9419a4d
BLAKE2b-256 3379c3d957e7ab77a5a6ae240e1ee9b4b0213713a9839288339d264a4f16a14f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page