Skip to content

Support server experimental and extension capabilities - #289

Open
EhsanAzish80 wants to merge 1 commit into
modelcontextprotocol:mainfrom
EhsanAzish80:feat/server-capability-extensions
Open

EhsanAzish80 wants to merge 1 commit into
modelcontextprotocol:mainfrom
EhsanAzish80:feat/server-capability-extensions

Conversation

@EhsanAzish80

Copy link
Copy Markdown

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.Capabilities and keeps the existing initializer calls working.

The test checks the JSON sent in an initialize result and its decode round trip. swift test passed: 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.

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.
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