feat(core,server,client): re-pin spec to f68d864a; wire SubscriptionsListenResult (#2953)#2371
Merged
Merged
Conversation
…ionsListenResult schema Regenerates spec.types.2026-07-28.ts, schema-twins, and the spec example corpus from upstream f68d864a (the only schema change since dc105208 is spec PR #2953 — SubscriptionsListenResult). - Neutral schemas + wire/rev2026-07-28: add SubscriptionsListenResultSchema and SubscriptionsListenResultMetaSchema; ServerResult union and the subscriptions/listen ResultTypeMap entry gain the new type. - Parity test: type count 151→153, parity rows for the two new types, ServerResult union extended. - Corpus: manifest pins 86/127→87/128; SubscriptionsListenResult example vendored. - Regenerated: codemod specSchemaMap. The graceful-close behaviour itself (server emits the result on close; client surfaces it as 'graceful') lands in the next commit.
…; surface on McpSubscription.closed Per spec PR #2953, server-side graceful close of a subscriptions/listen stream now emits the empty subscriptions/listen JSON-RPC result (the new SubscriptionsListenResult — _meta carries the subscriptionId stamp) before closing the stream, on both the HTTP entry (createMcpHandler) and stdio entry (serveStdio). This replaces the previous server-originated notifications/cancelled on stdio teardown. On the client, McpSubscription.closed gains a 'graceful' resolution for this signal (alongside 'local' and 'remote'): receipt of any JSON-RPC result for the listen id resolves 'graceful'; a stream close without a result remains 'remote' (unexpected disconnect — re-listen candidate). Receipt of the result before the ack rejects listen() with ConnectionClosed (a server that answers before serving is shutting down). Adds the e2e subscriptions:listen:graceful-close requirement and a matching graceful-close paragraph to docs/migration/support-2026-07-28.md.
🦋 Changeset detectedLatest commit: 7d20173 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-pin the spec checkout to
f68d864a(upstream main 2026-06-25) and wireSubscriptionsListenResult(#2953) — closing the Q8 spec-watch.Motivation and Context
Spec PR #2953 gives
subscriptions/listena typed result: the server SHOULD send an emptySubscriptionsListenResult(carrying_meta.subscriptionId) on graceful teardown, then close the stream. Stream-close-without-result remains the unexpected-disconnect path. This was the standing Q8 spec-watch item.How Has This Been Tested?
core 1288/1288 (parity green: 153 types, corpus 87/128), server 350, client 696, all middleware/legacy/integration suites, e2e 2629 + 155 xfail, all 6 conformance legs pass baseline.
Breaking Changes
McpSubscription.closedgains a'graceful'value (additive on a public union — changeset + migration entry included).Types of changes
Checklist
Additional context
Of the 11 spec commits in range, only #2953 is a schema change (#2954 keep-alive and #2955 discover wording are prose-only; the rest are docs/housekeeping). G-1 audit at
logs/agent-reports/65-spec-repin-audit.md.Intentionally NOT in this PR: dropping
elicitationId/ElicitationCompleteNotification*from the neutralschemas.ts. The 2026-era is already anchor-exact via thewire/rev2026-07-28fork; removing from neutral schemas breaks the deprecated-but-functional 2025-eraServer.elicitInputURL-mode surface. That's a deprecate→remove migration, not a re-pin chore.