关于 NuVista Haven MCP Server
NuVista Haven MCP Server 是面向 NuVista Haven 度假租赁业务的只读 AI 前台,供宾客查询房源、日期可订状态和价格。它从 Hospitable 获取实时日历,并返回 NuVista Haven 上的直接预订链接。
主要功能
- 01搜索度假房源
- 02查询日期可订状态
- 03按晚数及清洁费计算报价
- 04提供直接预订链接
- 05仅通过 GET 请求读取数据
适用场景
- 01回答宾客关于房源的查询
- 02按入住日期确认空房情况
- 03提供住宿报价与预订入口
MCP 相关
该服务通过 MCP 暴露房源搜索、可订状态、报价和预订链接工具。它可通过 stdio 或 Streamable HTTP 接入,并以只读方式查询 Hospitable 数据。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
服务地址
https://nuvista-haven-mcp.onrender.com/mcp一键复制安装命令
Claude CodeTerminal
claude mcp add --transport http cswarey16-nuvista-haven https://nuvista-haven-mcp.onrender.com/mcpCursor.cursor/mcp.json
{"mcpServers":{"cswarey16-nuvista-haven":{"type":"http","url":"https://nuvista-haven-mcp.onrender.com/mcp"}}}在 Cursor 中打开VS Code.vscode/mcp.json
{"servers":{"cswarey16-nuvista-haven":{"type":"http","url":"https://nuvista-haven-mcp.onrender.com/mcp"}}}在 VS Code 中打开Claude Desktopclaude_desktop_config.json
{"mcpServers":{"cswarey16-nuvista-haven":{"type":"http","url":"https://nuvista-haven-mcp.onrender.com/mcp"}}}Windsurf~/.codeium/windsurf/mcp_config.json
{"mcpServers":{"cswarey16-nuvista-haven":{"serverUrl":"https://nuvista-haven-mcp.onrender.com/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
5| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| area | string | 否 | 按区域文本筛选(例如 "Lancaster"、"Poconos"、"Sarasota")。 |
| query | string | 否 | 按房源名称匹配关键词(例如 "farmhouse"、"hot tub")。 |
| min_sleeps | integer | 否 | 仅显示至少可容纳此人数的房源。 |
详细介绍
NuVista Haven MCP 服务(“AI 前台”)
Model Context Protocol 服务,让 AI 助手能够根据实时数据回答:
- NuVista Haven 有哪些房源 →
search_properties - 指定日期有哪些空房 →
check_availability(Hospitable 日历) - 价格是多少 →
get_quote(每晚房价 × 入住晚数 + 清洁费) - 如何直接预订 →
get_booking_link(nuvistahaven.com)
安全模型
- 从设计上只读。
hospitable_client.py仅通过允许的只读路径列表(/user、/properties、/reservations)使用一种 HTTP 方法(GET)。代码中没有任何 POST/PUT/PATCH/DELETE 方法——即使令牌具有写入权限范围,这段代码也无法修改 Hospitable 中的任何内容。 - 令牌处理。 Hospitable Personal Access Token 仅从
HOSPITABLE_API_TOKEN环境变量中读取。绝不会将其硬编码、记录到日志或写入磁盘。
设置
cd ~/workspace/nuvista-mcp
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
运行
# local testing (stdio)
HOSPITABLE_API_TOKEN=<token> ./venv/bin/python server.py
# public hosting (Streamable HTTP)
HOSPITABLE_API_TOKEN=<token> ./venv/bin/python server.py --http --port 8000
测试(使用模拟,无需令牌)
./venv/bin/python test_server.py
一次性操作:映射 Hospitable 房源 ID
properties.py 包含 12 个规范房源,并附有尽力推测的 Hospitable 名称(7 个把握较大,5 个为猜测——参见 guess_confidence)。
使用有效令牌运行匹配器,手动确认每个映射,然后为每个房源填写 hospitable_id:
HOSPITABLE_API_TOKEN=<token> ./venv/bin/python - <<'EOF'
import sys; sys.path.insert(0, '.')
from hospitable_client import HospitableClient
from logic import build_id_mapping
import json
print(json.dumps(build_id_mapping(HospitableClient()), indent=2))
EOF
"needs_human_confirm": true 的条目必须先经过验证才能使用——对于未映射的房源,check_availability/get_quote 不会运行。
已知 API 缺口/假设(请对照实时 API 验证)
- 日历查询参数:
get_calendar发送start_date/end_date(这是/reservations使用的 Hospitable 惯例)。如果端点忽略这些参数,可用日期范围可能不正确——请在首次连接实时 API 时验证。 - 清洁费:日历日对象不包含清洁费。
get_quote会检查房源记录中常见的费用字段格式;如果不存在,结果会明确标记total_is_partial_estimate: true——绝不会默默按零计算。 - 预订链接日期参数:尚未验证能否通过查询字符串在 nuvistahaven.com 上预填日期,因此
get_booking_link返回不带虚构参数的普通房源 URL。 - 预订交叉核对:已实现
list_reservations,但日历才是事实来源;目前不会参考预订记录。
文件
server.py— FastMCP 服务,包含 4 个工具,支持 stdio 和 Streamable HTTPlogic.py— 工具逻辑(无需 MCP 即可测试)hospitable_client.py— 仅使用 GET 的 Hospitable Public API v2 客户端properties.py— 包含规范的 12 个房源注册表及 Hospitable 映射test_server.py— 基于模拟的测试
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。