指南
透過 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標頭,因此每個工作階段分開計算。