Modern returns ttlMs/cacheScope on cacheable results.
Modern implements server/discover.
Modern uses Multi Round-Trip Requests instead of server-initiated requests.
Modern uses per-request _meta (protocolVersion/clientInfo/clientCapabilities) instead of an initialize handshake.
Modern uses subscriptions/listen instead of GET stream + resources/subscribe.
A supported MCP protocol version, ordered oldest to newest.
Whether a version predates the modern redesign (< 2026-07-28).
The modern (>= 2026-07-28) redesign: stateless HTTP, per-request _meta, server/discover, MRTR, subscriptions/listen, cacheable results, and the standard request headers. Gated behind this single predicate so older versions keep their session/handshake-based behavior.
Server-side negotiation: accept the client's version if supported, otherwise offer our latest stable version.
Parse a wire string into a ProtocolVersion, or throw if unknown.
The JSON-RPC error code for "resource not found": modern aligns it to invalidParams (-32602); earlier versions used the MCP-specific -32002.
Whether elicitation (client feature) is available at this version.
Whether notifications/progress may carry the optional message field. The 2024-11-05 ProgressNotification params are {progressToken, progress, total?} with NO message; message was introduced in 2025-03-26 and is retained in every later version. Emitting it to a 2024-11-05 peer would inject an out-of-schema key, so the server gates it on this predicate.
Convert a version to its on-the-wire date string.
Parse a wire string; returns false (without throwing) if unknown.
The newest stable (legacy) version this SDK speaks. Versions before modern (2026-07-28) are "legacy"; modern and later are "modern".
All versions this SDK can speak, oldest to newest (modern last).