{
"mcpServers": {
"weather": {
"command": "/path/to/my-server"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
The fastest way to build MCP servers in Swift.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 24 days ago. 6 stars.
Will it work with my client?
Transport: stdio, sse, http. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Swift Fast Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
The fastest way to build MCP servers in Swift.
try await FastMCP.builder()
.name("My Server")
.addTools([WeatherTool()])
.run()
Three lines to a working MCP server over stdio. Or serve over HTTP:
try await FastMCP.builder()
.name("My Server")
.addTools([WeatherTool()])
.transport(.http(port: 8080))
.run()
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/mehmetbaykar/swift-fast-mcp", from: "2.1.0")
]
Then add "FastMCP" as a dependency of your target:
.target(
name: "MyServer",
dependencies: [
.product(name: "FastMCP", package: "swift-fast-mcp")
]
)
FastMCP pulls in these dependencies automatically:
import FastMCP
struct WeatherTool: MCPTool {
let name = "get_weather"
let description: String? = "Get weather for a location"
@Schemable
struct Parameters: Sendable {
let location: String
}
func call(with args: Parameters) async throws(ToolError) -> Content {
[ToolContentItem(text: "Weather in \(args.location): 22C, Sunny")]
}
}
@main
struct MyServer {
static func main() async throws {
try await FastMCP.builder()
.name("Weather Server")
.addTools([WeatherTool()])
.run()
}
}
Connect it to Claude Desktop by adding to claude_desktop_config.json:
{
"mcpServers": {
"weather": {
"command": "/path/to/my-server"
}
}
}
@main
struct MyServer {
static func main() async throws {
try await FastMCP.builder()
.name("Weather Server")
.addTools([WeatherTool()])
.transport(.http(port: 8080))
.run()
// Listening on http://127.0.0.1:8080/mcp
}
}
public enum Transport: Sendable {
case stdio
case inMemory
case http(
mode: HTTPMode = .stateful,
host: String = "127.0.0.1",
port: Int = 3000,
endpoint: String = "/mcp"
)
case custom(MCP.Transport)
}
| Transport | Use Case |
|-----------|----------|
| .stdio | Claude Desktop, CLI tools. Default. |
| .inMemory | Unit testing. |
| .http(...) | Remote servers, multi-client access, web deployments. |
| .custom(transport) | Provide your own MCP.Transport implementation. |
public enum HTTPMode: Sendable {
case stateful
case stateless
}
Stateful (default) -- Full MCP Streamable HTTP. Each client gets a session with SSE streaming, resumability via Last-Event-ID, GET for server-initiated messages, and DELETE for session teardown.
Stateless -- Minimal HTTP. No sessions, direct JSON responses, POST only. Use when session management is handled externally or not needed.
// Stateful (default)
.transport(.http(port: 8080))
.transport(.http(mode: .stateful, host: "0.0.0.0", port: 3000, endpoint: "/mcp"))
// Stateless
.transport(.http(mode: .stateless, port: 8080))
All builder methods return a new Builder (value semantics) and can be chained.
.name("My Server") // Server name (default: process name)
.version("2.1.0") // Server version (default: "1.0.0")
.title("My Display Name") // Human-readable display name for UIs
... [View full README on GitHub](https://github.com/mehmetbaykar/swift-fast-mcp#readme)