ProtocolVersion : string
Registry of the MCP protocol revisions this SDK knows about.
Cases are declared oldest to newest, and that declaration order — not the lexicographic order of the values — is what every comparison here relies on: revision identifiers are an enumerated set, not an ordered scalar, and a future one is not guaranteed to be date-shaped.
The revisions split into two eras:
- handshake (
2025-11-25and earlier) negotiate a version through theinitializeround-trip and keep session state for the connection; - modern (self::FIRST_MODERN_VERSION and later) drop
initializeentirely — every request carries its own version in_meta, and servers advertise what they speak throughserver/discover.
Tags
Table of Contents
Cases
- V2024_11_05 = '2024-11-05'
- V2025_03_26 = '2025-03-26'
- V2025_06_18 = '2025-06-18'
- V2025_11_25 = '2025-11-25'
- V2026_07_28 = '2026-07-28'
Methods
- handshakeVersions() : array<int, self>
- Revisions reachable through the `initialize` handshake, oldest to newest.
- isAtLeast() : bool
- Whether this revision is at least as new as $minimum.
- isModern() : bool
- Whether this revision belongs to the modern, per-request-metadata era.
- latestHandshake() : self
- Newest revision reachable through the `initialize` handshake.
- modernVersions() : array<int, self>
- Revisions using the per-request metadata envelope, oldest to newest.
- requiresObjectStructuredContent() : bool
- Whether this revision restricts `structuredContent` to a JSON object.
- usesInvalidParamsForResourceNotFound() : bool
- Whether this revision answers a missing resource with `-32602`.
- position() : int
- Index of this revision in the chronological declaration order.
Cases
V2024_11_05
V2025_03_26
V2025_06_18
V2025_11_25
V2026_07_28
Methods
handshakeVersions()
Revisions reachable through the `initialize` handshake, oldest to newest.
public
static handshakeVersions() : array<int, self>
Return values
array<int, self>isAtLeast()
Whether this revision is at least as new as $minimum.
public
isAtLeast(self $minimum) : bool
Parameters
- $minimum : self
Return values
boolisModern()
Whether this revision belongs to the modern, per-request-metadata era.
public
isModern() : bool
Return values
boollatestHandshake()
Newest revision reachable through the `initialize` handshake.
public
static latestHandshake() : self
This is what a server counter-offers when it cannot honour the version a client asked for, and what a handshake-era client offers by default.
Return values
selfmodernVersions()
Revisions using the per-request metadata envelope, oldest to newest.
public
static modernVersions() : array<int, self>
Return values
array<int, self>requiresObjectStructuredContent()
Whether this revision restricts `structuredContent` to a JSON object.
public
requiresObjectStructuredContent() : bool
SEP-2106, part of self::V2026_07_28, widened outputSchema to any
JSON Schema 2020-12 and structuredContent to any JSON value conforming to
it. Up to 2025-11-25 both are restricted to an object.
Tags
Return values
boolusesInvalidParamsForResourceNotFound()
Whether this revision answers a missing resource with `-32602`.
public
usesInvalidParamsForResourceNotFound() : bool
SEP-2164, part of self::V2026_07_28, retired the bespoke -32002
in favour of the JSON-RPC code that already meant this, and reserved
-32002 so it is never reused. Earlier revisions still expect it, and
clients are told to keep accepting it from them.
Tags
Return values
boolposition()
Index of this revision in the chronological declaration order.
private
position() : int