feat: serve the MCP server at /mcp on the local servers

Mount the local MCP server at /mcp on the development and preview
servers for clients that connect by URL. The route accepts only
requests from this machine that name a loopback host and, when an
Origin is sent, come from a loopback origin, and drains oversized
bodies so the 413 response is delivered. The provider-order regression
test now pins the route between the providers and the API fallback.
This commit is contained in:
Sameh Khamis committed 2026-10-01 12:47:44 -07:00
1 parent b6af8b34e0
commit 469b1e8d89
8 files changed
+268 -7

No files matched your search

+3 -1
View File
@@ -1,6 +1,8 @@
# Changelog
- Add tools for language-model clients and a local MCP server. `npm run mcp`
- Add tools for language-model clients and a local MCP server, served over
stdio by `npm run mcp` and over HTTP at `/mcp` on the development and preview
servers for local requests only. `npm run mcp`
serves earthquake, active-fire, launch, aircraft, ship, satellite, camera, radio,
place, routing, bike-share, transit, traffic, weather, cyclone, fire-perimeter,
terrain, installation and map-feature queries, plus a situation brief, over