From 310da4ef325d85afeb78e163193c4a8e5ca6112a Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Tue, 15 Apr 2025 09:44:25 -0700 Subject: [PATCH 1/4] Update README with information about transports and platform availability --- README.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a274e965..0bf6afe2 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ Swift implementation of the [Model Context Protocol][mcp] (MCP). - Swift 6.0+ (Xcode 16+) -## Platform Support - | Platform | Minimum Version | |----------|----------------| | macOS | 13.0+ | @@ -15,19 +13,31 @@ Swift implementation of the [Model Context Protocol][mcp] (MCP). | watchOS | 9.0+ | | tvOS | 16.0+ | | visionOS | 1.0+ | -| Linux | ✓ | -| Windows | ✓ | - -> [!IMPORTANT] -> MCP's transport layer handles communication between clients and servers. -> The Swift SDK supports multiple transport mechanisms, -> with different platform availability: -> -> * `StdioTransport` is available on Apple platforms -> and Linux distributions with glibc, such as -> Ubuntu, Debian, Fedora, CentOS, or RHEL. -> -> * `NetworkTransport` is available only on Apple platforms. + +### Transports and Platform Availability + +MCP's transport layer handles communication between clients and servers. +The Swift SDK provides multiple built-in transports: + +- [`StdioTransport`](/Sources/MCP/Base/Transports/StdioTransport.swift): + Implements [stdio](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio) transport. + Available on Apple platforms + and Linux distributions with glibc (Ubuntu, Debian, Fedora, CentOS, RHEL). +- [`HTTPClientTransport`](/Sources/MCP/Base/Transports/HTTPClientTransport.swift): + Implements [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) + using Foundation [URL Loading System](https://developer.apple.com/documentation/foundation/url-loading-system) +- [`NetworkTransport`](/Sources/MCP/Base/Transports/NetworkTransport.swift): + Implements custom transport over TCP and UDP + using Apple's [Networking framework](https://developer.apple.com/documentation/network). + Available exclusively on Apple platforms. + +While the core library works on any platform supporting Swift 6 +(including Linux and Windows), +running a client or server requires a compatible transport. +You can implement a custom transport for platforms without built-in support. + +For custom transport implementation details, +see the [`Transport` protocol](/Sources/MCP/Base/Transport.swift). ## Installation From 0d7aefd2281a7a190666a3127c768e1be18a5640 Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Tue, 15 Apr 2025 09:49:34 -0700 Subject: [PATCH 2/4] Add footnote about WIP Alpine Linux and Windows support --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bf6afe2..bdaee7bb 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The Swift SDK provides multiple built-in transports: While the core library works on any platform supporting Swift 6 (including Linux and Windows), running a client or server requires a compatible transport. -You can implement a custom transport for platforms without built-in support. +You can implement a custom transport for platforms without built-in support. [^1] For custom transport implementation details, see the [`Transport` protocol](/Sources/MCP/Base/Transport.swift). @@ -177,3 +177,5 @@ see the [GitHub Releases page](https://github.com/modelcontextprotocol/swift-sdk This project is licensed under the MIT License. [mcp]: https://modelcontextprotocol.io + +[^1]: We're working to add stdio transport support for [Alpine Linux](https://github.com/modelcontextprotocol/swift-sdk/pull/64) and [Windows](https://github.com/modelcontextprotocol/swift-sdk/pull/64). If you're interested in either of those platforms, please take a look at their respective PRs and leave a comment! \ No newline at end of file From b0b9b3a96720256ca79f20c9ad6b7db935472601 Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Tue, 15 Apr 2025 09:56:02 -0700 Subject: [PATCH 3/4] Move discussion of platform availability to separate section --- README.md | 75 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index bdaee7bb..a309ef83 100644 --- a/README.md +++ b/README.md @@ -6,39 +6,6 @@ Swift implementation of the [Model Context Protocol][mcp] (MCP). - Swift 6.0+ (Xcode 16+) -| Platform | Minimum Version | -|----------|----------------| -| macOS | 13.0+ | -| iOS / Mac Catalyst | 16.0+ | -| watchOS | 9.0+ | -| tvOS | 16.0+ | -| visionOS | 1.0+ | - -### Transports and Platform Availability - -MCP's transport layer handles communication between clients and servers. -The Swift SDK provides multiple built-in transports: - -- [`StdioTransport`](/Sources/MCP/Base/Transports/StdioTransport.swift): - Implements [stdio](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio) transport. - Available on Apple platforms - and Linux distributions with glibc (Ubuntu, Debian, Fedora, CentOS, RHEL). -- [`HTTPClientTransport`](/Sources/MCP/Base/Transports/HTTPClientTransport.swift): - Implements [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) - using Foundation [URL Loading System](https://developer.apple.com/documentation/foundation/url-loading-system) -- [`NetworkTransport`](/Sources/MCP/Base/Transports/NetworkTransport.swift): - Implements custom transport over TCP and UDP - using Apple's [Networking framework](https://developer.apple.com/documentation/network). - Available exclusively on Apple platforms. - -While the core library works on any platform supporting Swift 6 -(including Linux and Windows), -running a client or server requires a compatible transport. -You can implement a custom transport for platforms without built-in support. [^1] - -For custom transport implementation details, -see the [`Transport` protocol](/Sources/MCP/Base/Transport.swift). - ## Installation ### Swift Package Manager @@ -164,6 +131,44 @@ let (description, messages) = try await client.getPrompt( ) ``` +## Platform Availability + +The Swift SDK has the following Apple platform requirements: + +| Platform | Minimum Version | +|----------|----------------| +| macOS | 13.0+ | +| iOS / Mac Catalyst | 16.0+ | +| watchOS | 9.0+ | +| tvOS | 16.0+ | +| visionOS | 1.0+ | + +While the core library works on any platform supporting Swift 6 +(including Linux and Windows), +running a client or server requires a compatible transport. + +MCP's transport layer handles communication between clients and servers. +The Swift SDK provides multiple built-in transports: + +- [`StdioTransport`](/Sources/MCP/Base/Transports/StdioTransport.swift): + Implements [stdio](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio) transport. + Available on Apple platforms + and Linux distributions with glibc (Ubuntu, Debian, Fedora, CentOS, RHEL). +- [`HTTPClientTransport`](/Sources/MCP/Base/Transports/HTTPClientTransport.swift): + Implements [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) + using Foundation [URL Loading System](https://developer.apple.com/documentation/foundation/url-loading-system) +- [`NetworkTransport`](/Sources/MCP/Base/Transports/NetworkTransport.swift): + Implements custom transport over TCP and UDP + using Apple's [Networking framework](https://developer.apple.com/documentation/network). + Available exclusively on Apple platforms. + +You can implement a custom transport for platforms without built-in support. [^1] + +For custom transport implementation details, +see the [`Transport` protocol](/Sources/MCP/Base/Transport.swift). + +[^1]: We're working to add stdio transport support for [Alpine Linux](https://github.com/modelcontextprotocol/swift-sdk/pull/64) and [Windows](https://github.com/modelcontextprotocol/swift-sdk/pull/64). If you're interested in either of those platforms, please take a look at their respective PRs and leave a comment! + ## Changelog This project follows [Semantic Versioning](https://semver.org/). @@ -176,6 +181,4 @@ see the [GitHub Releases page](https://github.com/modelcontextprotocol/swift-sdk This project is licensed under the MIT License. -[mcp]: https://modelcontextprotocol.io - -[^1]: We're working to add stdio transport support for [Alpine Linux](https://github.com/modelcontextprotocol/swift-sdk/pull/64) and [Windows](https://github.com/modelcontextprotocol/swift-sdk/pull/64). If you're interested in either of those platforms, please take a look at their respective PRs and leave a comment! \ No newline at end of file +[mcp]: https://modelcontextprotocol.io \ No newline at end of file From d0a80f6f3007cd68296ffee749ca1707e061525e Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Tue, 15 Apr 2025 09:58:33 -0700 Subject: [PATCH 4/4] Add link from requirements to platform availability section --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a309ef83..c5ae240e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,9 @@ Swift implementation of the [Model Context Protocol][mcp] (MCP). - Swift 6.0+ (Xcode 16+) +See the [Platform Availability](#platform-availability) section below +for more information about platform requirements. + ## Installation ### Swift Package Manager