swift-sdk

The official Swift SDK for Model Context Protocol servers and clients.

GitHub Stars

975

User Rating

Not Rated

Favorites

0

Views

26

Forks

118

Issues

34

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes

Installation

Installation

Prerequisites

Swift: 6.0 or higher
Xcode: 16 or higher

Installation Steps

1. Using Swift Package Manager

Add the following to your Package.swift file:
swift
dependencies: [
    .package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.9.0")
]
Then add the dependency to your target:
swift
.target(
    name: "YourTarget",
    dependencies: [
        .product(name: "MCP", package: "swift-sdk")
    ]
)

Troubleshooting

Issue: Dependencies are not installed correctly Solution: Check your Swift version and try reinstalling.

Additional Resources