指南
通过 MCP 连接
Waity 是一个远程 MCP 服务器,提供三个只读工具。可添加到任何支持通过 HTTP 使用 MCP 的客户端。
服务器 URL
URL
https://api.waity.ai/mcp
无需密钥即可使用:每个会话每天可调用 100 次。有密钥时,以 X-Api-Key 或 Authorization: Bearer 发送。
只接受 URL 的托管连接器可以把密钥放在 URL 里:https://api.waity.ai/mcp?key=wk_…。Waity 从不记录查询字符串,但请像保管密钥一样保管该 URL。
添加到你的客户端
Claude
- 打开设置,然后选择“连接器”。
- 选择“添加自定义连接器”。
- 命名为 Waity,粘贴下方 URL,然后选择“添加”。
https://api.waity.ai/mcp
ChatGPT
- 打开设置,然后选择“Apps & Connectors”。
- 在“Advanced settings”中开启“Developer mode”。
- 用下方 URL 创建名为 Waity 的连接器,不需要身份验证。
- 在对话中从工具菜单选择 Waity。
https://api.waity.ai/mcp
Claude Code
在终端中运行:
claude mcp add --transport http waity https://api.waity.ai/mcp
然后在 Claude Code 中运行 /mcp 检查连接。
Cursor
或添加到 ~/.cursor/mcp.json:
{
"mcpServers": {
"waity": {
"url": "https://api.waity.ai/mcp"
}
}
}
VS Code
或运行“MCP: Add Server”,选择 HTTP 并粘贴 URL:
https://api.waity.ai/mcp
或添加到 .vscode/mcp.json:
{
"servers": {
"waity": {
"type": "http",
"url": "https://api.waity.ai/mcp"
}
}
}
其他客户端
添加 URL;如果客户端使用配置文件,则使用以下 JSON:
{
"mcpServers": {
"waity": {
"url": "https://api.waity.ai/mcp"
}
}
}
工具
三个工具均为只读,并以现成的工具调用形式返回后续链接;find_waits 和 get_wait 默认返回精简视图。
find_waits
查询地点及其当前等待:按坐标附近、名称或地名,或按 id。
| 名称 | 类型 | 说明 |
|---|---|---|
lat | number | Latitude in decimal degrees |
lng | number | Longitude in decimal degrees |
q | string | A place name, city, airport code or ZIP (at most 100 characters). With lat/lng, results sort by distance. |
ids | string[] | Up to 25 place ids, returned in this order. |
category | er | urgent-care | dmv | airport | border[] | Only these categories. Omit for all. 当前覆盖范围;见 GET /v1/categories。 |
open | boolean | true: only places open now. |
sort | distance | wait | total | distance (default with lat/lng), wait, or total (needs lat/lng). |
limit | integer | 1 to 25, default 10. |
view | minimal | full | minimal (default) for the essentials, full for sources, timestamps, hours and alternatives. |
get_wait
单个地点:当前、通常、何时变短以及附近的替代地点。分组 id 返回其中的各条队伍。
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | A place id from find_waits, e.g. pl_xaed7pr1f5. |
under | number | Threshold in minutes. Defaults: er, urgent-care and border 30, dmv 20, airport 15. |
travel_min | number | Travel time in minutes, for a leave-by time. |
date | string | Local date YYYY-MM-DD, today to 7 days ahead, to plan a day. |
lat | number | The user's latitude, for distances. |
lng | number | The user's longitude, for distances. |
forecast | boolean | With view minimal, add a compact hourly forecast [{at, value}]. |
view | minimal | full | minimal (default) for the essentials, full for sources, timestamps, hours and alternatives. |
get_history
某个地点过去的等候时间:按小时、按天或每条读数。需要密钥;绝不预测到访。
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | A place id from find_waits (one place, lane or department, not a group), e.g. pl_xaed7pr1f5. |
from | string | Start, inclusive: a date YYYY-MM-DD (local to the place) or an ISO 8601 date-time with offset. Default: 7 days before to. |
to | string | End, exclusive: a date YYYY-MM-DD (local to the place) or an ISO 8601 date-time with offset. A date means the end of that day. Default: now. |
granularity | raw | hour | day | hour (default): hourly avg, median, p90, min, max. day: one row per local day. raw: every posted reading. |
tier | official | place | agent | Which kind of source. Default: the place's displayed source. |
cursor | string | page.next_cursor from the previous page; carries the range. |
limit | integer | Rows per page. Caps: raw 1000, hour 336, day 366. |
MCP 与 REST
- 未知参数会被拒绝并返回
invalid_parameter;REST 会忽略未知参数,并在 diagnostics 中说明。 - MCP 从不猜测位置:请发送位置,或城市、ZIP。
- 工具结果把回答放在
structuredContent中,并以 JSON 文本再提供一遍,供只读取文本的客户端使用。 - 不使用密钥时,MCP 客户端会自动回传
Mcp-Session-Id请求头,因此每个会话单独计数。