1,311 lines.
Zero SPM dependencies.
zeromcp vs swift-sdk — side by side.
This is a hello world
Server instantiation, schema dictionaries, tool registration, and transport setup. 10 lines before your tool does anything.
let server = MCPServer(
name: "test", version: "1.0.0")
server.registerTool("hello",
description: "Say hello",
inputSchema: [
"name": .string
]) { args in
.text("Hello, \(args["name"] as! String)!")
}
try await server.runStdio() This is the whole server
No schema dictionaries. No MCPServer constructor ceremony.
Register a closure and serve.
let server = Server()
server.tool("hello",
description: "Say hello",
input: Input()
.required("name", "string")
) { args, ctx in
"Hello, \(args["name"] as! String)!"
}
try await server.serve() HTTP Performance — Head to Head
Same hello tool. Same methodology. 5-minute sustained load in Docker. Vapor for ZeroMCP, stdio proxy for the official SDK.
The official Swift SDK manages 74 req/s at 1.76% CPU. ZeroMCP on Vapor delivers 1,730 at 0.21% CPU.
ZeroMCP HTTP Frameworks
ZeroMCP embedded natively in Swift frameworks. No proxy. No subprocess. 5-minute sustained load.
What's different
- SandboxEnforced. Not advisory.
- CredentialsPer-directory. Not
ProcessInfo.environment. - ProcessesOne. Not N.
- Hot reloadBuilt-in. Not restart.
- ComposabilityConnect remote MCP servers. Official SDK can't.
- TransportStreamable HTTP by default. Stdio too.
When to use the official SDK
ZeroMCP makes trade-offs. Here's what you give up.
ZeroMCP implements tools only. If you need MCP resources, prompts, or sampling, use the official SDK.
ZeroMCP uses a simplified registration API. If you prefer full Swift concurrency integration with typed parameters, use the official SDK.
The official SDK tracks every spec change immediately. ZeroMCP prioritizes stability over spec completeness.
The official SDK is maintained by the MCP specification team at Anthropic. ZeroMCP is maintained by the antidrift team (Reloop Labs, LLC).