Discover and explore top open-source AI tools and projects—updated daily.
modelcontextprotocolSwift SDK for Model Context Protocol (MCP) servers and clients
Top 35.0% on SourcePulse
This Swift SDK provides a robust implementation of the Model Context Protocol (MCP) for building AI-powered applications. It enables seamless communication between MCP clients and servers, allowing developers to integrate AI models, manage resources, and handle prompts and tools within their Swift applications.
How It Works
The SDK leverages a transport layer abstraction to facilitate communication. It offers built-in transports like StdioTransport for standard input/output, HTTPClientTransport for streaming HTTP communication via Server-Sent Events, and NetworkTransport for custom TCP/UDP communication using Apple's Networking framework. This modular design allows for platform-specific optimizations and custom transport implementations.
Quick Start & Requirements
Package.swift dependencies: .package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.7.1")StdioTransport requires glibc on Linux.Highlighted Details
HTTPClientTransport.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
StdioTransport support for Alpine Linux and Windows is currently in progress. NetworkTransport is exclusively available on Apple platforms.
1 month ago
1 day
jlowin
modelcontextprotocol