You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d2da01e
Browse filesBrowse the repository at this point in the historyBrowse files
Align 2026-07-28 wire with spec PR #3002: serverInfo in result _meta, clientInfo optional
The final 2026-07-28 revision (spec PR #3002) moved serverInfo from the
DiscoverResult body to _meta['io.modelcontextprotocol/serverInfo'] and
demoted the request envelope's clientInfo from required to SHOULD. We
shipped the pre-#3002 shape in both directions: the client hard-rejected a
conforming server's discover response (misclassifying it as legacy and
attempting initialize), and the server rejected requests without clientInfo.
This models the final revision exactly — no pre-#3002 shape support in
either direction.
- Regenerate the 2026-07-28 anchor types, schema.json twin, and example
corpus at spec commit 71e30695.
- Wire schemas: envelope clientInfo optional (malformed still rejected);
DiscoverResult has no body serverInfo; result _meta typed as the anchor's
ResultMetaObject. A malformed _meta serverInfo is treated as absent on
receive — the spec marks the field self-reported, unverified, and
display-only, so a bad identity stamp never invalidates a result.
- Server: stamp _meta serverInfo on every 2026-era result at the encode
seam (handler-authored value wins; the 2025-era wire is untouched).
- Client: still sends clientInfo; reads identity from _meta only. An
identity-less server is anonymous: getServerVersion() is undefined and
the response cache partitions under a per-connection surrogate so
anonymous servers never share cache entries.
- Conformance: the pinned referee (0.2.0-alpha.9) still asserts the old
shape, so server-stateless is expected-failed on exactly three checks
until the pin bumps to a #3002-aware release.
- Tests: the exact go-sdk v1.7.0-pre.3 discover response now classifies
modern (was legacy); new e2e requirements for the identity stamp and
clientInfo optionality; a stale persisted blob with a body serverInfo
connects with anonymous identity.
Align the 2026-07-28 wire with the final revision (spec PR #3002): `serverInfo` moves from the `DiscoverResult` body to the result `_meta`, and the per-request envelope's `clientInfo` demotes from required to SHOULD.
9
+
10
+
Before this change the SDK shipped the pre-#3002 shape in both directions: the client hard-rejected a conforming server's `DiscoverResult` (missing body `serverInfo` failed parse, so the probe misclassified the server as legacy and attempted an `initialize` handshake against it — a hard connect failure against a modern-only server such as go-sdk v1.7.0-pre.3), and the server rejected conforming clients that omit `clientInfo`.
11
+
12
+
Now:
13
+
14
+
- The 2026 wire schemas are the final revision exactly: no body `serverInfo` on `DiscoverResult`, envelope `clientInfo` optional (a present-but-malformed value still fails validation).
15
+
- Servers stamp `_meta['io.modelcontextprotocol/serverInfo']` on every 2026-era response (spec SHOULD; a handler-authored value wins, the 2025-era wire is untouched). This includes the entry-built `subscriptions/listen` graceful-close results — the spec's `SubscriptionsListenResultMeta` extends `ResultMetaObject`.
16
+
- Clients keep sending `clientInfo` and read server identity from the discover result's `_meta` only. A server that stamps no identity is anonymous: `getServerVersion()` is `undefined` and the response cache partitions under a per-connection surrogate. A malformed `_meta` serverInfo value is treated as absent on receive (the spec marks the field self-reported, unverified, and display-only).
17
+
- Breaking type changes: `DiscoverResult` no longer declares `serverInfo`; `RequestMetaEnvelope`'s `clientInfo` is optional. New public constant `SERVER_INFO_META_KEY` (`'io.modelcontextprotocol/serverInfo'`).
0 commit comments