常用 Client 配置
本文档说明如何在 Cursor、OpenClaw、CoPaw、LobsterAI 等客户端中配置途牛 MCP 服务。各品类(酒店、机票、门票、火车票、邮轮)的配置方式相同,仅需替换 Server 名称 和 URL。
| 品类 | Server 名称 | URL |
|---|---|---|
| 酒店 | tuniu-hotel | https://openapi.tuniu.cn/mcp/hotel |
| 机票 | tuniu-flight | https://openapi.tuniu.cn/mcp/flight |
| 门票 | tuniu-ticket | https://openapi.tuniu.cn/mcp/ticket |
| 火车票 | tuniu-train | https://openapi.tuniu.cn/mcp/train |
| 邮轮 | tuniu-cruise | https://openapi.tuniu.cn/mcp/cruise |
1. Cursor IDE
配置路径:
- Cursor Settings → Tools & MCP → 新增
配置示例:
json
{
"mcpServers": {
"tuniu-hotel": {
"url": "https://openapi.tuniu.cn/mcp/hotel",
"transport": "http",
"headers": {
"apiKey": "YOUR_API_KEY"
}
}
}
}以上以酒店为例。如需其他品类,将
tuniu-hotel和 URL 中的hotel替换为对应品类后缀即可(如flight、ticket、train、cruise),详见上表。
2. OpenClaw
打开命令行工具(Terminal / 命令提示符),选择以下任意一种方式安装。
方式一:npx 直接安装
bash
npx clawhub@latest install tuniu-hotel方式二:全局安装 clawhub
bash
npm i -g clawhub
clawhub install tuniu-hotel如遇
Rate limit exceeded,请先执行clawhub login --token 你的TOKEN再重新安装。TOKEN 可在 clawhub.ai/settings 获取。
方式三:手动安装(备选)
如遇安装失败,可下载对应 SKILL 文件手动安装至 OpenClaw:
| 品类 | 下载链接 |
|---|---|
| 酒店 | tuniu-hotel-SKILL.md |
| 机票 | tuniu-flight-SKILL.md |
| 门票 | tuniu-ticket-SKILL.md |
| 火车票 | tuniu-train-SKILL.md |
| 邮轮 | tuniu-cruise-SKILL.md |
安装成功示例:
log
✔ OK. Installed tuniu-hotel -> /root/.openclaw/workspace/skills/tuniu-hotel以上以酒店为例。如需其他品类,将命令中的
tuniu-hotel替换为tuniu-flight、tuniu-ticket、tuniu-train或tuniu-cruise即可。
安装完成后,在聊天界面提供 apiKey 即可使用。
3. CoPaw
配置路径:
- 侧边栏:智能体 → MCP → 创建客户端
配置示例:
json
{
"mcpServers": {
"tuniu-hotel": {
"url": "https://openapi.tuniu.cn/mcp/hotel",
"transport": "http",
"headers": {
"apiKey": "YOUR_API_KEY"
}
}
}
}以上以酒店为例。如需其他品类,将
tuniu-hotel和 URL 中的hotel替换为对应品类后缀即可(如flight、ticket、train、cruise),详见上表。
4. LobsterAI IDE
配置路径:
- LobsterAI IDE 左侧目录 MCP → 自定义 → 新增
配置示例:
服务名称:
tuniu-hotel MCP 服务
描述:
tuniu-hotel MCP 服务提供基于 MCP 协议的酒店查询和在线预订功能
传输类型:
HTTP 流式传输
URL:
https://openapi.tuniu.cn/mcp/hotel
请求头:
apiKey - YOUR_API_KEY以上以酒店为例。其他品类将服务名称、描述和 URL 中的
hotel替换为flight、ticket、train或cruise即可,详见上表。
