Skip to content

Commit 046fa3e

Browse files
authored
Update README with information about transports and platform availability (#76)
* Update README with information about transports and platform availability * Add footnote about WIP Alpine Linux and Windows support * Move discussion of platform availability to separate section * Add link from requirements to platform availability section
1 parent d583151 commit 046fa3e

File tree

1 file changed

+41
-23
lines changed

1 file changed

+41
-23
lines changed

README.md

+41-23
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,8 @@ Swift implementation of the [Model Context Protocol][mcp] (MCP).
66

77
- Swift 6.0+ (Xcode 16+)
88

9-
## Platform Support
10-
11-
| Platform | Minimum Version |
12-
|----------|----------------|
13-
| macOS | 13.0+ |
14-
| iOS / Mac Catalyst | 16.0+ |
15-
| watchOS | 9.0+ |
16-
| tvOS | 16.0+ |
17-
| visionOS | 1.0+ |
18-
| Linux ||
19-
| Windows ||
20-
21-
> [!IMPORTANT]
22-
> MCP's transport layer handles communication between clients and servers.
23-
> The Swift SDK supports multiple transport mechanisms,
24-
> with different platform availability:
25-
>
26-
> * `StdioTransport` is available on Apple platforms
27-
> and Linux distributions with glibc, such as
28-
> Ubuntu, Debian, Fedora, CentOS, or RHEL.
29-
>
30-
> * `NetworkTransport` is available only on Apple platforms.
9+
See the [Platform Availability](#platform-availability) section below
10+
for more information about platform requirements.
3111

3212
## Installation
3313

@@ -154,6 +134,44 @@ let (description, messages) = try await client.getPrompt(
154134
)
155135
```
156136

137+
## Platform Availability
138+
139+
The Swift SDK has the following Apple platform requirements:
140+
141+
| Platform | Minimum Version |
142+
|----------|----------------|
143+
| macOS | 13.0+ |
144+
| iOS / Mac Catalyst | 16.0+ |
145+
| watchOS | 9.0+ |
146+
| tvOS | 16.0+ |
147+
| visionOS | 1.0+ |
148+
149+
While the core library works on any platform supporting Swift 6
150+
(including Linux and Windows),
151+
running a client or server requires a compatible transport.
152+
153+
MCP's transport layer handles communication between clients and servers.
154+
The Swift SDK provides multiple built-in transports:
155+
156+
- [`StdioTransport`](/Sources/MCP/Base/Transports/StdioTransport.swift):
157+
Implements [stdio](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio) transport.
158+
Available on Apple platforms
159+
and Linux distributions with glibc (Ubuntu, Debian, Fedora, CentOS, RHEL).
160+
- [`HTTPClientTransport`](/Sources/MCP/Base/Transports/HTTPClientTransport.swift):
161+
Implements [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http)
162+
using Foundation [URL Loading System](https://developer.apple.com/documentation/foundation/url-loading-system)
163+
- [`NetworkTransport`](/Sources/MCP/Base/Transports/NetworkTransport.swift):
164+
Implements custom transport over TCP and UDP
165+
using Apple's [Networking framework](https://developer.apple.com/documentation/network).
166+
Available exclusively on Apple platforms.
167+
168+
You can implement a custom transport for platforms without built-in support. [^1]
169+
170+
For custom transport implementation details,
171+
see the [`Transport` protocol](/Sources/MCP/Base/Transport.swift).
172+
173+
[^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!
174+
157175
## Changelog
158176

159177
This project follows [Semantic Versioning](https://semver.org/).
@@ -166,4 +184,4 @@ see the [GitHub Releases page](https://github.com/modelcontextprotocol/swift-sdk
166184

167185
This project is licensed under the MIT License.
168186

169-
[mcp]: https://modelcontextprotocol.io
187+
[mcp]: https://modelcontextprotocol.io

0 commit comments

Comments
 (0)