使用说明
好客的MCP服务器-微风海滩住宿
将Claude连接到Hospitable API v2的MCP服务器。支持双重传输:
- 工作室 克劳德桌面(本地)
- 流式HTTP 用于claude.ai自定义连接器(远程)
可用工具
| 工具 | 说明 |
|---|---|
list_properties |
列出所有50多个房产 |
get_property |
获取特定房产的详细信息 |
search_properties |
查找日期范围内的可用房产 |
list_reservations |
使用筛选器列出预订(需要属性UUID) |
get_reservation |
完整的预订详情和财务信息 |
get_upcoming_checkins |
在接下来的N天内办理所有酒店的入住手续 |
get_upcoming_checkouts |
所有酒店将在未来N天内退房 |
get_calendar |
物业的定价和可用性日历 |
update_calendar |
更新价格/可用性/最低入住时间(价格以美分计) |
list_messages |
获取预订的客人对话线索 |
send_message |
通过预订平台向客人发送消息 |
list_reviews |
获取房产评论 |
respond_to_review |
发布公众评论回复 |
get_account_info |
验证API连接/获取帐户详细信息 |
快速设置
1.接受热情的PAT
- 登录my.hospitable.com
- 前往应用程序>API访问>访问令牌
- 单击+添加新,选择读取和写入权限
- 复制令牌
2.安装
cd hospitable-mcp
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
3a。克劳德桌面(STDIO)
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"hospitable": {
"command": "/path/to/hospitable-mcp/venv/bin/python",
"args": ["/path/to/hospitable-mcp/server.py"],
"env": {
"HOSPITABLE_PAT": "your-token-here"
}
}
}
}
重新启动克劳德桌面。您应该在MCP工具列表中看到“Hospitable”。
3b。Claude.ai自定义连接器(流式HTTP)
以HTTP模式启动服务器:
export HOSPITABLE_PAT="your-token-here"
python server.py --http --port 8000
然后在claude.ai中:
- 前往“设置”>“集成”(或“连接器”菜单)
- 添加自定义连接器
- 请输入您的服务器URL:
http://your-server-ip:8000/mcp
对于生产环境,使用HTTPS在反向代理(nginx/caddy)后面运行。
3c。作为后台服务运行(macOS)
创建 ~/Library/LaunchAgents/com.breezy.hospitable-mcp.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.breezy.hospitable-mcp</string>
<key>ProgramArguments</key>
<array>
<string>/path/to/hospitable-mcp/venv/bin/python</string>
<string>/path/to/hospitable-mcp/server.py</string>
<string>--http</string>
<string>--port</string>
<string>8000</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>HOSPITABLE_PAT</key>
<string>your-token-here</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/hospitable-mcp.log</string>
<key>StandardErrorPath</key>
<string>/tmp/hospitable-mcp.err</string>
</dict>
</plist>
加载它:
launchctl load ~/Library/LaunchAgents/com.breezy.hospitable-mcp.plist
API重要说明
/reservations端点要求properties[]作为一个参数。始终先获取属性。- 日历价格以美分为单位。150美元/晚=15000美元。
- 消息速率限制:每次预订2/分钟,全球50/5分钟。
- 日历更新速率限制:1000请求/分钟。
- 没有发件人字段的消息是人工智能生成的(医院自动化)。
- PAT代币将在约1年后过期。在my.hospitable.com上轮换。
与其他MCP服务器结合
Claude Desktop支持多个MCP服务器。配置示例:
{
"mcpServers": {
"hospitable": {
"command": "/path/to/hospitable-mcp/venv/bin/python",
"args": ["/path/to/hospitable-mcp/server.py"],
"env": { "HOSPITABLE_PAT": "your-token" }
},
"pricelabs": {
"command": "python",
"args": ["/path/to/pricelabs-mcp/server.py"],
"env": { "PRICELABS_API_KEY": "your-key" }
}
}
}
故障排除
“未设置HOSPITABLE_PAT环境变量”
- 确保在Claude Desktop配置或shell中设置了env var
401未经授权
- 您的PAT可能已过期。从my.hospitable.com生成一个新的
速率限制错误(429)
- 请稍候,然后重试。服务器在错误中返回速率限制详细信息。
STDIO模式有效,但HTTP无法从claude.ai连接
- 确保防火墙允许端口上的入站
- 如果在路由器后面,请设置端口转发或使用隧道(ngrok、Cloudflare隧道)
- claude.ai定制连接器在生产中需要HTTPS