Skip to main content
Glama

hostaway-mcp

npm version License: MIT MCP

一个开源的 Model Context Protocol (MCP) 服务器,将 Claude Desktop、Claude Code 和 Cursor 等 AI 助手连接到 Hostaway 物业管理 API。可以使用自然语言查询预订、房源、日历、财务和客人对话。

快速开始

  1. 从 Hostaway 控制台的 Settings > API 获取你的 Account ID 和 Client Secret

  2. 确保已安装 Node.js 18+

  3. 选择下方的 AI 客户端并添加配置 — 无需克隆或构建

Related MCP server: Lodgify MCP Server

设置

Claude Desktop(Mac 和 Windows)

打开你的 Claude Desktop 配置文件:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

添加以下内容(如果你已配置了其他服务器,请与现有的 mcpServers 合并):

{
  "mcpServers": {
    "hostaway": {
      "command": "npx",
      "args": ["-y", "@matt-long-plux/hostaway-mcp"],
      "env": {
        "HOSTAWAY_ACCOUNT_ID": "YOUR_ACCOUNT_ID",
        "HOSTAWAY_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

重启 Claude Desktop 即可使用。

Claude Code

选项 1 — CLI 命令(最快):

claude mcp add hostaway \
  -e HOSTAWAY_ACCOUNT_ID=YOUR_ACCOUNT_ID \
  -e HOSTAWAY_CLIENT_SECRET=YOUR_CLIENT_SECRET \
  -- npx -y @matt-long-plux/hostaway-mcp

选项 2 — 项目根目录下的 .mcp.json(适合与团队成员共享):

{
  "mcpServers": {
    "hostaway": {
      "command": "npx",
      "args": ["-y", "@matt-long-plux/hostaway-mcp"],
      "env": {
        "HOSTAWAY_ACCOUNT_ID": "YOUR_ACCOUNT_ID",
        "HOSTAWAY_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

Cursor

将相同的配置添加到项目的 .cursor/mcp.json,或前往 Cursor Settings > MCP Servers > Add Server 并粘贴:

{
  "mcpServers": {
    "hostaway": {
      "command": "npx",
      "args": ["-y", "@matt-long-plux/hostaway-mcp"],
      "env": {
        "HOSTAWAY_ACCOUNT_ID": "YOUR_ACCOUNT_ID",
        "HOSTAWAY_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

更新

如果你通过 npx 安装了之前的版本,系统可能缓存了旧副本。要更新到最新版本:

npx clear-npx-cache

然后重启你的 AI 客户端(Claude Desktop、Cursor 等)。下次启动时将自动拉取最新版本。

或者,你可以在配置中固定 @latest,以便每次重启时始终获取最新版本:

"args": ["-y", "@matt-long-plux/hostaway-mcp@latest"]

工具参考

预订

工具

描述

关键参数

list_reservations

使用筛选条件列出预订

listingMapId、dateFrom、dateTo、status、channelId、limit

get_reservation

获取完整的预订详情

reservationId(必填)

update_reservation_host_note

更新内部房东备注

reservationId、hostNote(必填)

list_reservations_by_property

按房源分组的当前和即将到来的预订

无

房源

工具

描述

关键参数

list_listings

所有带元数据的活跃房源

includeArchived

get_listing

完整的房源详情

listingId(必填)

get_listing_custom_fields

自定义字段值,以名称-值映射形式返回

listingId(必填)

日历

工具

描述

关键参数

get_calendar

可用性和定价日历

listingId、startDate、endDate(均必填)

get_gap_nights

查找预订之间的短时空档

listingId(必填)、startDate、endDate、maxGapLength

create_calendar_block

在日历上屏蔽日期

listingId、startDate、endDate(必填)、note

delete_calendar_block

移除日历屏蔽

listingId、calendarBlockId(必填)

财务

工具

描述

关键参数

get_reservation_financials

预订的财务明细

reservationId(必填)

get_revenue_summary

跨房源的汇总收入

dateFrom、dateTo(必填)、listingId

get_payout_report

用于对账的付款报告

dateFrom、dateTo(必填)、channelId

对话

工具

描述

关键参数

list_conversations

最近的客人对话

listingId、limit、unreadOnly

get_conversation

完整的消息线程

conversationId(必填)

send_message

向客人发送消息

conversationId、message(必填)

只读模式

设置 HOSTAWAY_READ_ONLY=true 以禁用所有写入/变更工具。启用后,以下工具将返回错误而不是执行:

  • update_reservation_host_note

  • create_calendar_block

  • delete_calendar_block

  • send_message

这对于共享账户或希望防止意外修改的情况非常有用。

环境变量

变量

必填

描述

HOSTAWAY_ACCOUNT_ID

是

你的 Hostaway 账户 ID(整数)

HOSTAWAY_CLIENT_SECRET

是

你的 Hostaway API 客户端密钥

HOSTAWAY_READ_ONLY

否

设置为 true 以禁用写入操作

HOSTAWAY_CACHE_TTL

否

令牌缓存 TTL(秒)(默认:240)

示例查询

连接后,尝试向 Claude 提问:

  • "显示所有即将到来的预订"

  • "我的房源下个月的入住率怎么样?"

  • "查找未来 90 天所有房源的间隔空档"

  • "我上个月赚了多少收入?"

  • "显示未读的客人消息"

  • "预订 12345 的财务详情是什么?"

  • "生成 3 月份 Airbnb 预订的付款报告"

贡献

欢迎提供反馈和拉取请求!请在 GitHub 上提交 issue,或发送邮件至 matt@plux.com。

许可证

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to interact with Hostaway's property management platform through standardized MCP tools. Provides access to listings, bookings, guest communication, and availability checking for vacation rental management.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Connects AI assistants to the Hostaway property management API via 10 read-only tools covering listings, reservations, calendars, guest conversations, and owner statements.
      10
      625 npm
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with the Channex.io API for managing properties, room types, rate plans, availability, rates, inventory, and channel connections through natural language.
      5
      MIT