Skip to content

Releases: modelcontextprotocol/swift-sdk

0.9.0

26 May 13:07
9742933
Compare
Choose a tag to compare

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 send initialize request by @mattt in #100

Full Changelog: 0.8.2...0.9.0

0.8.2

07 May 13:00
266c02d
Compare
Choose a tag to compare

What's Changed

  • Implement client protocol version negotiation in server initialization by @mattt in #107

Full Changelog: 0.8.1...0.8.2

0.8.1

07 May 10:27
3690509
Compare
Choose a tag to compare

What's Changed

  • Don't throw error if there's a protocol mismatch between client and server by @mattt in #103

Full Changelog: 0.8.0...0.8.1

0.8.0

06 May 16:38
305cf7e
Compare
Choose a tag to compare

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 with HTTPClientTransport by @mattt in #77
  • Resume NetworkTransfer with EOF 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

04 Apr 19:12
cfcead8
Compare
Choose a tag to compare

What's Changed

  • Remove top-level MCP enumeration by @mattt in #53

Full Changelog: 0.7.0...0.7.1

0.7.0

03 Apr 12:33
402904e
Compare
Choose a tag to compare

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 to MCPError by @mattt in #44
  • Add Changelog section to README by @mattt in #45

Full Changelog: 0.6.0...0.7.0

0.6.0

31 Mar 17:25
3372a14
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.5.1...0.6.0

0.5.1

19 Mar 12:42
ef64710
Compare
Choose a tag to compare

What's Changed

  • Add unit test to check that AnyRequest handles missing parameters by @adamwulf in #24

New Contributors

Full Changelog: 0.5.0...0.5.1

0.5.0

18 Mar 17:02
36a55a5
Compare
Choose a tag to compare

What's Changed

  • Configure JSON encoding format options by @mattt in #21
  • Add server initialization hook by @mattt in #19
  • Ensure Request decoder handles missing/null params correctly by @mattt in #22

Full Changelog: 0.4.2...0.5.0

0.4.2

17 Mar 12:43
c672358
Compare
Choose a tag to compare

What's Changed

  • Revert "Update capabilities to be expressible by Boolean literals" by @mattt in #18

Full Changelog: 0.4.1...0.4.2