Validate the protocol version the server returned in its initialize
response and return the version to operate under. Per the Lifecycle /
Version Negotiation requirement ("If the client does not support the version
in the server's response, it SHOULD disconnect"), throws an
UnsupportedProtocolVersionErrorMcpException when the server's version is
unparseable, not in supportedVersions, or is the modern revision
(>= 2026-07-28). Conformant modern servers use server/discover rather than
initialize, so a modern version in an initialize response is invalid; the
client rejects it to avoid operating with useModern unset.
Validate the protocol version the server returned in its initialize response and return the version to operate under. Per the Lifecycle / Version Negotiation requirement ("If the client does not support the version in the server's response, it SHOULD disconnect"), throws an UnsupportedProtocolVersionError McpException when the server's version is unparseable, not in supportedVersions, or is the modern revision (>= 2026-07-28). Conformant modern servers use server/discover rather than initialize, so a modern version in an initialize response is invalid; the client rejects it to avoid operating with useModern unset.