Releases: modelcontextprotocol/swift-sdk
Releases · modelcontextprotocol/swift-sdk
0.9.0
What's Changed
- Improve NetworkTransport and add test coverage by @mattt in #108
- Prevent double continuation resumption in client by @mattt in #113
- Add test coverage for base64 data helper methods by @mattt in #114
- Add support for sampling by @mattt in #119
- Improve ergonomics of prompt and sampling message initialization by @mattt in #120
- Update
Client.connect(transport:)
to automatically sendinitialize
request by @mattt in #100
Full Changelog: 0.8.2...0.9.0
0.8.2
0.8.1
0.8.0
What's Changed
- Update
Client.listTools
return type to include next cursor by @mattt in #54 - Add support for Linux with glibc by @mattt in #61
- Conditionalize availability of
StdioTransport
by @mattt in #65 - Fix
testServerHandleInitialize
flake by @mattt in #68 - Add support for JSON-RPC batching by @mattt in #67
- Add support for audio content in prompts and tool results by @mattt in #73
- Add support for tool annotations by @mattt in #47
- Add streamable HTTP transport for clients by @mattt in #70
- Update README with information about transports and platform availability by @mattt in #76
- Simplify
receive()
implementation for transports by @mattt in #78 - Send initialized notification from client instead of server by @mattt in #85
- Update AnyNotification to include notification params by @stallent in #86
- Fix event stream line parsing to handle CRLF and empty lines correctly by @aspitz in #89
- support 405 response from servers that don’t support streaming by @stallent in #90
- Document
Client
usage withHTTPClientTransport
by @mattt in #77 - Resume
NetworkTransfer
withEOF
instead of throwing error when no data is received by @mattt in #94 - Use
EventSource
for SSE implementation by @stallent and @mattt in #96 - Delay SSE GET connection until after session ID is established by @mattt in #97
- Improve documentation comments for transport types by @mattt in #98
- Expand README with more information about client and server usage by @mattt in #99
- Set latest version to 2025-03-26 by @mattt in #80
New Contributors
Full Changelog: 0.7.1...0.8.0
0.7.1
0.7.0
Breaking Changes
Important
This release contains breaking API changes.
If you've implemented custom transports or directly referenced MCP error types, you'll need to update your code.
Error
renamed to MCPError
Renamed the Error
type to MCPError
to avoid namespace collision with Swift's standard Error
protocol. The MCPError
type now properly conforms to Swift.Error
.
// Old code
catch let error as MCP.Error {
// Handle MCP error
}
// New code
catch let error as MCPError {
// Handle MCP error
}
Transport protocol updated to use Data
instead of String
The Transport
protocol methods now work with Data
instead of String
to avoid unnecessary memory copies:
// Old protocol signature
func send(_ message: String) async throws
func receive() async throws -> String
// New protocol signature
func send(_ data: Data) async throws
func receive() async throws -> Data
This change should not affect most users who rely on the standard StdioTransport
, but will require updates if you've implemented a custom transport.
What's Changed
- Update README to reflect MIT License by @mattt in #41
- Add configurable strict mode for MCP client initialization by @mattt in #43
- Update transports to send and receive data instead of strings by @mattt in #42
- Rename
Error
toMCPError
by @mattt in #44 - Add Changelog section to README by @mattt in #45
Full Changelog: 0.6.0...0.7.0
0.6.0
What's Changed
- Set permissions for CI workflow by @mattt in #29
- Transfer project to @modelcontextprotocol by @mattt in #28
- Add waitUntilComplete() method to Server by @adamwulf in #26
- Import
System
package when available by @mattt in #34 - Fix/decode tool call by @adamwulf in #36
- Update platform requirements by @mattt in #30
Full Changelog: 0.5.1...0.6.0