Repository navigation
docs(api): MCP endpoint is /v1/mcp Streamable HTTP, not /v1/mcp/sse - #1982
Conversation
The generated HTTP API reference still documented the legacy MCP SSE
transport at /v1/mcp/sse ("Establish an MCP SSE Connection" + "Send message
to MCP server"). That path has not existed since v2.0.0: the runtime mounts
a rmcp StreamableHttpService at /v1/mcp and registers three operations
(GET mcp_stream, POST mcp_message, DELETE mcp_terminate_session). The
source comment is explicit -- "This replaces the legacy SSE transport that
was removed in rmcp 1.x".
The prose docs (features/large-language-models/mcp.md, components/tools/mcp.md,
reference/spicepod/runtime.md) already say /v1/mcp; only the OpenAPI-derived
reference was stale, because website/public/openapi.json had never been
refreshed past the SSE-era spec.
Replace /v1/mcp/sse with the runtime's /v1/mcp path object in
website/public/openapi.json, regenerate the three operation pages, and drop
the two stale ones.
Version scope: /v1/mcp/sse was correct through v1.11.x and wrong from v2.0.0
onward, so the same fix is applied to version-2.0.x and version-2.1.x (whose
MCP route table is identical to trunk's); the 1.x snapshots keep /v1/mcp/sse.
✅ Pull with Spice PassedPassing checks:
|
|
Heads-up on the red Generate API Docs check: it is a pre-existing repo failure, not caused by this PR. The
Practical consequence: the bot cannot regenerate the API MDX for this PR, so the generated pages in the diff were produced locally with Worth a separate |
|
🚀 deployed to https://835b4bce.spiceai-org-website.pages.dev |
|
🚀 deployed to https://2485106b.spiceai-org-website.pages.dev |
Summary
The published HTTP API reference documents the MCP endpoint at a path that has not existed since v2.0.0:
/v1/mcp/sse/v1/mcpGET"Establish an MCP SSE Connection",POST"Send message to MCP server"GET mcp_stream,POST mcp_message,DELETE mcp_terminate_sessioncrates/runtime/src/http/routes.rsmounts anrmcpStreamableHttpServiceat/v1/mcpand documents three operations there. The comment in source is explicit:A client following the reference would
POSTto/v1/mcp/sseand get a 404, and theDELETEsession-termination operation was entirely undocumented.The prose docs are already correct —
features/large-language-models/mcp.md,components/tools/mcp.md, andreference/spicepod/runtime.mdall say/v1/mcp. Only the OpenAPI-derived reference was stale, becausewebsite/public/openapi.jsonwas last refreshed for spiceai/spiceai#10272 and still carried the SSE-era spec.What changed
website/public/openapi.json: replaced the/v1/mcp/ssepath object with the runtime's/v1/mcpobject (three operations, verbatim fromspiceai/spiceai@trunk.schema/openapi.json; no$refs, so no schema changes were needed).npx docusaurus gen-api-docs spice→ newmcp-stream,mcp-message,mcp-terminate-sessionpages; deleted the staleoperation-id.*andmcp-event.*pages; updated themcpcategory in the generatedsidebar.ts.sidebar.tsblock was verified byte-identical to what a fullclean-api-docs+gen-api-docsemits, so the hand-applied sidebar edit matches plugin output. Unrelated operations' base64api:blobs are untouched (a full clean+regen rewrites all of them non-deterministically; avoided deliberately to keep the diff reviewable).Version scope
/v1/mcp/ssewas correct through v1.11.x and wrong from v2.0.0 onward, so this is a version-specific change fixed at and after the release that introduced the new path:website/docs/(vNext)/v1/mcpversion-2.1.x/v1/mcp(verified at tagv2.1.1)version-2.0.x/v1/mcp(verified at tagv2.0.0)version-1.11.xand older/v1/mcp/sse(verified at tagv1.11.6)The v2.0.0 and v2.1.1 route tables are identical to trunk's (same three operations, same
runtime.mcp.allowed_hosts403 text, same 32 MiB body limit), so the regenerated pages are accurate for both snapshots. Versioned API pages in this repo are byte-identical copies of the vNext ones (verified againstget-catalogs.api.mdx/list-tools.api.mdx), so they were propagated by copy, matching how the snapshots were originally cut.After the sweep,
grep -rln 'v1/mcp/sse' website/returns onlyversion-1.5.x–version-1.11.xpages plus the historicalreleases/v1.1.0.mdblog post — all correct for their versions.Source refs
spiceai/spiceai@trunkcrates/runtime/src/http/routes.rs—nest_service("/v1/mcp", mcp_service)+ the three documented operationsspiceai/spiceai@trunk.schema/openapi.json—/v1/mcpwithmcp_stream/mcp_message/mcp_terminate_sessionv1.11.6(/v1/mcp/sse),v2.0.0andv2.1.1(/v1/mcp)Test plan
cd website && npm run buildpasses (with the versioned propagation in place)