一次 MCP 集成,
接完全部供应商。
面向 AI Agent 的统一分销接口:搜索、实时报价与两段式确认预订——报价自带证据,价格规则由你配置。
新的集成税
酒店供应商正在各自推出 MCP。每接一家就是新的账号体系、新的 ID 空间、新的价格黑箱——你的 Agent 要为每一家供应商重造一遍同样的管道,永远接不完。
聚合一次
全部供应商连接器(Dida、Tourmind、Yalago、Hotelbeds 等)在同一个 MCP 工具面后面。供应商明天再出新 MCP,只是我们的又一条上游通道——不是你的又一次集成。
三条接入路
同一工具面、同一契约——按 Agent 的运行环境选路。
本地网关
装得上软件的机器(Claude Code / Cursor / Codex):hbcli 起一个本地 stdio 网关,密钥留在本机凭据库,agent 配置里零秘密。
{ "mcpServers": { "hotelbyte":
{ "command": "hbcli", "args": ["mcp", "serve"] } } }静态钥匙
托管平台与 CI:一键换取长空闲钥匙(30 天无调用才失效,绝对寿命服务端封顶 365 天),直接写进配置。
$ hbcli mcp token
{ "type": "http", "url": "https://…/mcp",
"headers": { "Authorization": "Bearer <token>" } }OAuth 2.1 平台连接器
Claude 网页版 / ChatGPT 连接器:标准 RFC 9728/8414 发现 + 动态注册 + PKCE,同意页托管在我们侧,令牌即平台 JWT。
GET /.well-known/oauth-protected-resource → 401 WWW-Authenticate: resource_metadata=…
一分钟接入你的 Agent
每张卡都从一条命令开始——hbcli mcp setup <客户端>:自动写好配置(或打印 token 与逐字段填法)并验证连通。写工具依旧必须显式确认。
零门槛 · 先玩起来
hbcli mcp setup <客户端> --demo 现在就能用——公共沙箱身份已内置 CLI,无需注册、无需凭据,几秒搜到真实酒店;想要更多,随时升级到自己的租户。
接入你自己的租户
门户注册 → 发放 API 凭据 → hbcli auth set-credentials && hbcli mcp setup——你的供应商规则、你的加价、你的客户。一个用户可同时持有两层身份。
Claude CodeCLI一行接入远程 HTTP;或用本地 stdio 网关让密钥不出本机。
hbcli mcp setup claude-code # runs: claude mcp add hotelbyte --scope user -- hbcli mcp serve # (no claude on PATH? prints a paste-ready snippet instead)
CursorIDE全局 ~/.cursor/mcp.json 或项目内 .cursor/mcp.json。
hbcli mcp setup cursor # merges hotelbyte into ~/.cursor/mcp.json # (your other MCP servers are preserved)
ChatGPTConnector自定义插件(开发者模式):MCP URL + API key 认证——选 API key 而不是 OAuth,否则创建探测直接失败。
hbcli mcp setup chatgpt # prints your token + the exact form fields: # Server URL: https://api-test.hotelbyte.com/mcp # Authentication: API key ← NOT OAuth # Header: Authorization · Value: Bearer <token>
GrokConnector · xAIGrok 连接器——在 grok.com 添加自定义 MCP server,网页与手机 App 通用。
hbcli mcp setup grok # writes [mcp_servers.hotelbyte] into ~/.grok/config.toml # web/mobile connectors instead: grok.com/connectors → Custom # (hbcli mcp setup generic prints a token for it)
CodexCLI~/.codex/config.toml — stdio 网关。
hbcli mcp setup codex # appends [mcp_servers.hotelbyte] to ~/.codex/config.toml
AntigravityIDE · Google谷歌 agent-first IDE(I/O 2026 升至 2.0)——原生 MCP、浏览器操控、Agent 管理器。
hbcli mcp setup generic # token + fields, then paste into mcp_config.json
{ "mcpServers": { "hotelbyte":
{ "command": "hbcli", "args": ["mcp", "serve"] } } }
# note: no "type" field in Antigravity configsDevin DesktopAgent · CognitionCognition 自主 Agent 桌面端——前 Windsurf(2026 年 6 月并入)。
hbcli mcp setup generic # token + URL # Devin → Settings → MCP Marketplace → Add Your Own → paste # (needs the Manage MCP Servers permission)
Claude Desktop · WebConnectors设置 → 扩展/连接器 → 添加自定义连接器:粘贴端点 URL,认证选 Bearer。平台目录式连接器走上面的 OAuth 2.1 发现流。
hbcli mcp setup claude-connectors # prints your token, then: # Add custom connector → paste URL → auth: Bearer <token> # order.book / order.cancel always require confirm=true
VS Code · CopilotIDE工作区 .vscode/mcp.json(stdio 型)。
hbcli mcp setup vscode # writes .vscode/mcp.json in the current folder (servers key)
豆包 · DoubaoWork agent · ByteDance豆包电脑版(工作模式)——「技能·连接器」支持自定义 MCP:URL+token 直填,或本地命令方式。
hbcli mcp setup doubao # prints your token, then 豆包电脑版 → 技能·连接器: # 新建 → 自定义连接器 → URL + token # URL: https://api-test.hotelbyte.com/mcp # token: Bearer <token> # or command mode: hbcli mcp serve
WorkBuddyWorkbench · Tencent腾讯全场景 AI 办公工作台——开放平台(2026 年 9 月上线)支持 MCP 连接器:预置或自定义 Server。
hbcli mcp setup workbuddy # prints your token, then WorkBuddy → MCP 连接器 → 自定义 Server: # URL: https://api-test.hotelbyte.com/mcp # Header: Authorization · Value: Bearer <token>
TraeIDE · ByteDance字节 AI IDE——MCP 面板或 .trae/mcp.json。
hbcli mcp setup trae # writes [mcp_servers.hotelbyte] into ~/.trae/traecli.toml # (read by both Traex.app and the trae CLI)
Coze · 扣子Agent platform · ByteDance字节 Agent 平台——智能体/工作流挂 MCP 扩展。
hbcli mcp setup coze # prints your token, then Bot/工作流 → 扩展 → MCP: # Type: Streamable HTTP # URL: https://api-test.hotelbyte.com/mcp # Header: Authorization · Value: Bearer <token>
QoderIDE · Alibaba阿里 Agentic 编程平台——在设置中添加 MCP。
hbcli mcp setup generic # token + fields
{ "mcpServers": { "hotelbyte":
{ "command": "hbcli", "args": ["mcp", "serve"] } } }
# MCP settings → paste JSON (stdio) or remote URLCodeBuddyIDE · Tencent腾讯 AI 编程助手——在 MCP 设置中添加。
hbcli mcp setup generic # token + fields
{ "mcpServers": { "hotelbyte":
{ "command": "hbcli", "args": ["mcp", "serve"] } } }
# MCP settings → import or pasteCherry StudioDesktop · open source开源桌面 AI 客户端——设置 → MCP 服务器,支持 stdio 与 Streamable HTTP。
hbcli mcp setup cherry # prints your token, then 设置 → MCP 服务器 → 添加: # Type: Streamable HTTP · URL: .../mcp # Header: Authorization · Value: Bearer <token>
OpenClawOpen source · 20262026 年爆红的开源 Agent——工作流式工具编排,原生 MCP。
hbcli mcp setup generic # token + fields # register hotelbyte as an MCP tool source: transport: stdio command: hbcli mcp serve
HermesOpen source · 2026自主型开源 Agent,长期记忆——工具调用走 MCP。
hbcli mcp setup generic # token + fields Type: Streamable HTTP URL: https://api-test.hotelbyte.com/mcp Header: Authorization: Bearer <token>
ClineVS Code agent开源 VS Code Agent——MCP Servers 面板配置。
hbcli mcp setup cline # merges hotelbyte into cline_mcp_settings.json
Roo CodeVS Code agent开源 VS Code Agent(Cline 系)——MCP 设置。
hbcli mcp setup generic # token + fields # Roo Code → MCP Servers → Edit JSON → paste the snippet
Open WebUISelf-hosted chat自托管对话界面——用 mcpo 把 MCP 桥成工具接入。
hbcli mcp setup generic # token + fields uvx mcpo --port 8010 -- hbcli mcp serve # Open WebUI → Settings → Tools → http://localhost:8010
LangChain · LangGraphFrameworkPython Agent 框架——langchain-mcp-adapters 直接暴露全部工具。
hbcli mcp setup generic # get the token first
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({"hotelbyte": {
"url": "https://api-test.hotelbyte.com/mcp",
"transport": "streamable_http",
"headers": {"Authorization": "Bearer <token>"}}})
tools = await client.get_tools()CrewAIFramework多 Agent 编排——MCPServerAdapter 把端点变成 crew 工具。
hbcli mcp setup generic # get the token first
from crewai_tools import MCPServerAdapter
adapter = MCPServerAdapter({"hotelbyte": {
"url": "https://api-test.hotelbyte.com/mcp",
"headers": {"Authorization": "Bearer <token>"}}})
tools = adapter.tools()Dots · ChatGPTDevDay · 2026-09OpenAI 常驻 Agent(DevDay 2026·9-29)——每个 dot 跑在自己的云电脑上,以插件接入酒店供应。
hbcli mcp setup generic # token + fields 1. Settings → Security and login → Developer mode: ON 2. chatgpt.com/plugins → “+” → add MCP server (Bearer <token>) 3. Dot profile → Customize → Plugins → enable hotelbyte
InstinctPersonal · 2026-08爆火的消息式个人 Agent(在 iMessage/WhatsApp 里替你订机票酒店)——托管形态,供应由平台侧接入。
Hosted agent — no client-side config. Its platform team integrates the unified API / MCP behind the scenes: one contract, all suppliers. → Partner integration: sales@hotelbyte.com
KarpoPersonal · 2026MachinePulse 的城市搭子(iMessage 内)——行程、餐厅、住宿;供应走平台侧对接。
Hosted agent — no client-side config. City-plan tools call the unified API / MCP behind the scenes: one contract, all suppliers. → Partner integration: sales@hotelbyte.com
通用 Agent · 自研JSON-RPC无需 SDK:MCP over streamable-http 就是三次 JSON-RPC 调用。任何语言、框架、运行时都适用——包括你自研的 Agent。官方 SDK(Python mcp、TypeScript @modelcontextprotocol/sdk)指向同一 URL 即可。
POST https://api-test.hotelbyte.com/mcp
Authorization: Bearer <token> · Accept: application/json, text/event-stream
# 1) initialize — protocol version + client info
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
"protocolVersion":"2025-06-18","capabilities":{},
"clientInfo":{"name":"my-agent","version":"1.0"}}}
# 2) tools/list — discover the tools and their schemas
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
# 3) tools/call — search hotels in Dubai for two adults
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{
"name":"hotel.list","arguments":{
"destinationName":"Dubai","checkIn":"2026-11-20","checkOut":"2026-11-22",
"rooms":[{"adultCount":2}]}}}每个结果都返回 { response, evidence }——保留 traceId 以便对账。order.book 需先 check_avail 且携带 confirm=true;重试复用 customerReferenceNo。
Token 来源:hbcli mcp token(静态钥匙,闲置 30 天失效)或门户签发的 ticket。这里绝不放供应商凭据——它就是你的 HotelByte 身份。
工具面
工具覆盖完整交易。写工具仅在部署显式开启时存在——且没有显式确认绝不执行。
hotel.list读搜索酒店,返回 sessionId 贯穿全流程hotel.rates读房型与实时报价,含退款政策与取消费hotel.check_avail读两段式第一段:下单前复核库存与价格order.query读订单状态与确认号回查order.book写 · 需确认需 confirm=true;customerReferenceNo 即幂等键order.cancel写 · 需确认需 confirm=true;取消可能收费且不可逆报价自带证据
每个工具结果返回 { response, evidence }。response 与 HTTP API 同构;证据信封让每条报价可引用、可追溯——把 traceId 交给服务方即可还原那一次报价的完整链路。
{
"response": { "list": [ … ] },
"evidence": {
"tool": "hotel.list",
"traceId": "20261003…",
"sessionId": "S-2026…",
"currency": "USD"
}
}预订的硬确认边界
- hotel.rates — 把价格、退款政策与取消费展示给用户。
- hotel.check_avail — 复核确切报价;实时价格会变。
- order.book 携带 confirm=true — 仅在用户点头之后。差一点都会在订单流程启动前被服务端拒绝。
- 重试复用 customerReferenceNo — 按键幂等,重复下单以软警告形式出现、必须显式确认。
现在就试沙箱
UAT · no SLA沙箱端点公开可达。任意 MCP 客户端持有效 ticket 即可初始化:
curl -X POST https://api-test.hotelbyte.com/mcp \
-H "Authorization: Bearer <ticket>" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'采购视角
评估 AI 分销接口时看什么
不点名任何厂商。三个问题区分「聚合层」与「又一家单库存 MCP」——且每一条都可以当场验证。
是不是又一家"只有自家库存"的供应商 MCP
不是。我们是聚合层:全部供应商连接器在一个工具面后面,未来供应商新出的 MCP 只是我们的又一种上游通道。
同一个 destinationName 跑一次 hotel.list,看返回是否覆盖多家供应商的报价与最低价。
Agent 会不会误触发真实预订
不会。order.book 必须携带 confirm=true(用户对确切价格/日期/取消政策点头之后);缺失或为 false 的调用在服务端被拒绝,订单流程根本不会启动。
不带 confirm 参数调用 order.book,观察是否返回明确的拒绝信息且订单不产生。
价格透明到什么程度
每条报价带证据信封(traceId/sessionId/币种/时间),可引用可追溯;成本与加价构成的分级开放由规则配置控制,而不是黑箱。
拿返回里的 traceId 找服务方对账,看能否还原这一次报价的完整链路。