{
  "id": "ao-mcp-streamable-http-table",
  "kind": "table",
  "slug": "ao-mcp-streamable-http",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/ao-mcp-streamable-http/",
  "title": "MCP stdio and Streamable HTTP session rules",
  "columns": [
    "name",
    "kind",
    "detail"
  ],
  "rows": [
    {
      "name": "stdio",
      "kind": "transport",
      "detail": "The client launches the server as a subprocess and exchanges JSON-RPC on stdin and stdout."
    },
    {
      "name": "stdio message framing",
      "kind": "rule",
      "detail": "Messages are delimited by newlines and must not contain embedded newlines."
    },
    {
      "name": "stderr",
      "kind": "stdio rule",
      "detail": "The server may write UTF-8 strings to stderr for logging."
    },
    {
      "name": "Streamable HTTP",
      "kind": "transport",
      "detail": "The client posts JSON-RPC to the MCP HTTP endpoint; the server may reply with JSON or an SSE stream."
    },
    {
      "name": "Content-Type",
      "kind": "Streamable HTTP",
      "detail": "The server must return text/event-stream or application/json for a JSON-RPC request; the client must support both."
    },
    {
      "name": "MCP-Session-Id",
      "kind": "header",
      "detail": "If the server returns this on InitializeResult, later Streamable HTTP requests must include it. The id must use visible ASCII from 0x21 to 0x7E."
    },
    {
      "name": "HTTP 400",
      "kind": "status",
      "detail": "Used for a bad request; the body may be a JSON-RPC error with no id."
    },
    {
      "name": "HTTP 404",
      "kind": "status",
      "detail": "If a request that carried MCP-Session-Id returns 404, the client must start a new session with a fresh InitializeRequest and no session id."
    },
    {
      "name": "HTTP DELETE",
      "kind": "session end",
      "detail": "Clients that no longer need a session should DELETE the MCP endpoint with MCP-Session-Id; the server may reply 405 if it does not allow client termination."
    },
    {
      "name": "custom transports",
      "kind": "transport",
      "detail": "Clients and servers may also implement custom transports in a pluggable way."
    }
  ],
  "related_slugs": [
    "ao-mcp",
    "ao-mcp-transports-and-trust"
  ],
  "license": "CC-BY-4.0",
  "source_license": "Apache-2.0 (specification; earlier contributions MIT) (Model Context Protocol); Apache-2.0 (specification; earlier contributions MIT) (modelcontextprotocol/modelcontextprotocol (GitHub)); prose restates cited source lines in own words",
  "as_of": "2026-11-16",
  "status": "week-draft-20261116",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}
