{"repo":"modelcontextprotocol/swift-sdk","free":true,"listed":false,"github":"https://github.com/modelcontextprotocol/swift-sdk","clone":"git clone https://github.com/modelcontextprotocol/swift-sdk.git","description":"The official Swift SDK for Model Context Protocol servers and clients.","language":"Swift","stars":1466,"topics":["mcp","swift"],"license":null,"category":"mcp-servers","readme_excerpt":"MCP Swift SDK Official Swift SDK for the [Model Context Protocol][mcp] (MCP). Overview The Model Context Protocol (MCP) defines a standardized way for applications to communicate with AI and ML models. This Swift SDK implements both client and server components according to the [2025-11-25][mcp-spec-2025-11-25] (latest) version of the MCP specification. Table of contents - Requirements - Installation - Client Usage - Basic Client Setup - Transport Options for Clients - Tools - Resources - Prompts - Completions - Sampling - Elicitation - Roots - Logging - Error Handling - Cancellation - Progress Tracking - Advanced Client Features - Server Usage - Basic Server Setup - Tools - Resources - Prompts - Completions - Sampling - Elicitations - Roots - Logging - Progress Tracking - Initialize Hook - HTTP Request Context in Handlers - Graceful Shutdown - Transports - Authentication - Client: Client Credentials Flow - Client: Authorization Code Flow - Client: Custom Token Provider - Client: Custom Token Storage - Client: private\\ key\\ jwt Authentication - Client: Endpoint Overrides - Server: Serving Protected Resource Metadata - Server: Validating Bearer Tokens - Platform Availability - Debugging and Logging - Additional Resources - Changelog - License Requirements - Swift 6.0+ (Xcode 16+) See the Platform Availability section below for platform-specific requirements. Installation Swift Package Manager Add the following to your Package.swift file: Then add the dependency to your target:","default_branch":null,"files":null,"tree":[],"storefront":"/r/modelcontextprotocol","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/modelcontextprotocol/swift-sdk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}