Provides access to curated Swift and SwiftUI patterns, best practices, and code examples for iOS application development.
Integrates with Patreon to unlock and access premium iOS development content from supported creators via OAuth authentication.
Aggregates and automatically synchronizes the latest Swift development articles and patterns from trusted creator RSS feeds.
Offers a knowledge base of curated Swift code examples, architectural patterns, and design principles from community experts.
Integrates with YouTube via API to fetch and index iOS development tutorials and educational content.
swift-patterns-mcp
An MCP server providing curated Swift and SwiftUI best practices from leading iOS developers β with intelligent search, persistent memory, and optional premium integrations.
Want an Agent Skill?
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:
swift-patterns-skill = Static guidance (portable, no runtime)
swift-patterns-mcp = Dynamic tooling (search, retrieval, premium features)
Note: This repo is an MCP server only. It does not ship an Agent Skill (SKILL.md) or skill references.
What does this MCP provide?
swift-patterns-mcp delivers runtime tools for accessing Swift/SwiftUI best practices:
π Search & retrieval across curated sources
π§ Persistent memory with cross-session recall
π Auto-refreshing content from RSS feeds and GitHub
π― Intelligent filtering by quality and relevance
π Premium integrations (optional Patreon support)
Ideal for:
Active Development: "How do I implement pull-to-refresh in SwiftUI?" answered instantly without leaving your IDE
Architecture Decisions: Compare MVVM vs. TCA patterns with concrete examples from trusted sources
Staying Current: Access the latest patterns and best practices as they're published by leading iOS developers
Team Standards: Build a searchable reference of approved patterns for your organization
AI-Powered Workflows: Enable agents to query "Show me Sundell's approach to dependency injection" with consistent, quality responses
π Features
π Expert Knowledge Base: Patterns from Swift by Sundell, Antoine van der Lee, Nil Coalescing, and more
π Intelligent Search: Query by topic, pattern, or specific iOS concept
πΎ Persistent Memory: Cross-session recall with Memvid storage
π§ Semantic Search: Optional AI-powered fallback for better conceptual matches
π Multiple Sources: Aggregates knowledge from trusted educators
π Auto-Updates: Content refreshes automatically from RSS feeds
β‘ Fast Performance: Efficient caching and indexed search
Content Sources
Free Sources
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 Sources
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.
π Prerequisites
Node.js 18.0.0 or higher
MCP-Compatible AI Assistant: Claude Desktop, Cursor, Windsurf, VS Code with Copilot, or Claude Code
π Quick Start
Run Setup
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.
Interactive Setup Wizard
If installed globally, you can also run:
The wizard helps you choose:
Config scope (local project vs global)
MCP client (Cursor, Claude Code, Windsurf, VS Code)
Optional Patreon setup prompt
Non-interactive Setup (CI/Scripts)
Use --global (-g) or --local (-l) to skip the location prompt.
Use --cursor, --claude, --windsurf, --vscode, or --all to skip the client prompt.
Configure Your AI Assistant
Cursor
Or manually add to Cursor Settings β Tools β MCP Servers:
.cursor/mcp.json:
Alternatively, add to ~/.cursor/mcp.json. See Cursor documentation for details.
Claude Code
Run in your terminal:
Or manually add to .mcp.json:
Restart Claude Code and run /mcp to verify. See Claude Code MCP documentation for details.
Windsurf
Add to .windsurf/mcp.json:
Restart Windsurf to activate. See Windsurf MCP documentation for details.
VS Code
Add to .vscode/mcp.json:
Open .vscode/mcp.json and click Start next to the swift-patterns server. See VS Code MCP documentation for details.
Test It Out
Try these queries:
π§ Configuration
Configuration is automatically created at ~/.swift-patterns-mcp/config.json:
Note: configured only applies to premium sources. Free sources are treated as configured by default.
Persistent Memory with Memvid
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:
πΎ Persistent Storage: Patterns stored in
~/.swift-patterns-mcp/swift-patterns-memory.mv2π Cross-Session Recall: Find patterns from previous searches after server restart
π§ Semantic Search: Optional embedding-based similarity search
π Automatic Storage: Patterns stored during searches
β‘ Fast Retrieval: Built-in BM25 + optional vector search
Configuration:
When to enable:
You want patterns to persist across server restarts
You frequently search for similar topics
You need cross-session semantic memory
Note: Memvid complements MiniSearch (fast in-session search) and semantic recall (in-session fallback). All three work together:
MiniSearch: Fast lexical search within current session
Semantic recall: Activates for poor lexical results (in-session)
Memvid: Cross-session persistent memory and recall
Semantic Recall (Optional AI Enhancement)
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:
π§ Automatically activates when keyword search scores are low
π― Uses sentence transformers to understand meaning beyond keywords
π Quality filtering to index only high-relevance patterns
β‘ Efficient embedding caching
Configuration:
When to enable:
Your queries use conceptual terms that don't match exact keywords
You want more intelligent, context-aware search results
You're okay with slightly slower first-time searches (embeddings need to compute)
Note: Requires downloading a ~50MB transformer model on first use. Embeddings are cached for performance.
Environment Variables (Optional)
Patreon
All three variables are required for Patreon content fetching:
Variable | Description |
| OAuth client ID from your Patreon app |
| OAuth client secret from your Patreon app |
| Enables searching YouTube videos from Patreon creators. Get API key |
Add to your MCP client config:
π‘ Usage Examples
Basic Queries
Advanced Queries
With Patreon Integration
π Premium Integration (Optional)
Patreon Setup
Access premium content from iOS creators you support:
Follow the interactive wizard to:
Verify environment variables are configured
Complete OAuth authentication
Fetch and verify content from your subscriptions
π Detailed Guide: Patreon Setup Documentation
Requirements
Active Patreon account with at least one iOS creator subscription
Patreon Creator account (free - no need to launch a creator page)
10 minutes for one-time OAuth setup
Why Creator Account?
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.
What You Get
β Access to premium tutorials and patterns from creators you support
β Automatic extraction of code from downloadable content
β Quality filtering and advanced search
β Multi-creator support
β Private, secure authentication
βοΈ Commands
ποΈ How It Works
Query: Receives a query through the MCP protocol
Processing: Searches enabled sources based on the query
Content Retrieval: Fetches and parses content from RSS feeds, APIs, and cached data
Quality Filtering: Applies configurable quality thresholds
Response: Returns formatted, relevant patterns and examples
π§ Troubleshooting
Common Issues
Node version incompatible
Sources not returning results
Patreon Integration Issues
OAuth redirect not working
Ensure redirect URI is exactly:
http://localhost:3000/patreon/callbackCheck no other process is using port 3000
Verify OAuth credentials are correctly set
No premium content showing
Confirm you have active Patreon subscriptions to iOS creators
Check status:
swift-patterns-mcp patreon statusRe-authenticate:
swift-patterns-mcp patreon setup
πΊοΈ Roadmap
Current (v1.x)
Core MCP server
Swift by Sundell RSS
Antoine van der Lee RSS
Nil Coalescing RSS
Patreon OAuth
Point-Free GitHub
Advanced filtering
Future (v2.x)
Additional premium sources
More free sources
Code validation
π€ Contributing
We welcome contributions! See our contributing guidelines.
π License
MIT License - Copyright (c) 2026 Lasha Efremidze
π Credits
Created by Lasha Efremidze
Content Sources
John Sundell - Swift by Sundell
Antoine van der Lee - SwiftLee
Nil Coalescing - SwiftUI patterns and Swift tips
Point-Free - Advanced Swift education
Built with Model Context Protocol
Made with β€οΈ for the Swift community
β Star this repo β’ π Report Bug β’ β¨ Request Feature