loading…
Search for a command to run...
loading…
An MCP server providing curated Swift and SwiftUI best practices from leading iOS developers, including patterns and real-world code examples from Swift by Sund
An MCP server providing curated Swift and SwiftUI best practices from leading iOS developers, including patterns and real-world code examples from Swift by Sundell, SwiftLee, and other trusted sources.
An MCP server providing curated Swift and SwiftUI best practices from leading iOS developers — with intelligent search, persistent memory, and optional premium integrations.
If you want a lightweight, portable Swift/SwiftUI best-practices package without runtime tooling, check out:
swift-patterns-skill: Designed as a portable Agent Skill focused on Swift/SwiftUI patterns, architecture guidance, and decision-making frameworks.
Key difference:
Note: This repo is an MCP server only. It does not ship an Agent Skill (SKILL.md) or skill references.
swift-patterns-mcp delivers runtime tools for accessing Swift/SwiftUI best practices:
These sources are publicly available but benefit from MCP's fetching, caching, and search capabilities:
| Source | Content Type | Updates |
|---|---|---|
| Swift by Sundell | Articles, patterns, best practices | Weekly |
| SwiftLee | Tutorials, tips, deep dives | Weekly |
| Nil Coalescing | SwiftUI patterns, Swift tips | Weekly |
| Point-Free | Open-source libraries, patterns | On release |
Premium content requires OAuth authentication and active subscriptions:
| Source | What You Get | Authentication |
|---|---|---|
| Patreon | Premium content from supported creators | OAuth 2.0 |
Access exclusive content from top iOS educators: Kavsoft, SwiftUI Codes, sucodee and many more. Get tutorials, code samples, and expert guidance directly from creators you support.
npx -y swift-patterns-mcp@latest
In an interactive terminal, this opens the setup wizard.
When launched by an MCP client (non-interactive stdio), it runs as the MCP server automatically.
npx -y swift-patterns-mcp@latest setup
If installed globally, you can also run:
swift-patterns-mcp setup
The wizard helps you choose:
# Cursor
npx -y swift-patterns-mcp@latest setup --cursor --global
npx -y swift-patterns-mcp@latest setup --cursor --local
# Claude Code
npx -y swift-patterns-mcp@latest setup --claude --global
# Windsurf
npx -y swift-patterns-mcp@latest setup --windsurf --global
# VS Code
npx -y swift-patterns-mcp@latest setup --vscode --local
# All clients
npx -y swift-patterns-mcp@latest setup --all --global
Use --global (-g) or --local (-l) to skip the location prompt.
Use --cursor, --claude, --windsurf, --vscode, or --all to skip the client prompt.
Or manually add to Cursor Settings → Tools → MCP Servers:
.cursor/mcp.json:
{
"mcpServers": {
"swift-patterns": {
"command": "npx",
"args": ["-y", "swift-patterns-mcp@latest"]
}
}
}
Alternatively, add to ~/.cursor/mcp.json. See Cursor documentation for details.
Run in your terminal:
claude mcp add swift-patterns -- npx -y swift-patterns-mcp@latest
Or manually add to .mcp.json:
{
"mcpServers": {
"swift-patterns": {
"command": "npx",
"args": ["-y", "swift-patterns-mcp@latest"]
}
}
}
Restart Claude Code and run /mcp to verify. See Claude Code MCP documentation for details.
Add to .windsurf/mcp.json:
{
"mcpServers": {
"swift-patterns": {
"command": "npx",
"args": ["-y", "swift-patterns-mcp@latest"]
}
}
}
Restart Windsurf to activate. See Windsurf MCP documentation for details.
Add to .vscode/mcp.json:
{
"mcp": {
"servers": {
"swift-patterns": {
"command": "npx",
"args": ["-y", "swift-patterns-mcp@latest"]
}
}
}
}
Open .vscode/mcp.json and click Start next to the swift-patterns server. See VS Code MCP documentation for details.
Try these queries:
"Show me SwiftUI animation patterns"
"What does Sundell say about testing?"
"Explain navigation patterns in SwiftUI"
Configuration is automatically created at ~/.swift-patterns-mcp/config.json:
{
"sources": {
"sundell": { "enabled": true },
"vanderlee": { "enabled": true },
"nilcoalescing": { "enabled": true },
"pointfree": { "enabled": true },
"patreon": { "enabled": false, "configured": false }
},
"prefetchSources": true,
"semanticRecall": {
"enabled": false,
"minLexicalScore": 0.35,
"minRelevanceScore": 70
},
"memvid": {
"enabled": true,
"autoStore": true,
"useEmbeddings": false,
"embeddingModel": "bge-small"
}
}
Note: configured only applies to premium sources. Free sources are treated as configured by default.
Memvid provides persistent semantic memory that improves recall across sessions. Unlike in-memory caching, Memvid stores patterns in a single-file database that persists between server restarts.
Features:
~/.swift-patterns-mcp/swift-patterns-memory.mv2Configuration:
{
"memvid": {
"enabled": true, // Enable Memvid persistent memory
"autoStore": true, // Automatically store patterns during searches
"useEmbeddings": false, // Use semantic embeddings (requires model download)
"embeddingModel": "bge-small" // Options: "bge-small", "openai-small"
}
}
When to enable:
Note: Memvid complements MiniSearch (fast in-session search) and semantic recall (in-session fallback). All three work together:
Semantic recall provides AI-powered semantic search as a fallback when keyword search returns poor results. It uses transformer embeddings to understand query intent and find conceptually similar patterns.
Features:
Configuration:
{
"semanticRecall": {
"enabled": false, // Enable semantic recall
"minLexicalScore": 0.35, // Activate when keyword search < 0.35
"minRelevanceScore": 70 // Only index patterns with score >= 70
}
}
When to enable:
Note: Requires downloading a ~50MB transformer model on first use. Embeddings are cached for performance.
All three variables are required for Patreon content fetching:
| Variable | Description |
|---|---|
PATREON_CLIENT_ID |
OAuth client ID from your Patreon app |
PATREON_CLIENT_SECRET |
OAuth client secret from your Patreon app |
YOUTUBE_API_KEY |
Enables searching YouTube videos from Patreon creators. Get API key |
Add to your MCP client config:
{
"mcpServers": {
"swift-patterns": {
"command": "npx",
"args": ["-y", "swift-patterns-mcp@latest"],
"env": {
"PATREON_CLIENT_ID": "your_client_id",
"PATREON_CLIENT_SECRET": "your_client_secret",
"YOUTUBE_API_KEY": "your_youtube_api_key"
}
}
}
}
"How can I use lazy var in @Observable classes?"
"Show me modern SwiftUI animation best practices using symbolEffect (with button + state examples)"
"Explain common SwiftUI navigation patterns (NavigationStack, NavigationPath, enum routing) and when to use each"
"Build a coordinator-style architecture for SwiftUI: MVVM + dependency injection + type-safe routing"
"Give me a clean infinite scrolling implementation: pagination, dedupe, cancellation, and loading states"
"Explain how @Observable improves SwiftUI performance vs ObservableObject, then refactor my view model to @Observable"
"Build a SwiftUI parallax + sticky header screen like a profile page (include reusable component version)"
"Show me how to build a photo editor flow: PhotosPicker -> crop -> filters -> export/share"
"Give me 5 advanced SwiftUI micro-interactions (toasts, sheets, draggable cards, haptics) with production-ready code"
Access premium content from iOS creators you support:
swift-patterns-mcp patreon setup
Follow the interactive wizard to:
📖 Detailed Guide: Patreon Setup Documentation
Patreon requires OAuth apps to be registered by creators. You don't need to launch a creator page or become an active creator - just register as one to create an OAuth app for personal use.
# List all content sources and status
swift-patterns-mcp sources
# Interactive onboarding/configuration wizard
swift-patterns-mcp setup
# Patreon integration
swift-patterns-mcp patreon setup # Connect your Patreon account
swift-patterns-mcp patreon status # Check connection status
swift-patterns-mcp patreon reset # Clear authentication data
graph LR
A[AI Assistant] --> B[swift-patterns-mcp Server]
B --> C[Free Sources]
B --> D[Premium Sources]
C --> E[Swift by Sundell RSS]
C --> F[Antoine van der Lee RSS]
C --> G[Nil Coalescing RSS]
C --> H[Point-Free GitHub]
D --> I[Patreon API]
Node version incompatible
node --version # Should be >= 18.0.0
Sources not returning results
swift-patterns-mcp sources
ls ~/.swift-patterns-mcp/config.json
OAuth redirect not working
http://localhost:3000/patreon/callbackNo premium content showing
swift-patterns-mcp patreon statusswift-patterns-mcp patreon setupWe welcome contributions! See our contributing guidelines.
MIT License - Copyright (c) 2026 Lasha Efremidze
Created by Lasha Efremidze
Content Sources
Built with Model Context Protocol
Made with ❤️ for the Swift community
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"swift-patterns-mcp": {
"command": "npx",
"args": []
}
}
}