-
Notifications
You must be signed in to change notification settings - Fork 152
Add functionality for MCP versions 2025-06-18 and 2025-11-25 #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Finally! Thanks for keeping the Swift community up to date with the rest of the SDK. |
|
Note that about 2/3 of the total line count of this PR is tests. I've had some discussions with people on the MCP Contributors Discord about the sheer size of this PR, and I understand the challenge of reviewing it in one go. If we decide to move ahead with it, I think we can split this up and do a phased review and release.
I'd also like to encourage people to do the following:
I'd love to hear your feedback. |
|
Since I mentioned issues in the existing codebase that I fixed over the course of my work on this PR, I've compiled lists of bug fixes, code quality improvements, and spec compliance fixes that I made, separate from new functionality that was added. |
|
Thank you for taking the time to do this! This is really helpful explaining your rational. Haven't skimmed the bug fixes but did skim the "code quality improvements" doc. Many of them are great and solid improvements, but several are not necessarily obvious wins and will need some discussion. We can discuss them individually when the time comes but we might want to break them out into their own PR's eventually so the ones that are obvious improvements can be accepted quickly and the others can get either tweaked or removed. Great stuff! I appreciate you continuing to improve your PR |
|
@stallent, I don't want to get bogged down in arguments over coding style. On most issues like this I'm willing to defer to the judgement of the best AI systems presented with the relevant information. I'll continue development in DePasqualeOrg/mcp-swift-sdk. If anyone wants to help with review and testing, your feedback is very welcome. |
I've implemented almost all the missing functionality in the Swift SDK, bringing it up to date with the latest protocol version. I also fixed several bugs that were noted in issues and PRs and many others that I found, and added tests for existing and new functionality. In some ways, the Swift SDK is now even more spec-compliant than the TypeScript and Python SDKs.
Over the course of five days, I used Opus 4.5 in Claude Code in a highly structured way to plan, generate, and verify the new functionality and tests based on the MCP spec and the TypeScript and Python SDKs. This included many rounds of verifications and corrections for each component.
I've found that this can work well with porting projects like this, where we have a clear spec and several mature SDKs in other languages, but review and real-world testing are still needed. I'm happy to keep improving anything that still needs work.
New in this PR
HTTP server support
HTTPServerTransport: Streamable HTTP (2025-03-26+)SessionManager: Manages multiple client sessionsInMemoryEventStore: Event storage for session resumabilityProtocol 2025-06-18 features
structuredContentandoutputSchemaon toolsResourceLinkcontent type in tool resultstitleon Tools, Prompts, Resources, ResourceTemplatesProtocol 2025-11-25 features
iconsmetadata on tools, resources, prompts, templates, implementationstoolsandtoolChoiceparameters in sampling requeststaskSupportfield for controlling task behaviorCore features (previously missing)
PRs superseded by this PR
Issues resolved by this PR
#165: HTTP transport for servers
#142: Elicitation support
#139:
ResourceLinkinCallToolResult#137:
NetworkTransportcrash on reconnect#134: Update to latest spec version
#117:
Tool.outputSchemaandCallToolResult.structuredContent#110: Streamable server support
#83: Completions support
#82: Progress tracking support
Remaining work for this PR
.git-blame-ignore-revswith formatting commit hashFuture work