ClaudeMap

MCP Swift SDK

Official Swift SDK for building MCP servers and clients on Apple platforms.

SDKs & Toolingofficialswiftmcpapple

Official Swift implementation of the Model Context Protocol, maintained by the MCP project. Builds and runs on iOS, macOS, watchOS, and tvOS. The standard path for embedding MCP in native Apple apps.

What it does

  • Official Swift SDK implementing both MCP client and server per the 2025-11-25 (latest) version of the MCP specification
  • Built-in StdioTransport and HTTPClientTransport (Streamable HTTP) cover the local-subprocess and HTTP deployment paths
  • Both sides cover tools, resources, prompts, completions, sampling, elicitation, roots, logging and progress tracking
  • Client OAuth spans Client Credentials and Authorization Code flows, private_key_jwt, custom token providers and custom token storage

When to use it

The natural choice when your app already lives in the Apple ecosystem — Swift 6.0+ (Xcode 16+) with macOS 13+ and iOS 16+ platform floors.

Getting started

// Package.swift dependencies:
.package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.11.0")
// then add .product(name: "MCP", package: "swift-sdk") to your target

Things to know

Swift 6.0+ / Xcode 16+ is the floor; platform minimums include macOS 13+, iOS 16+, watchOS 9+ and tvOS 16+, and StdioTransport on Linux requires glibc.

Repository

modelcontextprotocol/swift-sdk

Charted

Related on the map

  • Harness Bridge

    SDK / Tool

    A local launcher that points Claude Code and seven other coding harnesses at any OpenAI-, Anthropic- or Responses-compatible endpoint — without editing a single config file.

    • launcher
    • local-models
    • cli
    • menu-bar
  • Claude for Siri

    SDK / Tool

    Answers macOS Spotlight and Siri prompts with your signed-in Claude Code account — an experimental macOS 27 model-delegation provider.

    • macos
    • siri
    • spotlight
    • model-delegation
  • Extract your own local chat history from ten AI coding assistants into one normalized JSONL — for fine-tuning, analytics, or backing up years of conversations. Standard library only.

    • cli
    • data-export
    • jsonl
    • backup