Highlights
JSONFoundation's JSON-RPC runtime, end to end — and swift-nio is now optional on the server. 1.9.0 moves both the client and server transports onto the shared JSON-RPC runtime JSONFoundation ships (the same one LSP and SwiftACP build on), and lifts swift-nio out of the HTTP/SSE server's core so it is just one swappable adapter.
Client transports on the shared runtime (#150)
- The client's line-based transports (stdio spawn, in-process, direct TCP, Bonjour TCP) now run on a single
JSONRPCPeerover JSONFoundation'sJSONRPCMessageTransportseam, instead of hand-rolled per-transport request/response correlation and framing. - In-process
stdioHandlesuses JSONFoundation'sLoopbackTransport— no OS pipes; directhost:portTCP usesTCPClientTransport(POSIX sockets, so it now works on Linux with no Network framework). @Schemais consolidated onto JSONFoundation's macro (SwiftMCP's duplicateSchemaMacroremoved, −389 lines) — identical expansion,import SwiftMCPstill surfaces it.
HTTP/SSE server decoupled from swift-nio (#151)
- The streamable-HTTP / legacy-SSE server transport now sits behind a new
MCPHTTPEngineseam: the engine (routing, sessions, SSE) is NIO-free, and swift-nio lives in a singleNIOHTTPServerAdapter. A NIO-freeInMemoryHTTPServerAdapterdrives the same engine socket-free for hermetic tests. - The SSE stream registry (replay buffers, resume-after-disconnect, retention, priming anchors) is delegated to JSONFoundation's new
JSONRPCSSEServer.SSEStreamHub; JSON-RPC response correlation on both the serverSessionand the client proxy moves toJSONRPCPeer.RequestCorrelator.
Also
- Fixes a pre-existing
InMemoryTransportpre-connect race that could deadlock a waiting caller. - CI: skip macro validation in the iOS
xcodebuildjob.
Dependency: requires JSONFoundation 2.4.0 (ships JSONRPCSSEServer + RequestCorrelator). Deployment floor stays macOS 13 / iOS 15. The NIO-free core, Client, and OpenAPI configurations continue to build without swift-nio.
What's Changed
- Adopt JSONFoundation's JSON-RPC runtime for the client transports by @odrobnik in #150
- Decouple HTTP/SSE server from NIO; delegate SSE registry + correlation to JSONFoundation 2.4.0 by @odrobnik in #151
Full Changelog: v1.8.0...v1.9.0