Serverdex · build · Swift
Build an MCP server in Swift
1. Install the Swift SDK
package: swift-sdk (SwiftPM, product "MCP").package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.12.0")The official SDK repository: modelcontextprotocol/swift-sdk.
2. The shape of a minimal server
start from this APIimport MCP
let server = Server(name: "MyModelServer", version: "1.0.0")
let transport = StdioTransport()
try await server.start(transport: transport)This is the starting API, not a full program — the complete, always-current walkthrough is the official quickstart. Define your tools, then connect a transport (stdio for local, HTTP for remote). Read on 1 December 2026; confirm the current version in the quickstart.
3. Real Swift MCP servers to learn from
most-starred in our index · open source
AESP32 Agent
onehumanbeingProduction-ready
Lets your AI see and control a real iPhone through an ESP32 board over Bluetooth.
Registry5.2k 9d agoMIT
AShipSwift
signerlabsProduction-ready
40+ production-ready SwiftUI recipes for building full-stack iOS apps via MCP.
Live868 tokRegistry3.3k 6 19d agoMIT
ABlitz
blitzdotdevProduction-ready
Give AI agents full control over iOS/macOS development via a native macOS app with 30+ MCP tools.
Registry1.8k 4mo agoApache-2.0
ANTSCRT
finnmckentyProduction-ready
VHS, CRT and analog TV looks for images and video: preview, animate and render them.
Registry832 7d agoMIT
APrefire
BarredEweProduction-ready
Render SwiftUI #Preview as PNG images, so an AI agent sees the views it changes
Registry535 9d agoApache-2.0
AMirroir MCP
jfarcandProduction-ready
Drive a stock iPhone via iPhone Mirroring: no Developer Mode, Xcode or WDA. LLM-free skill replay.
Registry420 6d agoApache-2.0
See all Swift MCP servers, or the best-maintained across every language.
4. Connect it, then get it found
Point a client at your server to try it — the client matrix shows which clients support what. When it works, list it on Serverdex: a free listing is a server page with a link back to us, in front of developers choosing MCP servers. Want it live now without the link? Priority Review ($9, one-time) does that.
Questions people ask
- What's the official way to build an MCP server in Swift?
- Use the official Swift SDK, swift-sdk (SwiftPM, product "MCP"). Install it (.package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.12.0")), construct a server, register your tools, and connect a transport. The full, always-current walkthrough is the official quickstart; the snippet here shows the shape. Read from the SDK's repository on 1 December 2026.
- Is the Swift SDK production-ready?
- Tier 3 — experimental, partial or specialised; fine to build on, with sharper edges. Tier 3 SDK — it implements the 2025-11-25 spec, one revision behind the current 2026-07-28.
- How do I test and connect my Swift server?
- Run it over stdio and point a client at it. Serverdex's client matrix shows which clients support what; most developers start with Claude Desktop or an IDE client. Once it answers, list it on Serverdex so others find it.