swift-sdk
Official Swift SDK for Model Context Protocol, supporting both client and server components.
- Type
- MCP
- Open source
- Yes
- GitHub Stars
- ★ 1.4k
- Source
- mcp-github
Overview
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 of the MCP specification. With this SDK, developers can easily integrate MCP into their Swift applications, enabling connection and interaction with MCP servers. Ideal for developers looking to incorporate AI capabilities into their Swift apps.
Capabilities
- ▪Client and server components
- ▪Multiple transport options (e.g., stdio, HTTP)
- ▪Tool invocation
- ▪Resource access and subscription
- ▪Logging and error handling
Use cases
Setup
Add the dependency via Swift Package Manager: ".package(url: \"https://github.com/modelcontextprotocol/swift-sdk.git\", from: \"0.11.0\")" and add the dependency to your target: ".product(name: \"MCP\", package: \"swift-sdk\")"
This information was compiled by AI from public sources and may contain inaccuracies — please refer to the source.
FAQ
How do I initialize the client?
Initialize the client using `Client(name: "MyApp", version: "1.0.0")`.
What transport methods are supported?
Supports stdio, HTTP, and other transport methods.
Related skills
gemini-cli
Gemini CLI is an open-source AI agent that brings Gemini's powerful capabilities directly into the terminal.
private-gpt
Provides a complete API layer for local models, supporting RAG, skills, tools, and more.
planning-with-files
File-based persistent planning skill, ideal for AI coding agents and long-running tasks.
scientific-agent-skills
Transform any AI agent into a scientific assistant with 147 ready-to-use research skills.
susi_alexa_skill
A skill that enables question-and-answer interactions between Alexa and Susi AI.
claude-context
Provides code search capabilities for Claude Code, turning the entire codebase into context.