Skip to main content
Platform MCP Docs

Sessions, Errors, and Cancellation

Handle negotiated versions, recorded sessions, notifications, cancellation, request limits, and JSON-RPC errors.

Version MCP 2025-11-25 Current Streamable HTTP contract with compatibility versions Reviewed Jul 26, 2026 Next review Oct 26, 2026

The free Developer workspace is for non-production building and learning under published limits. External API or MCP client credentials use a separate scoped request and approval process.

Owner: Batoi Developer Experience Reviewed by: Batoi Platform Security Source revision: upgrade-jul-26-2026

Browse Batoi Platform MCP Documentation Sessions, Errors, and Cancellation

Sessions, Errors, and Cancellation

Sessions

When session evidence storage is available, initialization returns a cryptographically random persisted session UID in MCP-Session-Id. Current clients send that header with subsequent requests.

The server validates that the session belongs to the authenticated workspace and remains open. Missing, closed, expired, or foreign sessions fail without revealing another workspace.

Cancellation

Send authenticated HTTP DELETE to the same MCP endpoint with MCP-Session-Id to cancel and close the recorded session. A missing or unknown session returns 404.

JSON-RPC notifications receive an empty accepted response. Synchronous requests that have already completed cannot be retroactively cancelled.

Limits

  • Request bodies are limited to 1 MiB.
  • Responses are limited to 2 MiB.
  • Current clients accept both application/json and text/event-stream.
  • Request IDs are bounded and replaced when malformed.

Error classes

  • -32700 invalid JSON.
  • -32600 invalid JSON-RPC, transport, media type, or protocol request.
  • -32601 unknown or unauthorized method or tool.
  • -32602 invalid arguments or resource URI.
  • -32001 authentication or host registration failed.
  • -32002 session validation failed.