Skip to content

常用 Client 配置

本文档说明如何在 Cursor、OpenClaw、CoPaw、LobsterAI 等客户端中配置途牛 MCP 服务。各品类(酒店、机票、门票、火车票、邮轮)的配置方式相同,仅需替换 Server 名称URL

品类Server 名称URL
酒店tuniu-hotelhttps://openapi.tuniu.cn/mcp/hotel
机票tuniu-flighthttps://openapi.tuniu.cn/mcp/flight
门票tuniu-tickethttps://openapi.tuniu.cn/mcp/ticket
火车票tuniu-trainhttps://openapi.tuniu.cn/mcp/train
邮轮tuniu-cruisehttps://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 替换为对应品类后缀即可(如 flighttickettraincruise),详见上表。


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-flighttuniu-tickettuniu-traintuniu-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 替换为对应品类后缀即可(如 flighttickettraincruise),详见上表。


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 替换为 flighttickettraincruise 即可,详见上表。

Powered by VitePress