wsdot-mcp-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +343 -0
- package/Dockerfile +99 -0
- package/LICENSE +201 -0
- package/README.md +364 -0
- package/changelog/0.1.x/0.1.0.md +24 -0
- package/changelog/0.1.x/0.1.1.md +26 -0
- package/changelog/template.md +119 -0
- package/dist/config/server-config.d.ts +12 -0
- package/dist/config/server-config.d.ts.map +1 -0
- package/dist/config/server-config.js +19 -0
- package/dist/config/server-config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-border-waits.tool.d.ts +28 -0
- package/dist/mcp-server/tools/definitions/get-border-waits.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-border-waits.tool.js +83 -0
- package/dist/mcp-server/tools/definitions/get-border-waits.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-alerts.tool.d.ts +22 -0
- package/dist/mcp-server/tools/definitions/get-ferry-alerts.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-alerts.tool.js +67 -0
- package/dist/mcp-server/tools/definitions/get-ferry-alerts.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.d.ts +33 -0
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.js +95 -0
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.d.ts +41 -0
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.js +117 -0
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.d.ts +23 -0
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.js +56 -0
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.d.ts +35 -0
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.js +116 -0
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.d.ts +32 -0
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.js +118 -0
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.d.ts +29 -0
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.js +85 -0
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.d.ts +38 -0
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.js +141 -0
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-vessel-locations.tool.d.ts +35 -0
- package/dist/mcp-server/tools/definitions/get-vessel-locations.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-vessel-locations.tool.js +120 -0
- package/dist/mcp-server/tools/definitions/get-vessel-locations.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/index.d.ts +17 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/index.js +17 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts +48 -0
- package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-alerts.tool.js +155 -0
- package/dist/mcp-server/tools/definitions/search-alerts.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-cameras.tool.d.ts +36 -0
- package/dist/mcp-server/tools/definitions/search-cameras.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-cameras.tool.js +116 -0
- package/dist/mcp-server/tools/definitions/search-cameras.tool.js.map +1 -0
- package/dist/services/ferry/ferry-service.d.ts +28 -0
- package/dist/services/ferry/ferry-service.d.ts.map +1 -0
- package/dist/services/ferry/ferry-service.js +222 -0
- package/dist/services/ferry/ferry-service.js.map +1 -0
- package/dist/services/ferry/types.d.ts +183 -0
- package/dist/services/ferry/types.d.ts.map +1 -0
- package/dist/services/ferry/types.js +6 -0
- package/dist/services/ferry/types.js.map +1 -0
- package/dist/services/traffic/traffic-service.d.ts +37 -0
- package/dist/services/traffic/traffic-service.d.ts.map +1 -0
- package/dist/services/traffic/traffic-service.js +290 -0
- package/dist/services/traffic/traffic-service.js.map +1 -0
- package/dist/services/traffic/types.d.ts +247 -0
- package/dist/services/traffic/types.d.ts.map +1 -0
- package/dist/services/traffic/types.js +6 -0
- package/dist/services/traffic/types.js.map +1 -0
- package/package.json +89 -0
- package/server.json +111 -0
package/README.md
ADDED
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>wsdot-mcp-server</h1>
|
|
3
|
+
<p><b>Query WA highway conditions, ferry schedules, vessel locations, toll rates, border waits, and alerts via MCP. STDIO or Streamable HTTP.</b>
|
|
4
|
+
<div>12 Tools</div>
|
|
5
|
+
</p>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div align="center">
|
|
9
|
+
|
|
10
|
+
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/wsdot-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/wsdot-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div align="center">
|
|
15
|
+
|
|
16
|
+
[](https://github.com/cyanheads/wsdot-mcp-server/releases/latest/download/wsdot-mcp-server.mcpb) [](https://cursor.com/en/install-mcp?name=wsdot-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIndzZG90LW1jcC1zZXJ2ZXIiXSwiZW52Ijp7IldTRE9UX0FDQ0VTU19DT0RFIjoieW91ci1hY2Nlc3MtY29kZSJ9fQ==) [](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22wsdot-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22wsdot-mcp-server%22%5D%2C%22env%22%3A%7B%22WSDOT_ACCESS_CODE%22%3A%22your-access-code%22%7D%7D)
|
|
17
|
+
|
|
18
|
+
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Tools
|
|
25
|
+
|
|
26
|
+
12 tools split across two domains — traffic (WSDOT Traveler API) and ferries (WSF Ferry API):
|
|
27
|
+
|
|
28
|
+
| Tool | Description |
|
|
29
|
+
|:---|:---|
|
|
30
|
+
| `wsdot_get_mountain_passes` | Current conditions for all WA mountain passes: status, road condition, traction laws, temperature, elevation. |
|
|
31
|
+
| `wsdot_search_alerts` | Active highway alerts — incidents, construction, closures — filterable by state route, WSDOT region, and milepost range. |
|
|
32
|
+
| `wsdot_get_travel_times` | Current vs. average travel times for named WA highway corridors (I-5, I-90, SR 520, etc.) with congestion delay. |
|
|
33
|
+
| `wsdot_get_toll_rates` | Dynamic toll rates for WA express lanes and tolled facilities: SR 99, SR 520, I-405, I-90 Two-Way, SR 167 HOT. |
|
|
34
|
+
| `wsdot_get_border_waits` | Current vehicle wait times at all WA/Canada land border crossings. |
|
|
35
|
+
| `wsdot_search_cameras` | Highway camera metadata and image URLs, filterable by state route, region, and milepost range. |
|
|
36
|
+
| `wsdot_get_ferry_terminals` | All WSF ferry terminals with numeric IDs needed for schedule and space lookups. |
|
|
37
|
+
| `wsdot_get_ferry_routes` | WSF routes operating on a given date with terminal ID pairs and crossing times. |
|
|
38
|
+
| `wsdot_get_ferry_schedule` | Departure times for a specific WSF route — today-remaining or full-day future mode. |
|
|
39
|
+
| `wsdot_get_vessel_locations` | Real-time AIS positions, speed, heading, ETA, and dock status for all active WSF vessels. |
|
|
40
|
+
| `wsdot_get_terminal_space` | Drive-up and reservable vehicle space available at WSF terminals for upcoming sailings. |
|
|
41
|
+
| `wsdot_get_ferry_alerts` | Active WSF service disruptions and bulletins with impacted route IDs. |
|
|
42
|
+
|
|
43
|
+
### `wsdot_get_mountain_passes`
|
|
44
|
+
|
|
45
|
+
Current road conditions for all WA mountain passes.
|
|
46
|
+
|
|
47
|
+
- Covers all ~12 passes: Snoqualmie, Stevens, White, Blewett, Cayuse, and others
|
|
48
|
+
- Fields include status (Open/Closed/Caution), road surface, active traction law, temperature, and elevation
|
|
49
|
+
- Use for "is the pass open?", traction law checks, or winter driving planning
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### `wsdot_search_alerts`
|
|
54
|
+
|
|
55
|
+
Active WA highway alerts — incidents, construction, closures, restrictions.
|
|
56
|
+
|
|
57
|
+
- Filter by state route (zero-padded 3-digit number: `"005"` for I-5, `"090"` for I-90, `"520"` for SR 520)
|
|
58
|
+
- Filter by WSDOT region: Northwest, Olympic, Southwest, South Central, North Central, Eastern
|
|
59
|
+
- Filter by milepost range to scope to a corridor
|
|
60
|
+
- Omit all filters to return all current statewide alerts
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### `wsdot_get_travel_times`
|
|
65
|
+
|
|
66
|
+
Current vs. average travel times for named WA highway corridors.
|
|
67
|
+
|
|
68
|
+
- Covers I-5, I-90, SR 520, SR 99, I-405, SR 167, and others
|
|
69
|
+
- Filter by partial route name (e.g. `"I-5"`, `"SR 520"`) to narrow results
|
|
70
|
+
- When current time exceeds average, the corridor is congested; the delta is the delay
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### `wsdot_get_toll_rates`
|
|
75
|
+
|
|
76
|
+
Current dynamic toll rates for WA tolled facilities.
|
|
77
|
+
|
|
78
|
+
- SR 99 (WSDOT Tunnel), SR 520 Bridge, I-405 Express Lanes, I-90 Two-Way Express Lanes, SR 167 HOT Lanes
|
|
79
|
+
- Rates are time-banded and change dynamically based on traffic conditions
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### `wsdot_get_border_waits`
|
|
84
|
+
|
|
85
|
+
Current vehicle wait times at WA/Canada land border crossings.
|
|
86
|
+
|
|
87
|
+
- Covers Peace Arch (Blaine), Pacific Highway (Blaine), Sumas, Lynden, Oroville, and others
|
|
88
|
+
- Wait times in minutes; `updateTime` shows when the reading was last updated
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### `wsdot_search_cameras`
|
|
93
|
+
|
|
94
|
+
WSDOT highway camera metadata and image URLs.
|
|
95
|
+
|
|
96
|
+
- Filter by state route, WSDOT region, or milepost range; omit to list all cameras statewide
|
|
97
|
+
- Returns metadata and image URLs — camera images are copyright WSDOT, not fetched as bytes
|
|
98
|
+
- Potentially hundreds of results statewide; use filters to scope
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### `wsdot_get_ferry_terminals`
|
|
103
|
+
|
|
104
|
+
All WSF ferry terminals with numeric IDs.
|
|
105
|
+
|
|
106
|
+
- ~22 terminals; the list rarely changes
|
|
107
|
+
- Call this first to resolve human-readable names (e.g. "Bainbridge Island", "Seattle", "Kingston") to the numeric IDs required by `wsdot_get_ferry_schedule` and `wsdot_get_terminal_space`
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### `wsdot_get_ferry_routes`
|
|
112
|
+
|
|
113
|
+
WSF ferry routes operating on a given date.
|
|
114
|
+
|
|
115
|
+
- Returns terminal ID pairs and crossing times for each route
|
|
116
|
+
- Route IDs correspond to `impactedRouteIds` in `wsdot_get_ferry_alerts`
|
|
117
|
+
- Use to discover which routes are running and get terminal IDs for schedule lookups
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### `wsdot_get_ferry_schedule`
|
|
122
|
+
|
|
123
|
+
Departure times for a specific WSF ferry route.
|
|
124
|
+
|
|
125
|
+
- Requires numeric terminal IDs — use `wsdot_get_ferry_terminals` first
|
|
126
|
+
- `remainingOnly: true` returns only future departures for today (useful for "next ferry" queries)
|
|
127
|
+
- For future dates, all sailings for that day are returned
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### `wsdot_get_vessel_locations`
|
|
132
|
+
|
|
133
|
+
Real-time AIS positions for all active WSF vessels.
|
|
134
|
+
|
|
135
|
+
- Fields include position, speed, heading, ETA, and dock status
|
|
136
|
+
- Use for "where is the ferry now?" or checking if a specific vessel is in service
|
|
137
|
+
- Position data may lag 30–60 seconds; many fields are null for vessels not currently operating
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
### `wsdot_get_terminal_space`
|
|
142
|
+
|
|
143
|
+
Real-time vehicle space availability at WSF terminals for upcoming sailings.
|
|
144
|
+
|
|
145
|
+
- `DriveUpSpaceCount` is the key field — zero means the drive-up lane is full
|
|
146
|
+
- Filter to a specific terminal by ID (from `wsdot_get_ferry_terminals`)
|
|
147
|
+
- Use for "will I make the ferry?" or "how full is the next sailing?" queries
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
### `wsdot_get_ferry_alerts`
|
|
152
|
+
|
|
153
|
+
Active WSF ferry service disruptions, delays, and bulletins.
|
|
154
|
+
|
|
155
|
+
- Each alert includes `impactedRouteIds` — cross-reference with `wsdot_get_ferry_routes` to map route IDs to names
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Features
|
|
160
|
+
|
|
161
|
+
Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):
|
|
162
|
+
|
|
163
|
+
- Declarative tool definitions — single file per tool, framework handles registration and validation
|
|
164
|
+
- Unified error handling across all tools
|
|
165
|
+
- Pluggable auth (`none`, `jwt`, `oauth`)
|
|
166
|
+
- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`
|
|
167
|
+
- Structured logging with optional OpenTelemetry tracing
|
|
168
|
+
- STDIO and Streamable HTTP transports
|
|
169
|
+
|
|
170
|
+
WSDOT-specific:
|
|
171
|
+
|
|
172
|
+
- Dual API integration — WSDOT Traffic API and WSF Ferry API from a single access code
|
|
173
|
+
- Retry, timeout, and HTML-detection guards on all upstream requests
|
|
174
|
+
- Normalized response shapes across both APIs — sparse upstream fields surfaced as optional rather than omitted
|
|
175
|
+
|
|
176
|
+
Agent-friendly output:
|
|
177
|
+
|
|
178
|
+
- Cross-tool linking built into descriptions — ferry tools document which tool to call first for terminal and route ID resolution
|
|
179
|
+
- `DriveUpSpaceCount: 0` and congestion delta fields give agents actionable signal without string parsing
|
|
180
|
+
- Partial data preserved — sparse upstream payloads surface `null`/`undefined` rather than synthetic defaults
|
|
181
|
+
|
|
182
|
+
## Getting started
|
|
183
|
+
|
|
184
|
+
Add the following to your MCP client configuration file. You'll need a WSDOT Traveler API access code — register at [wsdot.wa.gov/Traffic/api/](https://wsdot.wa.gov/Traffic/api/).
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"mcpServers": {
|
|
189
|
+
"wsdot": {
|
|
190
|
+
"type": "stdio",
|
|
191
|
+
"command": "bunx",
|
|
192
|
+
"args": ["wsdot-mcp-server@latest"],
|
|
193
|
+
"env": {
|
|
194
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
195
|
+
"MCP_LOG_LEVEL": "info",
|
|
196
|
+
"WSDOT_ACCESS_CODE": "your-access-code"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Or with npx (no Bun required):
|
|
204
|
+
|
|
205
|
+
```json
|
|
206
|
+
{
|
|
207
|
+
"mcpServers": {
|
|
208
|
+
"wsdot": {
|
|
209
|
+
"type": "stdio",
|
|
210
|
+
"command": "npx",
|
|
211
|
+
"args": ["-y", "wsdot-mcp-server@latest"],
|
|
212
|
+
"env": {
|
|
213
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
214
|
+
"MCP_LOG_LEVEL": "info",
|
|
215
|
+
"WSDOT_ACCESS_CODE": "your-access-code"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Or with Docker:
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"mcpServers": {
|
|
227
|
+
"wsdot": {
|
|
228
|
+
"type": "stdio",
|
|
229
|
+
"command": "docker",
|
|
230
|
+
"args": [
|
|
231
|
+
"run", "-i", "--rm",
|
|
232
|
+
"-e", "MCP_TRANSPORT_TYPE=stdio",
|
|
233
|
+
"-e", "WSDOT_ACCESS_CODE=your-access-code",
|
|
234
|
+
"ghcr.io/cyanheads/wsdot-mcp-server:latest"
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
For Streamable HTTP, set the transport and start the server:
|
|
242
|
+
|
|
243
|
+
```sh
|
|
244
|
+
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 WSDOT_ACCESS_CODE=your-access-code bun run start:http
|
|
245
|
+
# Server listens at http://localhost:3010/mcp
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Prerequisites
|
|
249
|
+
|
|
250
|
+
- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js v24+).
|
|
251
|
+
- A WSDOT Traveler API access code. Register at [wsdot.wa.gov/Traffic/api/](https://wsdot.wa.gov/Traffic/api/) — registration is free.
|
|
252
|
+
|
|
253
|
+
### Installation
|
|
254
|
+
|
|
255
|
+
1. **Clone the repository:**
|
|
256
|
+
|
|
257
|
+
```sh
|
|
258
|
+
git clone https://github.com/cyanheads/wsdot-mcp-server.git
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
2. **Navigate into the directory:**
|
|
262
|
+
|
|
263
|
+
```sh
|
|
264
|
+
cd wsdot-mcp-server
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
3. **Install dependencies:**
|
|
268
|
+
|
|
269
|
+
```sh
|
|
270
|
+
bun install
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
4. **Configure environment:**
|
|
274
|
+
|
|
275
|
+
```sh
|
|
276
|
+
cp .env.example .env
|
|
277
|
+
# edit .env and set WSDOT_ACCESS_CODE
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Configuration
|
|
281
|
+
|
|
282
|
+
All configuration is validated at startup via Zod schemas in `src/config/server-config.ts`. Key environment variables:
|
|
283
|
+
|
|
284
|
+
| Variable | Description | Default |
|
|
285
|
+
|:---|:---|:---|
|
|
286
|
+
| `WSDOT_ACCESS_CODE` | **Required.** WSDOT Traveler API access code. Register at [wsdot.wa.gov/Traffic/api/](https://wsdot.wa.gov/Traffic/api/). | — |
|
|
287
|
+
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
288
|
+
| `MCP_HTTP_PORT` | HTTP server port. | `3010` |
|
|
289
|
+
| `MCP_HTTP_HOST` | HTTP server hostname. | `127.0.0.1` |
|
|
290
|
+
| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path. | `/mcp` |
|
|
291
|
+
| `MCP_PUBLIC_URL` | Public origin for TLS-terminating reverse-proxy deployments. | — |
|
|
292
|
+
| `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth`. | `none` |
|
|
293
|
+
| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `notice`, `warning`, `error`). | `info` |
|
|
294
|
+
| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |
|
|
295
|
+
| `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv/r2/d1`. | `in-memory` |
|
|
296
|
+
| `OTEL_ENABLED` | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | `false` |
|
|
297
|
+
|
|
298
|
+
See [`.env.example`](./.env.example) for the full list of optional overrides.
|
|
299
|
+
|
|
300
|
+
## Running the server
|
|
301
|
+
|
|
302
|
+
### Local development
|
|
303
|
+
|
|
304
|
+
- **Build and run:**
|
|
305
|
+
|
|
306
|
+
```sh
|
|
307
|
+
# One-time build
|
|
308
|
+
bun run rebuild
|
|
309
|
+
|
|
310
|
+
# Run the built server
|
|
311
|
+
bun run start:stdio
|
|
312
|
+
# or
|
|
313
|
+
bun run start:http
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
- **Run checks and tests:**
|
|
317
|
+
|
|
318
|
+
```sh
|
|
319
|
+
bun run devcheck # Lint, format, typecheck, security
|
|
320
|
+
bun run test # Vitest test suite
|
|
321
|
+
bun run lint:mcp # Validate MCP definitions against spec
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Docker
|
|
325
|
+
|
|
326
|
+
```sh
|
|
327
|
+
docker build -t wsdot-mcp-server .
|
|
328
|
+
docker run --rm -e WSDOT_ACCESS_CODE=your-access-code -p 3010:3010 wsdot-mcp-server
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/wsdot-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.
|
|
332
|
+
|
|
333
|
+
## Project structure
|
|
334
|
+
|
|
335
|
+
| Directory | Purpose |
|
|
336
|
+
|:---|:---|
|
|
337
|
+
| `src/index.ts` | `createApp()` entry point — registers all 12 tools and initializes services. |
|
|
338
|
+
| `src/config` | Server-specific environment variable parsing and validation with Zod. |
|
|
339
|
+
| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`) — 6 traffic tools, 6 ferry tools. |
|
|
340
|
+
| `src/services/traffic` | WSDOT Traffic API service (mountain passes, alerts, travel times, toll rates, border waits, cameras). |
|
|
341
|
+
| `src/services/ferry` | WSF Ferry API service (terminals, routes, schedule, vessel locations, space, alerts). |
|
|
342
|
+
| `tests/` | Unit and integration tests, mirroring the `src/` structure. |
|
|
343
|
+
|
|
344
|
+
## Development guide
|
|
345
|
+
|
|
346
|
+
See [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:
|
|
347
|
+
|
|
348
|
+
- Handlers throw, framework catches — no `try/catch` in tool logic
|
|
349
|
+
- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage
|
|
350
|
+
- Register new tools in the `createApp()` arrays in `src/index.ts`
|
|
351
|
+
- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
|
|
352
|
+
|
|
353
|
+
## Contributing
|
|
354
|
+
|
|
355
|
+
Issues and pull requests are welcome. Run checks and tests before submitting:
|
|
356
|
+
|
|
357
|
+
```sh
|
|
358
|
+
bun run devcheck
|
|
359
|
+
bun run test
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## License
|
|
363
|
+
|
|
364
|
+
Apache-2.0 — see [LICENSE](./LICENSE) for details.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Initial release — 12 WSDOT tools for WA traffic and WSF ferry data"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.0 — 2026-05-23
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`wsdot_get_mountain_passes`** — current conditions for all WA mountain passes (status, road condition, traction laws, temperature, elevation).
|
|
12
|
+
- **`wsdot_search_alerts`** — active highway alerts, incidents, and construction notices; filterable by state route, WSDOT region, and milepost range.
|
|
13
|
+
- **`wsdot_get_travel_times`** — current vs. average travel times for named WA highway corridors (I-5, I-90, SR 520, etc.) with congestion delay calculation.
|
|
14
|
+
- **`wsdot_get_toll_rates`** — dynamic toll rates for WA express lanes and tolled facilities (SR 99, SR 520, I-405, I-90, SR 167).
|
|
15
|
+
- **`wsdot_get_border_waits`** — vehicle wait times at all WA/Canada land border crossings.
|
|
16
|
+
- **`wsdot_search_cameras`** — highway camera metadata and image URLs; filterable by state route, region, and milepost range.
|
|
17
|
+
- **`wsdot_get_ferry_terminals`** — all WSF ferry terminals with numeric IDs for use in schedule and space lookups.
|
|
18
|
+
- **`wsdot_get_ferry_routes`** — WSF routes operating on a given date with terminal ID pairs and crossing times.
|
|
19
|
+
- **`wsdot_get_ferry_schedule`** — departure times for a specific WSF route; supports today-remaining and future-date modes.
|
|
20
|
+
- **`wsdot_get_vessel_locations`** — real-time AIS positions, speed, heading, ETA, and dock status for all active WSF vessels.
|
|
21
|
+
- **`wsdot_get_terminal_space`** — drive-up and reservable vehicle space availability for upcoming WSF sailings.
|
|
22
|
+
- **`wsdot_get_ferry_alerts`** — active WSF service disruptions with impacted route IDs.
|
|
23
|
+
- Traffic service (`TrafficApiService`) and ferry service (`FerryApiService`) with retry, timeout, and HTML-detection guards.
|
|
24
|
+
- 64 tests covering all 12 tools: happy paths, filter behavior, format output, sparse upstream payloads.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "WSDOT Traveler Information — 12 tools for WA traffic, ferries, mountain passes, toll rates, and border crossings"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.1 — 2026-05-23
|
|
8
|
+
|
|
9
|
+
Initial public release of wsdot-mcp-server, built on `@cyanheads/mcp-ts-core ^0.9.7`.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- **`wsdot_get_mountain_passes`** — current conditions for all WA mountain passes (status, road condition, traction laws, temperature, elevation).
|
|
14
|
+
- **`wsdot_search_alerts`** — active highway alerts, incidents, and construction notices; filterable by state route, WSDOT region, and milepost range.
|
|
15
|
+
- **`wsdot_get_travel_times`** — current vs. average travel times for named WA highway corridors (I-5, I-90, SR 520, etc.) with congestion delay.
|
|
16
|
+
- **`wsdot_get_toll_rates`** — dynamic toll rates for WA express lanes and tolled facilities (SR 99, SR 520, I-405, I-90, SR 167).
|
|
17
|
+
- **`wsdot_get_border_waits`** — vehicle wait times at all WA/Canada land border crossings.
|
|
18
|
+
- **`wsdot_search_cameras`** — highway camera metadata and image URLs; filterable by state route, region, and milepost range.
|
|
19
|
+
- **`wsdot_get_ferry_terminals`** — all WSF ferry terminals with numeric IDs for schedule and space lookups.
|
|
20
|
+
- **`wsdot_get_ferry_routes`** — WSF routes operating on a given date with terminal ID pairs and crossing times.
|
|
21
|
+
- **`wsdot_get_ferry_schedule`** — departure times for a specific WSF route; supports today-remaining and future-date modes.
|
|
22
|
+
- **`wsdot_get_vessel_locations`** — real-time AIS positions, speed, heading, ETA, and dock status for all active WSF vessels.
|
|
23
|
+
- **`wsdot_get_terminal_space`** — drive-up and reservable vehicle space availability for upcoming WSF sailings.
|
|
24
|
+
- **`wsdot_get_ferry_alerts`** — active WSF service disruptions with impacted route IDs.
|
|
25
|
+
- Traffic service (`TrafficApiService`) and ferry service (`FerryApiService`) with retry, timeout, and HTML-detection guards.
|
|
26
|
+
- 64 tests covering all 12 tools: happy paths, filter behavior, format output, sparse upstream payloads.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
# FORMAT REFERENCE — do not edit. Copy this file to
|
|
3
|
+
# `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.8.x/0.8.6.md`)
|
|
4
|
+
# to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
|
|
5
|
+
# with a concrete date.
|
|
6
|
+
|
|
7
|
+
# Required. One-line GitHub Release-style headline. 350 character cap.
|
|
8
|
+
# Default short and scannable. Don't pad, don't stitch unrelated changes with
|
|
9
|
+
# semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
|
|
10
|
+
# inside the value as a key separator and fails GitHub's strict parser.
|
|
11
|
+
summary: ""
|
|
12
|
+
|
|
13
|
+
# Set `true` when consumers must change code to upgrade: API removals,
|
|
14
|
+
# signature changes, config renames, behavior changes that break existing
|
|
15
|
+
# usage. Flagged as `Breaking` in the rollup.
|
|
16
|
+
breaking: false
|
|
17
|
+
|
|
18
|
+
# Set `true` if this release contains any security fix. Pairs with the
|
|
19
|
+
# `## Security` section below. Flagged as `Security` in the rollup so
|
|
20
|
+
# users can triage upgrade urgency at a glance.
|
|
21
|
+
security: false
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# <version> — YYYY-MM-DD
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
AUTHORING GUIDE — applies to the new per-version file you create from this
|
|
28
|
+
template.
|
|
29
|
+
|
|
30
|
+
Audience: someone scanning release notes to decide what affects them. Lead
|
|
31
|
+
each bullet with the symbol or concept name in **bold** so they can skip
|
|
32
|
+
what's irrelevant and zoom in on what's not.
|
|
33
|
+
|
|
34
|
+
Tone: terse, fact-dense, not verbose. Default to one sentence per bullet —
|
|
35
|
+
name the symbol, state what changed, stop. Use a second sentence only when
|
|
36
|
+
it carries weight. If a bullet feels long, it is.
|
|
37
|
+
|
|
38
|
+
Cut: mechanism walkthroughs (those belong in JSDoc, AGENTS.md, or the
|
|
39
|
+
relevant skill), ceremonial framings ("This release introduces…",
|
|
40
|
+
backwards-compat paragraphs), file-by-file test enumerations, internal
|
|
41
|
+
implementation notes. Prefer code/symbol names over English re-explanations.
|
|
42
|
+
|
|
43
|
+
Narrative intro: skip by default. Add one short sentence only when the
|
|
44
|
+
release theme genuinely needs framing the bullets can't carry.
|
|
45
|
+
|
|
46
|
+
Sections: Keep a Changelog order — Added, Changed, Deprecated, Removed,
|
|
47
|
+
Fixed, Security. Include only sections with entries; delete the rest
|
|
48
|
+
(including the commented-out scaffolding below). Don't ship empty headers.
|
|
49
|
+
|
|
50
|
+
Include: every distinct fact a reader needs to adopt or audit the release —
|
|
51
|
+
new exports, signatures, lint rule IDs, env vars, breaking changes, version
|
|
52
|
+
bumps on shipped skills. Nothing more.
|
|
53
|
+
|
|
54
|
+
Links: link issues, PRs, docs, or skills where they help a reader jump to
|
|
55
|
+
context. Once per item per entry — don't re-link the same issue in summary,
|
|
56
|
+
narrative, and bullet. Skip links for inline symbol names; code spans speak
|
|
57
|
+
for themselves.
|
|
58
|
+
|
|
59
|
+
Issue/PR URLs: use full URLs. GitHub's bare `#NN` auto-link only resolves
|
|
60
|
+
inside its own UI, not in npm reads or local editors.
|
|
61
|
+
|
|
62
|
+
[#38](https://github.com/cyanheads/mcp-ts-core/issues/38) ← issue
|
|
63
|
+
[#42](https://github.com/cyanheads/mcp-ts-core/pull/42) ← PR
|
|
64
|
+
|
|
65
|
+
Verify numbers exist before linking (`gh issue view NN`, `gh pr view NN`).
|
|
66
|
+
Never speculate on a future number — `#42` for an upcoming PR silently
|
|
67
|
+
resolves to whatever real item already owns 42, and timeline previews pull
|
|
68
|
+
in that unrelated item's metadata.
|
|
69
|
+
|
|
70
|
+
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
71
|
+
via `gh release create --notes-from-tag`. The tag is a derivative of this
|
|
72
|
+
changelog entry — a condensed, scannable version, not a copy. Format:
|
|
73
|
+
|
|
74
|
+
<theme — omit version number, GitHub prepends it>
|
|
75
|
+
← blank line
|
|
76
|
+
<1-2 sentence context: what this release does>
|
|
77
|
+
← blank line
|
|
78
|
+
Dependency bumps: ← section header
|
|
79
|
+
← blank line
|
|
80
|
+
- `@cyanheads/mcp-ts-core` ^0.9.1 → ^0.9.6 ← bullet
|
|
81
|
+
← blank line
|
|
82
|
+
Changed: ← only sections with entries
|
|
83
|
+
← blank line
|
|
84
|
+
- `format()` output includes `query` in text mode
|
|
85
|
+
← blank line
|
|
86
|
+
Added:
|
|
87
|
+
← blank line
|
|
88
|
+
- `manifest.json` scaffolded for MCPB bundle support
|
|
89
|
+
- Install badges (Claude Desktop, Cursor, VS Code)
|
|
90
|
+
← blank line
|
|
91
|
+
<N> tests pass; `bun run devcheck` clean. ← footer
|
|
92
|
+
|
|
93
|
+
Never a flat comma-separated string. Always structured markdown with
|
|
94
|
+
sections. The tag must scan well as a rendered GitHub Release page.
|
|
95
|
+
-->
|
|
96
|
+
|
|
97
|
+
## Added
|
|
98
|
+
|
|
99
|
+
-
|
|
100
|
+
|
|
101
|
+
## Changed
|
|
102
|
+
|
|
103
|
+
-
|
|
104
|
+
|
|
105
|
+
<!-- ## Deprecated
|
|
106
|
+
|
|
107
|
+
- -->
|
|
108
|
+
|
|
109
|
+
<!-- ## Removed
|
|
110
|
+
|
|
111
|
+
- -->
|
|
112
|
+
|
|
113
|
+
## Fixed
|
|
114
|
+
|
|
115
|
+
-
|
|
116
|
+
|
|
117
|
+
<!-- ## Security
|
|
118
|
+
|
|
119
|
+
- -->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Server-specific environment variable configuration for wsdot-mcp-server.
|
|
3
|
+
* @module config/server-config
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
declare const ServerConfigSchema: z.ZodObject<{
|
|
7
|
+
accessCode: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type ServerConfig = z.infer<typeof ServerConfigSchema>;
|
|
10
|
+
export declare function getServerConfig(): ServerConfig;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=server-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;iBAItB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,wBAAgB,eAAe,IAAI,YAAY,CAK9C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Server-specific environment variable configuration for wsdot-mcp-server.
|
|
3
|
+
* @module config/server-config
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
|
|
7
|
+
const ServerConfigSchema = z.object({
|
|
8
|
+
accessCode: z
|
|
9
|
+
.string()
|
|
10
|
+
.describe('WSDOT Traveler API access code. Used for both traffic and ferry endpoints.'),
|
|
11
|
+
});
|
|
12
|
+
let _config;
|
|
13
|
+
export function getServerConfig() {
|
|
14
|
+
_config ??= parseEnvConfig(ServerConfigSchema, {
|
|
15
|
+
accessCode: 'WSDOT_ACCESS_CODE',
|
|
16
|
+
});
|
|
17
|
+
return _config;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=server-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,CAAC,4EAA4E,CAAC;CAC1F,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,UAAU,EAAE,mBAAmB;KAChC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview wsdot-mcp-server MCP server entry point.
|
|
4
|
+
* @module index
|
|
5
|
+
*/
|
|
6
|
+
import { createApp } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
import { getBorderWaits, getFerryAlerts, getFerryRoutes, getFerrySchedule, getFerryTerminals, getMountainPasses, getTerminalSpace, getTollRates, getTravelTimes, getVesselLocations, searchAlerts, searchCameras, } from './mcp-server/tools/definitions/index.js';
|
|
8
|
+
import { initFerryApiService } from './services/ferry/ferry-service.js';
|
|
9
|
+
import { initTrafficApiService } from './services/traffic/traffic-service.js';
|
|
10
|
+
await createApp({
|
|
11
|
+
tools: [
|
|
12
|
+
getMountainPasses,
|
|
13
|
+
searchAlerts,
|
|
14
|
+
getTravelTimes,
|
|
15
|
+
getTollRates,
|
|
16
|
+
getBorderWaits,
|
|
17
|
+
searchCameras,
|
|
18
|
+
getFerryTerminals,
|
|
19
|
+
getFerryRoutes,
|
|
20
|
+
getFerrySchedule,
|
|
21
|
+
getVesselLocations,
|
|
22
|
+
getTerminalSpace,
|
|
23
|
+
getFerryAlerts,
|
|
24
|
+
],
|
|
25
|
+
resources: [],
|
|
26
|
+
prompts: [],
|
|
27
|
+
instructions: 'WSDOT Traveler Information server for Washington State. Traffic tools (mountain passes, alerts, travel times, toll rates, border waits, cameras) use the WSDOT Traffic API. Ferry tools use the WSF Ferry API. For ferry schedule and space lookups, first call wsdot_get_ferry_terminals to resolve terminal names to numeric IDs. Ferry route IDs from wsdot_get_ferry_routes correspond to impactedRouteIds in wsdot_get_ferry_alerts.',
|
|
28
|
+
setup(core) {
|
|
29
|
+
initTrafficApiService(core.config, core.storage);
|
|
30
|
+
initFerryApiService(core.config, core.storage);
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,aAAa,GACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,MAAM,SAAS,CAAC;IACd,KAAK,EAAE;QACL,iBAAiB;QACjB,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,cAAc;QACd,aAAa;QACb,iBAAiB;QACjB,cAAc;QACd,gBAAgB;QAChB,kBAAkB;QAClB,gBAAgB;QAChB,cAAc;KACf;IACD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,YAAY,EACV,2aAA2a;IAC7a,KAAK,CAAC,IAAI;QACR,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,mBAAmB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tool to fetch Canada border crossing wait times from the WSDOT Traffic API.
|
|
3
|
+
* @module mcp-server/tools/definitions/get-border-waits.tool
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
export declare const getBorderWaits: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
8
|
+
crossings: z.ZodArray<z.ZodObject<{
|
|
9
|
+
crossingName: z.ZodOptional<z.ZodString>;
|
|
10
|
+
waitTimeInMinutes: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
updateTime: z.ZodOptional<z.ZodString>;
|
|
12
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
roadName: z.ZodOptional<z.ZodString>;
|
|
14
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
15
|
+
milePost: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
latitude: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
longitude: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
totalCount: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>, readonly [{
|
|
22
|
+
readonly reason: "api_unavailable";
|
|
23
|
+
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
24
|
+
readonly when: "WSDOT Traffic API is unreachable or returns a non-2xx response after retries.";
|
|
25
|
+
readonly retryable: true;
|
|
26
|
+
readonly recovery: "Retry in 30 seconds. If the issue persists, check wsdot.wa.gov for service status.";
|
|
27
|
+
}]>;
|
|
28
|
+
//# sourceMappingURL=get-border-waits.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-border-waits.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-border-waits.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;GA4EzB,CAAC"}
|