Skip to content

feat: dual-era MCP 2026-07-28 modern protocol profile - #314

Open
romanbsd wants to merge 1 commit into
modelcontextprotocol:mainfrom
romanbsd:feature/mcp-2026-07-28
Open

romanbsd wants to merge 1 commit into
modelcontextprotocol:mainfrom
romanbsd:feature/mcp-2026-07-28

Conversation

@romanbsd

@romanbsd romanbsd commented Oct 25, 2026 •

Copy link
Copy Markdown

Summary

  • Add dual-era support for MCP 2026-07-28 alongside the legacy initialize path (≤2025-11-25): server/discover, per-request _meta (protocol version / client capabilities), modern resultType, and -32022 unsupported-version errors.
  • Implement modern subscriptions/listen over stateful HTTP SSE (filtered fan-out, no legacy GET mix on modern sessions), with cancel closing the parked stream on both client and server so listen refresh does not leak connections or duplicate notifications.
  • Extend client/server HTTP transports and conformance harness; cover discover, version negotiation, listen filter/cancel, and complete-listen in ModernProtocolTests.

Test plan

  • swift test --filter ModernProtocolTests
  • swift test (full package)
  • Manual: modern client discover → subscriptions/listen → resource subscribe refresh cancels prior listen without duplicate onNotification
  • Manual: legacy initialize session still works; modern session rejects legacy GET notification stream
  • Confirm HTTP 400 body for unsupported modern version includes JSON-RPC -32022 with data.requested / data.supported

@romanbsd
romanbsd requested a review from a team as a code owner October 25, 2026 21:04
@romanbsd
romanbsd force-pushed the feature/mcp-2026-07-28 branch from 2a40990 to 0ffb9e5 Compare October 25, 2026 21:05
Add Discover/listen/per-request `_meta` alongside the legacy initialize
era, and close parked listen SSE on cancel so refresh cannot fan-out
duplicates or leak HTTP connections.
@romanbsd
romanbsd force-pushed the feature/mcp-2026-07-28 branch from 0ffb9e5 to 3454dd3 Compare October 29, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant