· via dev.to (home feed)
Fixing the MCP 'Unsupported protocol version' 400 on SDK 1.x HTTP servers
MCP HTTP servers on TypeScript SDK 1.x reject requests carrying the new 2026-07-28 protocol version header with a 400. A dev.to guide explains when that error is harmless and when a migration to the v2 package is required.

What is happening
HTTP servers built on version 1.x of the Model Context Protocol TypeScript SDK, @modelcontextprotocol/sdk, are rejecting certain clients with HTTP 400 and a JSON-RPC error body carrying code -32000 and the message "Unsupported protocol version". According to a troubleshooting guide published on dev.to and originally posted at runheed.com, the trigger is a request whose MCP-Protocol-Version header names a protocol revision the SDK does not know.
The revision at the centre of the problem is MCP 2026-07-28, which the guide describes as the protocol's first stateless revision: it drops the initialize handshake and instead has clients send the protocol version on every request. Clients built on the newest SDKs try it first, and the Python SDK 2.x already lists 2026-07-28 as its latest version.
The 1.x line cannot answer it. SDK 1.32.2, the final 1.x release, stops at 2025-11-25; its full supported list is 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05 and 2024-10-07. Any header naming something newer gets the 400.
When the error is harmless
The guide's core point is that this 400 is often not a fault at all. A dual-era client that supports both protocol generations sees a plain 400, one without a modern error body, concludes it has reached a legacy server, and falls back to the initialize handshake, which the 1.x server answers normally. The client logs the rejection and then works, so there is nothing to fix today.
A related compatibility detail: the Python MCP client 2.x connecting to a 1.x TypeScript server still works, because it sends no version header during initialize and both sides settle on 2025-11-25.
Measuring who is affected
Before changing anything, the guide suggests finding out how many clients actually need the new protocol. Attach an error handler to the server transport: the SDK invokes onerror before it answers with the 400, and the rejection reason arrives in the error's message. Logging the MCP-Protocol-Version header and the user agent from the rejected request then gives a concrete count of new-protocol clients. The guide demonstrates this on WebStandardStreamableHTTPServerTransport, instantiated without a session ID generator for stateless operation.
Serving 2026-only clients
A client that speaks only 2026-07-28 cannot use a 1.x server at all. The remedy is migration to the v2 package, @modelcontextprotocol/server, which supports both protocol generations.
The guide's sharpest warning concerns a tempting shortcut: do not fake the modern protocol's UnsupportedProtocolVersionError, code -32022, from a 1.x server. Under 2026-07-28 a modern server answers an unsupported version with -32022 plus the list of versions it supports, which lets the client retry intelligently. If a legacy server emits that code, the client concludes it has found a modern server and stops falling back to initialize, turning a recoverable mismatch into a hard failure. Until the migration happens, the advice is to leave the 400 exactly as it is, rewriting neither the header nor the error code.
Where the error typically comes from
The guide lists three common sources: a client on the newest protocol, which sends the version with every request and tries it first; a server still on SDK 1.x, where only the v2 packages move past 2025-11-25; and a hand-written client or test, such as a curl invocation that hard-codes a version header the server does not support.
Why it matters
MCP's protocol revisions are arriving faster than many deployed servers update, and the boundary between the 1.x SDK and the v2 packages is a real compatibility cliff rather than a smooth upgrade. Operators who spot this 400 in their logs need to separate cosmetic noise from genuine lockouts, and the cheap first step, logging the rejected version header, shows exactly how urgent a migration to @modelcontextprotocol/server really is. The worst response is the intuitive one: spoofing error -32022 to look modern silently disables the fallback mechanism that currently keeps dual-era clients working.
- #model-context-protocol
- #mcp
- #typescript
- #sdk
- #debugging