Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Explainer

Migrate an MCP server from HTTP+SSE to Streamable HTTP

A migration guide for MCP server authors moving off the deprecated HTTP+SSE transport to Streamable HTTP as defined in the stateless 2026-07-28 specification.

By 6 min read
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

If your remote MCP server still exposes an /sse endpoint, it is running on a transport that has been deprecated since the 2025-03-26 revision of the protocol. The 2026-07-28 revision formally classifies HTTP+SSE as Deprecated under the new feature lifecycle policy, which means it is eligible for removal in a future revision. Clients are moving on: Claude Code, for example, now tries Streamable HTTP first and falls back to SSE only for older servers.

This guide is for server authors. It explains what is different, the order to migrate in, and how to keep older clients working while you do. It is based on the 2026-07-28 transport specification, checked on 20 November 2026. For the wider protocol changes in that revision (no handshake, no sessions), read What changed in MCP 2026-07-28 first.

Old and new in one table

HTTP+SSE (2024-11-05) Streamable HTTP (2026-07-28)
Endpoints Two: a GET endpoint that opens an SSE stream, and a POST endpoint announced by an endpoint event One MCP endpoint, POST only
Responses Always delivered over the long-lived SSE stream Per request: a single JSON object, or an SSE stream scoped to that request
Connection state Long-lived stream per client Stateless; no sessions, no Mcp-Session-Id
Server-to-client messages Anytime on the stream Change notifications via a subscriptions/listen request; input requests via multi round-trip results
Resumable streams Not defined Removed; a broken stream means re-issuing the request
Scaling Sticky connections to one instance Any instance can serve any request

Note that Streamable HTTP itself changed between 2025 and 2026. Servers written for the 2025-03-26 to 2025-11-25 revisions used session IDs, a GET stream and resumable streams. None of those exist in 2026-07-28. If you are migrating from SSE now, go straight to the current shape.

What the server must do now

From the 2026-07-28 Streamable HTTP binding:

  • Provide a single MCP endpoint path that accepts POST, such as https://example.com/mcp.
  • Accept one JSON-RPC request or notification per POST. Answer a request with Content-Type: application/json or text/event-stream; answer an accepted notification with 202 Accepted.
  • Expect clients to send Accept: application/json, text/event-stream and the request metadata headers: MCP-Protocol-Version, Mcp-Method, and Mcp-Name for tools/call, resources/read and prompts/get. Reject requests where headers and body disagree with 400 Bad Request and a HeaderMismatch error.
  • Treat the closing of a response stream as cancellation of that request.
  • Validate the Origin header on every request and return 403 if it is present and invalid. Bind to 127.0.0.1, not 0.0.0.0, when running locally.
  • Answer GET or DELETE on the endpoint with 405 Method Not Allowed, and ignore any Mcp-Session-Id or Last-Event-ID header from older clients.
  • Implement server/discover, so clients can learn your supported versions and capabilities.

Most of this is handled by an up-to-date SDK. The parts that are yours are state, authentication and deployment.

Migration steps

1. Upgrade the SDK

Do not hand-roll the transport. The official TypeScript SDK’s v2 line implements the 2026-07-28 revision and ships serving adapters for Express, Fastify, Hono and plain Node; your tool definitions carry over largely unchanged. In Python, FastMCP serves Streamable HTTP with one switch:

# before: the deprecated SSE transport
uv run fastmcp run server.py --transport sse --port 8000

# after: Streamable HTTP, served at /mcp
uv run fastmcp run server.py --transport http --port 8000

Read your SDK’s migration notes for the version you move to. Our TypeScript and Python server tutorials use current versions.

2. Remove hidden connection state

The biggest design change is not the transport but the loss of sessions. With SSE, many servers kept per-connection state in memory: a logged-in API client, an open browser tab, a selected project. In 2026-07-28, any request may land on any instance, and there is no connection to hang state on.

Replace it with explicit handles. A tool that starts something returns an identifier; later tools take it as an ordinary argument:

open_browser()           -> { "browser_id": "b_7Hq2..." }
navigate(browser_id, url)
screenshot(browser_id)

Store the state server-side keyed by handle and by the authenticated user, generate handles with a secure random generator, and never treat possession of a handle as authentication. The MCP security guidance calls the failure mode “state handle hijacking”.

3. Replace server-initiated messages

If your server sent requests to the client over the SSE stream (sampling, elicitation, roots), those now go through the multi round-trip pattern: return a result with resultType: "input_required" listing what you need, and the client retries the original request with the answers. Sampling and roots are also deprecated; the suggested migrations are to call a model provider’s API directly and to take directories as tool parameters. Change notifications such as tools/list_changed go out on a subscriptions/listen stream the client opens.

4. Add authentication

An SSE server that relied on an unguessable URL or a shared header token should use this migration to adopt OAuth as the authorisation specification describes: Protected Resource Metadata, audience-checked tokens and per-tool scopes. Secure a remote MCP server with OAuth walks through it.

5. Fix the infrastructure around it

  • Proxies: set X-Accel-Buffering: no on SSE responses (the spec recommends it) and make sure reverse proxies do not buffer streamed responses.
  • Timeouts: long-running tool calls stream progress on their own response; set idle timeouts to suit, and send SSE comment lines as keep-alives on long subscriptions/listen streams.
  • Load balancing: drop sticky sessions. They are no longer needed and hide state bugs.
  • Observability: the new Mcp-Method and Mcp-Name headers let gateways and logs see which tool was called without parsing bodies.

6. Keep old clients working during the transition

The specification describes how to support both:

  • Keep hosting the old SSE and POST endpoints alongside the new MCP endpoint for a deprecation period. Combining the old POST endpoint with the new one is possible but adds complexity.
  • Clients detect your era automatically. A modern client POSTs to the URL it was given. If that fails with 400, 404 or 405 and no recognised modern JSON-RPC error, it falls back to GET and waits for the old endpoint event.

So you can publish the new /mcp URL as the default, leave /sse running, watch traffic to it fall, announce a removal date, and then turn it off.

7. Update what users copy

Change your README, install buttons and registry entry to the new URL and transport:

claude mcp add --transport http your-server https://example.com/mcp
codex mcp add your-server --url https://example.com/mcp
{ "mcpServers": { "your-server": { "url": "https://example.com/mcp" } } }

Remove --transport sse from every example. The MCP config cheat sheet lists the syntax per client.

Test it

  • Connect with MCP Inspector using the Streamable HTTP transport (npx @modelcontextprotocol/inspector), list tools and call each one.
  • Check the edges with curl: a GET to /mcp should return 405; a POST with a bad Origin should return 403; a POST without a token should return 401 with a WWW-Authenticate header if you added OAuth.
  • Run two instances behind a load balancer without sticky sessions and repeat a multi-step task. If it fails, some state is still tied to an instance.
  • Connect from at least two real hosts (for example Claude Code and Cursor) before announcing the change.

Next steps

Covers

  • What changed in MCP 2026-07-28: a stateless protocol

    The July 2026 MCP specification removes the handshake and sessions, adds server discovery and deprecates roots and sampling. What it means for you.

    Article

  • Build an MCP server in TypeScript

    Build a small MCP server with the official TypeScript SDK v2, test it from the command line and in MCP Inspector, then connect it to Claude Code or Cursor.

    TutorialIntermediate1 h

  • Build an MCP server in Python with FastMCP

    Build a small MCP server in Python with FastMCP, test its tools in MCP Inspector without a model, then connect it to Claude Code, Cursor or another MCP host.

    TutorialIntermediate1 h

  • Secure a remote MCP server with OAuth

    Protect a Streamable HTTP MCP server with OAuth 2.1 as the 2026-07-28 spec requires: resource metadata, audience checks, per-tool scopes and Inspector tests.

    TutorialAdvanced1 h 15 min

  • Streamable HTTP

    The MCP transport for remote servers, using HTTP POST requests with optional streamed responses. It replaced the older HTTP+SSE transport.

    Glossary

Back to top