Send a Model Context Protocol message
POST/v1/mcp
Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. Spice is dual-era: 2026-07-28 clients call server/discover and tools without a session; legacy clients may still initialize and use Mcp-Session-Id. The response is either a single JSON-RPC response (application/json) or an SSE stream (text/event-stream), selected via the Accept header.
Request​
Responses​
- 200
- 202
- 400
- 401
- 403
- 404
- 413
JSON-RPC response. Returned as application/json for a single response or text/event-stream when the server streams additional messages.
Message accepted (for JSON-RPC notifications / responses that do not require a reply).
Malformed JSON-RPC payload, unsupported protocol version (-32022 lists supported versions), or Streamable HTTP header/body mismatch (-32020).
Unauthorized. The /v1/mcp endpoint requires runtime.auth to be configured. Configure an API key provider in your Spicepod and retry with credentials.
Forbidden. The Host header value is not in the runtime.mcp.allowed_hosts list, or the Origin header is not in runtime.cors.allowed_origins. Configure runtime.mcp.allowed_hosts or runtime.cors.allowed_origins. Host ["*"] disables the Host check. Origin ["*"] expands to localhost defaults — it does not accept every Origin. A concrete Origin list 403s a mismatched Origin.
Unknown method, or unknown/expired Mcp-Session-Id on a legacy-era request.
Payload too large. Maximum allowed size is 32 MiB.
