The 2026-07-28 revision of the Model Context Protocol makes MCP stateless: the initialize handshake and the Mcp-Session-Id header are gone, and every request now carries its own protocol version, client identity, and capabilities in _meta. Server-to-client requests (sampling, elicitation, roots) are replaced by a retry pattern, Tasks moved into an extension, and Roots, Sampling, and Logging are deprecated. To migrate, upgrade to the v2 SDKs (Python mcp 2.x, TypeScript @modelcontextprotocol/server and @modelcontextprotocol/client 2.x), replace any reliance on sessions with explicit handles, and run in dual-era mode while clients catch up.
This guide walks through every breaking change with before/after wire examples, then gives a concrete migration checklist for server and client authors.
Release timeline and status
The official release post shipped the final specification on July 28, 2026, after a release candidate in May. The previous stable revision was 2025-11-25. The release post states that all four Tier 1 SDKs (TypeScript, Python, Go, C#) support 2026-07-28 as of release day, with Rust support in beta.
Package registries confirm the v2 lines:
| SDK | Package | First v2 stable | Latest at time of writing |
|---|---|---|---|
| Python | mcp on PyPI |
2.0.0 (2026-07-28) | 2.3.0 |
| TypeScript server | @modelcontextprotocol/server on npm |
2.0.0 (2026-07-27) | 2.4.0 |
| TypeScript client | @modelcontextprotocol/client on npm |
2.x | 2.4.0 |
Both TypeScript v2 packages declare Node.js 20 or later in their engines field. The v1 lines (mcp 1.x, @modelcontextprotocol/sdk 1.x) still receive maintenance releases, so existing servers keep working, but new protocol features only land in v2.
The full list of changes is in the 2026-07-28 changelog. Below are the ones that will actually break code.
Change 1: no more handshake, no more sessions
Under 2025-11-25, a client opened a connection with initialize, received the server's capabilities and a negotiated version, sent notifications/initialized, and (on HTTP) carried an Mcp-Session-Id header on every later request. Servers could stash per-session state against that ID.
The 2026-07-28 spec removes all of that (SEP-2567, SEP-2575). Each request is self-describing.
Before: legacy session flow (abbreviated)
POST /mcp HTTP/1.1
Content-Type: application/json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
"protocolVersion":"2025-11-25",
"capabilities":{},
"clientInfo":{"name":"ExampleClient","version":"1.0.0"}}}
HTTP/1.1 200 OK
Mcp-Session-Id: 1868a90c-...
POST /mcp HTTP/1.1
Mcp-Session-Id: 1868a90c-...
MCP-Protocol-Version: 2025-11-25
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_weather","arguments":{"location":"Seattle, WA"}}}
After: a single self-contained request
This is the tools/call example from the Streamable HTTP transport spec:
POST /mcp HTTP/1.1
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_weather
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_weather",
"arguments": { "location": "Seattle, WA" },
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" },
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}
Three things to notice:
- Version and capabilities travel in
_meta. Clients SHOULD sendclientInfo; servers SHOULD returnio.modelcontextprotocol/serverInfoin each result's_meta. - New required HTTP headers.
Mcp-Methodis required on all requests, andMcp-Name(the tool or prompt name, or resource URI) ontools/call,resources/read, andprompts/get(SEP-2243). Gateways can now route, rate-limit, and meter without parsing JSON bodies. - Headers must match the body. If
MCP-Protocol-VersionorMcp-Namedisagrees with the body, the server must return400 Bad Requestwith JSON-RPC error-32020(HeaderMismatch). This closes the gap where a load balancer routes on one value while the server executes another.
Every result now has resultType
All results carry a required resultType: "complete" for normal results or "input_required" for the new multi round-trip pattern. Clients must treat a missing field from older servers as "complete".
What replaces session state?
If your server kept a database cursor, an auth context, or a shopping cart keyed by session, you need to move that state into the protocol explicitly. The spec's guidance is server-minted handles passed as ordinary tool arguments. For example, an open_query tool returns {"cursor_id": "q_7f3a"}, and a fetch_page tool takes cursor_id as a parameter. The model carries the handle forward like any other value, and any replica behind your load balancer can serve the next call.
This is the change with the largest blast radius. The release post is candid that developers "that did depend on session identifiers" should expect migration cost.
Change 2: server/discover and version negotiation
Servers MUST now implement server/discover, which returns supported versions, capabilities, identity, and optional instructions (discovery spec):
{
"jsonrpc": "2.0",
"id": "discover-1",
"result": {
"resultType": "complete",
"supportedVersions": ["2026-07-28"],
"capabilities": { "tools": {}, "resources": {} },
"_meta": {
"io.modelcontextprotocol/serverInfo": { "name": "ExampleServer", "version": "1.0.0" }
},
"instructions": "This server provides weather and resource utilities.",
"ttlMs": 3600000,
"cacheScope": "public"
}
}
Clients are not required to call it. A client may simply send its request and handle an UnsupportedProtocolVersionError, which now uses code -32022 and lists the versions the server does support:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32022,
"message": "Unsupported protocol version",
"data": { "supported": ["2026-07-28", "2025-11-25"], "requested": "1900-01-01" }
}
}
The client then retries with a mutually supported version.
Talking to old and new servers
The versioning page defines "modern" (2026-07-28+), "legacy" (2025-11-25 and earlier), and "dual-era" implementations, with a full compatibility matrix. The short version:
| Client | Server | Result |
|---|---|---|
| Modern | Modern | Works |
| Modern | Legacy | Fails; client should surface an actionable error |
| Dual-era | Legacy | Works via fallback to initialize |
| Legacy | Modern | Fails; legacy clients cannot fall forward |
| Legacy | Dual-era | Works |
Detection is transport-specific. On stdio, a dual-era client probes with server/discover and falls back to initialize on any non-modern error. On HTTP, it sends a modern request and inspects a 400 body: a recognized modern JSON-RPC error means "modern server, fix the request"; anything else means "legacy, fall back." Clients should cache the result per server process or origin.
The practical consequence: ship servers as dual-era first. A modern-only server breaks every client that has not upgraded.
Change 3: Multi Round-Trip Requests replace server-initiated requests
Previously a server could pause a tool call and send its own JSON-RPC request back to the client, such as elicitation/create to ask the user a question or sampling/createMessage to borrow the client's LLM. That required a live bidirectional channel and sticky routing.
Under MRTR (SEP-2322), the server instead returns an InputRequiredResult and the client retries the original request with answers attached. The spec calls this a breaking change: the old server-initiated pattern "is no longer supported."
Step 1: the server asks for input
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"resultType": "input_required",
"inputRequests": {
"github_login": {
"method": "elicitation/create",
"params": {
"mode": "form",
"message": "Please provide your GitHub username",
"requestedSchema": {
"type": "object",
"properties": { "name": { "type": "string" } },
"required": ["name"]
}
}
}
},
"requestState": "AEAD-protected blob"
}
}
Step 2: the client retries with a new ID
The client re-sends the same tools/call with a different JSON-RPC id, an inputResponses map keyed the same way (for example {"github_login": {"action": "accept", "content": {"name": "octocat"}}}), and the exact requestState string echoed back unmodified.
MRTR is allowed only on tools/call, resources/read, and prompts/get. Two rules matter for security:
- Treat
requestStateas attacker-controlled. If it influences authorization or business logic, the spec requires integrity protection (HMAC or AEAD) and rejecting anything that fails verification. It also recommends binding the state to the authenticated principal, a short expiry, and the originating request to limit replay. - Do not request capabilities the client did not declare. A server must not put
elicitation/createininputRequestsunless the client advertised elicitation support; the Python SDK surfaces this as error-32021(MissingRequiredClientCapability).
The related notifications/elicitation/complete and the URL-mode elicitationId added in 2025-11-25 are removed; the client learns the outcome by retrying.
Change 4: subscriptions, logging, and other removals
subscriptions/listenreplaces the HTTP GET stream andresources/subscribe/unsubscribe. Clients open one long-lived POST response stream and opt in totoolsListChanged,promptsListChanged,resourcesListChanged, orresourceSubscriptions. Progress and log notifications still flow on the stream of the request they belong to.- Removed:
ping,logging/setLevel, andnotifications/roots/list_changed. Log level is now set per request viaio.modelcontextprotocol/logLevelin_meta. - No SSE resumability.
Last-Event-IDand event IDs are gone; a broken stream loses the in-flight request, and the client re-issues it with a new ID. Modern-only servers should answer GET or DELETE on the endpoint with405and ignore anyMcp-Session-Idheader. - Error code changes. Resource-not-found moves from
-32002to-32602. The range-32020to-32099is now reserved for the spec.
Change 5: cacheable list results
tools/list, prompts/list, resources/list, resources/read, and resources/templates/list must now return ttlMs and cacheScope ("public" or "private") via a new CacheableResult interface (SEP-2549). Servers SHOULD also return tools in a deterministic order. The changelog's stated reason is client-side caching and better LLM prompt-cache hit rates: if your tool list reorders between requests, every downstream prompt that embeds it misses the provider's cache.
Change 6: authorization hardening
The auth changes are small in code but important for anyone running a remote MCP server behind OAuth:
- Issuer validation (SEP-2468). Authorization servers SHOULD include the
issparameter per RFC 9207, and clients MUST validate a presentissagainst the recorded issuer before redeeming the code. This defends against OAuth mix-up attacks. application_typein Dynamic Client Registration (SEP-837) to avoid OpenID Connect redirect URI conflicts.- Credentials bound to their issuer (SEP-2352). Clients must key stored credentials by issuer, never reuse them with a different authorization server, and re-register if the server changes.
- DCR is deprecated in favor of Client ID Metadata Documents. It still works for authorization servers that lack CIMD support.
Change 7: extensions, Tasks, and MCP Apps
Capabilities gained an extensions map for optional features outside the core. Two official extensions matter now:
- Tasks (
io.modelcontextprotocol/tasks) moved out of the experimental core (SEP-2663). The blockingtasks/resultis replaced by polling withtasks/get, a newtasks/updatesends client input,tasks/listis removed, and servers may return task handles without per-request opt-in. - MCP Apps (
io.modelcontextprotocol/ui), which a client advertises with the MIME types it can render, for exampletext/html;profile=mcp-app.
If one side supports an extension and the other does not, the supporting side must fall back to core behavior or reject the request.
Deprecations and the 12-month window
The spec now has a formal feature lifecycle with Active, Deprecated, and Removed states and a minimum twelve-month deprecation window. Currently deprecated:
| Feature | Suggested replacement |
|---|---|
| Roots | Pass directories or files via tool parameters, resource URIs, or server config |
| Sampling | Call LLM provider APIs directly from the server |
| Logging | stderr on stdio, or OpenTelemetry |
| HTTP+SSE transport | Streamable HTTP |
includeContext: "thisServer" / "allServers" |
Omit or use "none" |
| Dynamic Client Registration | Client ID Metadata Documents |
Deprecated features still work. New implementations should not adopt them.
Migrating your code
Python servers
The Python SDK 2.x renames FastMCP to MCPServer; importing mcp.server.fastmcp now raises ModuleNotFoundError (migration guide). A minimal v2 server, from the SDK README:
from mcp.server import MCPServer
mcp = MCPServer("Demo")
@mcp.tool()
def add(a: int, b: int) -> int:
"""Add two numbers."""
return a + b
@mcp.resource("greeting://{name}")
def greeting(name: str) -> str:
"""Greet someone by name."""
return f"Hello, {name}!"
Serve it over Streamable HTTP and call it with the v2 client:
uv add "mcp[cli]"
uv run mcp run server.py --transport streamable-http
import asyncio
from mcp import Client
async def main() -> None:
async with Client("http://localhost:8000/mcp") as client:
result = await client.call_tool("add", {"a": 1, "b": 2})
print(result.structured_content) # {'result': 3}
asyncio.run(main())
Per the SDK's What's new in v2 page, the same server answers 2025-era initialize traffic and 2026-era stateless traffic "with nothing to configure," and the Client probes server/discover once and falls back to initialize for older servers. Other breaking changes to budget for: camelCase fields became snake_case (input_schema, is_error), McpError became MCPError, ctx.fastmcp became ctx.mcp_server, transport settings moved from the constructor to run(), the WebSocket transport and experimental Tasks support were removed, and in multi-replica deployments you should configure shared RequestStateSecurity keys so any replica can verify MRTR requestState.
TypeScript servers and clients
v2 splits the old @modelcontextprotocol/sdk into @modelcontextprotocol/server and @modelcontextprotocol/client, plus framework adapters and a codemod package for the v1-to-v2 move (packages):
npm install @modelcontextprotocol/server
npm install @modelcontextprotocol/client
The defaults differ from Python, which is easy to miss. According to the TypeScript protocol versions page, the client defaults to the legacy handshake. Opt in to negotiation explicitly:
import { Client } from "@modelcontextprotocol/client";
const client = new Client(
{ name: "my-client", version: "1.0.0" },
{ versionNegotiation: { mode: "auto" } }, // probe server/discover, fall back to initialize
);
Use mode: { pin: '2026-07-28' } to require the new revision; a pin never falls back. On the server side, createMcpHandler serves 2025 traffic statelessly by default; pass legacy: 'reject' only once your clients have all upgraded.
Migration checklist
- Inventory session usage. Search for anything keyed by session ID or connection. Replace it with server-minted handles in tool arguments, or with your own auth-derived state.
- Upgrade SDKs to v2 and deploy in dual-era mode.
- Replace server-initiated requests (elicitation, sampling, roots) with MRTR, and integrity-protect
requestState. - Fix gateways and proxies. Route on
Mcp-Method/Mcp-Name, stop pinning byMcp-Session-Id, and make sure intermediaries do not strip the new headers. - Return deterministic
tools/listoutput with sensiblettlMsandcacheScopevalues. - Harden OAuth clients: validate
iss, key credentials by issuer, plan the move from DCR to Client ID Metadata Documents. - Retire deprecated features (Roots, Sampling, Logging, HTTP+SSE) on your own schedule within the twelve-month window.
- Switch to legacy-reject only after telemetry shows no 2025-era clients.
Frequently Asked Questions
What is the latest MCP specification version?
The latest stable revision is 2026-07-28, released on July 28, 2026. The previous stable revision was 2025-11-25.
Does MCP still use sessions?
No. The 2026-07-28 revision removes protocol-level sessions and the Mcp-Session-Id header. Every request carries its protocol version and client capabilities in _meta, so any server replica can handle any request. State that must persist across calls should be passed explicitly, for example as a handle returned by one tool and accepted as an argument by another.
Will my existing MCP server stop working?
Not immediately. Legacy clients keep working against legacy and dual-era servers, and deprecated features remain functional for at least twelve months under the new lifecycle policy. A modern-only client, however, cannot talk to a legacy-only server, so upgrade servers to dual-era first.
Which SDK versions support MCP 2026-07-28?
The Python mcp package from 2.0.0 and the TypeScript @modelcontextprotocol/server and @modelcontextprotocol/client packages from 2.0.0. The release announcement says the Go and C# Tier 1 SDKs also support it, with Rust in beta.
What replaced elicitation and sampling requests from the server?
Multi Round-Trip Requests. The server returns resultType: "input_required" with an inputRequests map, and the client retries the original call with inputResponses and the echoed requestState. Sampling itself is also deprecated in favor of servers calling LLM APIs directly.
Do I need to change my OAuth setup?
If you run a remote server with OAuth, yes, in small ways: clients must validate the iss parameter when present, bind stored credentials to the issuing authorization server, and specify application_type during Dynamic Client Registration. DCR itself is now deprecated in favor of Client ID Metadata Documents.
Conclusion
MCP 2026-07-28 trades the convenience of sessions for something far easier to operate: stateless requests that route, cache, and scale like ordinary HTTP. The cost lands on servers that hid state in sessions and on anything that relied on server-initiated requests. Upgrade to the v2 SDKs, run dual-era, convert session state to explicit handles, adopt MRTR with signed requestState, and fix your gateways to use the new headers. Do that, and the twelve-month deprecation window gives you room to retire the rest without a flag day.
New to building servers? Start with our walkthrough on how to build an MCP server, compare the protocol with traditional APIs in MCP vs REST API, and see which servers are worth installing in our roundup of the best MCP servers for 2026. Our free developer tools include a JSON formatter that helps when you are reading raw JSON-RPC traffic.