Skip to main content

Streamable HTTP & SSE — Transport Layers

← Back to Dashboard
1. The Stdio Transport2. Streamable HTTP & SSE3. Stateless Architecture & Discovery (Spec 2026-07-28)

Streamable HTTP & SSE

📚 Transport Layers⏱ 8 min⭐ 60 XP⌨ Hands-on lab

Remote Connections: Streamable HTTP

To host an MCP Server in the cloud (e.g., on Vercel, Cloudflare Workers, or AWS) so multiple clients can connect over standard web infrastructure, the official network standard is Streamable HTTP (introduced in 2025-03-26 to replace the deprecated 2024-11-05 dual-endpoint HTTP+SSE transport, and refined into a fully Stateless Core in 2026-07-28).

How Streamable HTTP Works

  1. The Server exposes a single unified HTTP endpoint (e.g., /mcp) rather than separate /sse and /messages endpoints.
  2. The Client sends JSON-RPC requests via standard HTTP POST with Accept: application/json, text/event-stream.
  3. The Server responds directly with application/json for immediate results or upgrades that response to text/event-stream (SSE) to stream intermediate progress notifications before returning the final result.
⚠️ Transport Evolution Note: The original 2024-11-05 HTTP+SSE transport (SSEServerTransport) required two separate endpoints and persistent sticky connections, and is deprecated. In 2025-03-26–2025-11-25, Streamable HTTP optionally tracked sessions via Mcp-Session-Id; in 2026-07-28, Mcp-Session-Id was removed so every Streamable HTTP request is completely stateless.
// TypeScript SDK v2 (@modelcontextprotocol/server) — Stateless Web-Standard Handler:
import { createMcpHandler, McpServer } from "@modelcontextprotocol/server";

const handler = createMcpHandler(() => new McpServer({ name: "cloud-mcp", version: "1.0.0" }));
export default { fetch: handler.fetch }; // Single /mcp endpoint

// TypeScript SDK v1 (@modelcontextprotocol/sdk) — Stateless Streamable HTTP on Express:
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
app.post("/mcp", async (req, res) => {
  const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined });
  await server.connect(transport);
  await transport.handleRequest(req, res, req.body);
});
// Deprecated 2024-11-05 dual-endpoint transport (DO NOT use for new servers):
// import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
⌨ HANDS-ON LABSend a Streamable HTTP Request to /mcp
⭐ +150 XP

Connect to a remote MCP server's unified /mcp endpoint using Streamable HTTP (which superseded the deprecated 2024-11-05 dual-endpoint HTTP+SSE transport).

1POST a JSON-RPC discovery request to /mcp accepting application/json and text/event-stream.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 1 — type "hint" if stuck
🧪 Knowledge Check
Press 1-4 to select1 of 3
Which transport is the official standard for cloud-hosted remote MCP servers?
stdio
WebSockets
Streamable HTTP (single /mcp endpoint)
Legacy 2024-11-05 dual-endpoint HTTP+SSE