npx @buildinternet/releases get modelcontextprotocolRecently shipped TypeScript SDK 2.4.0 and Python SDK 2.3.0, tightening x-mcp-header validation to the 2026-07-28 spec.
Tool header annotations are now enforced on both SDKs.
- TypeScript rejects
x-mcp-headeron anumberparameter: the client drops the tool from its listing, and the server answers calls to it with-32020. Usez.int()instead. - Python raises
InvalidSignatureat registration for anything but a plainstr,int, orboolparameter — includingstr | None,float, lists, and enums — where previously the server started and clients silently omitted the tool. - Header names must be valid tokens and unique case-insensitively.
OAuth credentials are bound to the server that issued them.
- Machine-to-machine providers now want
expectedIssuer; constructing them without it is deprecated and logs a warning. expectedResourceonrequireBearerAuthaccepts only tokens issued for this server, andfetchToken()throwsAuthorizationServerMismatchErrorbefore sending anything when client information belongs elsewhere.- Stored tokens and client information gained an
issuerfield — storage that rejects unknown fields must allow it.
Stateless servers and stricter transport defaults. Server.connect() now rejects while already connected, and a stateless Streamable HTTP transport handles one request, so build the server inside the handler. List calls return the whole list. HTTP transports follow redirects only within the same origin unless redirectPolicy: 'follow' is set.
Schema output and validation changed shape. On a 2025-11-25 connection, outputSchema from z.object(...).meta({ id }) is no longer wrapped: read structuredContent, not structuredContent.result. The bundled Ajv validator (fast-uri 3.1.8) rejects $id or $ref values with invalid URI schemes such as my_tool:output.
New opt-in limits. maxToolInputElements caps array elements and object members in tool arguments, and Python's max_sse_event_size ships alongside a raised floor of httpx2>=2.10.0.
The 1.x line still receives backports — same-origin redirect handling, expectedIssuer, and late registration of declared capabilities — with its README now pointing at v2.