关于 keithah-hostex-mcp
keithah-hostex-mcp 是面向度假租赁运营者的 MCP 服务,用于管理 Hostex 房源和住客事务。它提供预订、空房情况、房源刊登、消息、评价及 Webhook 等工具。
主要功能
- 01管理房源和房型
- 02创建、搜索及取消预订
- 03查询空房并封锁日期
- 04管理房源刊登、价格和库存
- 05与住客沟通并处理评价
- 06配置 Webhook 和自定义渠道
适用场景
- 01查看即将到来的预订
- 02封锁房源日历中的日期
- 03向住客发送消息
- 04更新各渠道的房源价格
MCP 相关
该服务将 Hostex 房源管理操作作为 MCP 工具提供给兼容客户端。它支持供本地客户端使用的 stdio,以及供远程客户端使用的 Streamable HTTP。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://server.smithery.ai/@keithah/hostex-mcp/mcpclaude mcp add --transport http ai-smithery-keithah-hostex https://server.smithery.ai/@keithah/hostex-mcp/mcp{"mcpServers":{"ai-smithery-keithah-hostex":{"type":"http","url":"https://server.smithery.ai/@keithah/hostex-mcp/mcp"}}}在 Cursor 中打开{"servers":{"ai-smithery-keithah-hostex":{"type":"http","url":"https://server.smithery.ai/@keithah/hostex-mcp/mcp"}}}在 VS Code 中打开{"mcpServers":{"ai-smithery-keithah-hostex":{"type":"http","url":"https://server.smithery.ai/@keithah/hostex-mcp/mcp"}}}{"mcpServers":{"ai-smithery-keithah-hostex":{"serverUrl":"https://server.smithery.ai/@keithah/hostex-mcp/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
https://server.smithery.ai/@keithah/hostex-mcp/mcp需要授权工具
详细介绍
hostex-mcp
用于 Hostex 房源管理 API 的模型上下文协议服务。通过 Claude 和其他 MCP 客户端管理度假租赁房源、预订、住客沟通等。
基于 hostex-ts 构建,这是一个适用于 Hostex API v3.0.0 的 TypeScript 客户端库。
功能
- 🏠 房源 - 房源和房型管理
- 📅 预订 - CRUD 操作、自定义字段、门锁密码
- 📊 可订状态 - 房源可订日历
- 📋 房源列表 - 渠道房源、定价、库存
- 💬 消息 - 与住客沟通和发送消息
- ⭐ 评价 - 评价管理与回复
- 🔗 Webhooks - 实时事件通知
- ⚙️ 实用工具 - 自定义渠道和收入方式
可用工具(25+)
hostex_list_properties- 列出所有房源hostex_list_room_types- 列出房型hostex_list_reservations- 搜索和筛选预订hostex_create_reservation- 创建直接预订hostex_cancel_reservation- 取消预订hostex_update_lock_code- 更新入住期间的门锁密码hostex_get_custom_fields- 获取自定义字段值hostex_update_custom_fields- 更新自定义字段hostex_list_availabilities- 查看房源可订状态hostex_update_availabilities- 封锁或开放日期hostex_list_conversations- 列出与住客的对话hostex_get_conversation- 获取对话详情hostex_send_message- 向住客发送消息hostex_list_reviews- 查询评价hostex_create_review- 留下评价或回复hostex_list_webhooks- 列出已配置的 Webhookhostex_create_webhook- 注册新 Webhookhostex_delete_webhook- 移除 Webhookhostex_get_listing_calendar- 获取房源日历hostex_update_listing_prices- 更新渠道价格hostex_list_custom_channels- 列出自定义渠道hostex_list_income_methods- 列出收入方式
安装
选项 1:通过 Smithery(推荐)
直接从 Smithery 安装:
npx -y @smithery/cli install @keithah/hostex-mcp --client claude
或者将托管服务 URL 添加到你的 MCP 客户端:
https://server.smithery.ai/@keithah/hostex-mcp/mcp
系统提示时,请提供你的 Hostex API 访问令牌。
选项 2:MCPB 包
- 从 Releases 下载最新的
.mcpb文件 - 双击该文件,在 MCP 客户端中安装
- 系统提示时,配置你的 Hostex API 令牌
选项 3:手动安装(Claude Desktop)
添加到你的 Claude Desktop 配置(macOS 上为 ~/Library/Application Support/Claude/claude_desktop_config.json,Linux 上为 ~/.config/Claude/claude_desktop_config.json):
{
"mcpServers": {
"hostex": {
"command": "npx",
"args": ["-y", "hostex-mcp"],
"env": {
"HOSTEX_ACCESS_TOKEN": "your_hostex_api_token"
}
}
}
}
或者使用 Smithery 托管服务:
{
"mcpServers": {
"hostex": {
"url": "https://server.smithery.ai/@keithah/hostex-mcp/mcp",
"env": {
"HOSTEX_ACCESS_TOKEN": "your_hostex_api_token"
}
}
}
}
配置
你需要 Hostex API 访问令牌。请前往 https://www.hostex.io/ 的 Hostex 账户设置获取令牌。
服务接受通过 configSchema 传入的配置:
accessToken(必填):你的 Hostex API 访问令牌
使用示例
安装后,你可以用自然语言向 Claude 提问,例如:
- “显示我的所有 Hostex 房源”
- “列出本周入住的预订”
- “将房源 12345 下周末设为不可订”
- “向对话 ABC123 中的住客发送欢迎消息”
- “我这个月收到了哪些评价?”
- “为房源 XYZ 创建直接预订”
开发
前置条件
- Node.js >= 18
- npm
设置
# Clone the repository
git clone https://github.com/keithah/hostex-mcp.git
cd hostex-mcp
# Install dependencies
npm install
# Build for stdio transport
npm run build:stdio
# Build for streamable HTTP transport
npm run build:shttp
# Build both transports
npm run build:all
本地测试
# Start dev server with Smithery
npm run dev
架构
此 MCP 服务使用:
- @modelcontextprotocol/sdk - MCP 协议实现
- @smithery/sdk - 多传输支持
- hostex-ts - Hostex API 客户端库
- zod - 架构验证
传输方式
该服务支持两种传输协议:
- stdio - 标准输入/输出(适用于 Claude Desktop 等本地 MCP 客户端)
- shttp - 流式 HTTP(适用于远程或基于 Web 的 MCP 客户端)
两者均使用 Smithery 构建,以实现无缝的多传输支持。
自动更新
此仓库包含一个 GitHub Actions 工作流,用于:
- 每小时检查 npm 上
hostex-ts是否有新版本 - 自动创建 PR 以更新依赖项
- 更新补丁版本号
- 重新构建 MCP 包
合并 PR 并创建新的发布标签后,MCPB 包会自动构建并附加到 GitHub 发布中。
要求
- Node.js >= 18
- 兼容 MCP 的客户端(Claude Desktop v0.10.0+,或任何 MCP 客户端)
- 可访问 API 的 Hostex 账户
文档
许可证
MIT
作者
Keith Hadfield
支持
- 问题反馈:GitHub Issues
- Hostex API:https://docs.hostex.io/
- MCP 文档:https://modelcontextprotocol.io/
注意:这是一个非官方的社区项目,Hostex 不提供官方支持。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。