Repository navigation
Support server experimental and extension capabilities - #289
Open
EhsanAzish80 wants to merge 1 commit into
Open
EhsanAzish80 wants to merge 1 commit into
EhsanAzish80 wants to merge 1 commit into
Conversation
myyra
added a commit
to myyra/mcp-swift-sdk
that referenced
this pull request
Sep 30, 2026
Clients may advertise experimental capabilities as JSON objects rather than strings. Decode those values using Value so initialization accepts clients such as Codex without rejecting their capability payloads. Expose optional experimental and extensions dictionaries on server capabilities as well, following upstream PR modelcontextprotocol#289. Existing server initializer calls retain their defaults, and nested capability values survive Codable encoding and decoding.
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.
Swift servers currently cannot advertise object-valued experimental capabilities from the 2025-11-25 schema or extension settings added in 2026-07-28. This adds both optional fields to
Server.Capabilitiesand keeps the existing initializer calls working.The test checks the JSON sent in an initialize result and its decode round trip.
swift testpassed: 552 tests across 40 suites.This is a small piece of the protocol update tracked in #234. The stateless request lifecycle is separate work.
AI assistance helped prepare the implementation and test.