swift-patterns-mcp

swift-patterns-mcp

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.

Category
Visit Server

README

swift-patterns-mcp

🎯 Curated Swift/SwiftUI Patterns from Top iOS Developers

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.

Quick Start β€’ Features β€’ Usage β€’ Contributing


Why swift-patterns-mcp?

  • βœ… Curated Content: Only high-quality patterns from trusted iOS developers
  • βœ… Always Up-to-Date: Automatically fetches the latest articles and patterns
  • βœ… MCP Native: Works seamlessly with Claude, Cursor, Windsurf, and other MCP-compatible tools
  • βœ… Privacy First: Free sources require no authentication
  • βœ… Extensible: Optional Patreon integration for premium content

🌟 Features

Core Features

  • πŸŽ“ Expert Knowledge Base: Provides patterns from Swift by Sundell, Antoine van der Lee, Nil Coalescing, and more
  • πŸ” Intelligent Search: Query by topic, pattern, or specific iOS concepts
  • 🎯 Quality Filtering: Configurable quality thresholds ensure only the best content
  • πŸ“š Multiple Sources: Aggregates knowledge from various trusted educators
  • πŸ”„ Auto-Updates: Content automatically refreshes from RSS feeds
  • ⚑ Fast Performance: Efficient caching and indexed search

Built-in Sources (Free)

  • βœ… Swift by Sundell - Articles, patterns, and best practices
  • βœ… Antoine van der Lee - Tutorials, tips, and deep dives
  • βœ… Nil Coalescing - SwiftUI patterns and practical Swift tips
  • βœ… Point-Free - Open source libraries and patterns

Premium Sources (Optional)

  • πŸ” Patreon Integration - Access premium content from creators you support

πŸ“‹ Prerequisites

  • Node.js: Version 18.0.0 or higher
  • MCP-Compatible AI Assistant: Claude Desktop, Cursor, Windsurf, or VS Code with Copilot

πŸš€ Quick Start

Install

npm install -g swift-patterns-mcp

Configure Your AI Assistant

Cursor

Install MCP Server

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 the following to your ~/.cursor/mcp.json file. To learn more, see the Cursor documentation.

Claude Code

Run this command in your terminal:

claude mcp add swift-patterns -- npx -y swift-patterns-mcp@latest

Or manually add to your project's .mcp.json file:

.mcp.json

{
  "mcpServers": {
    "swift-patterns": {
      "command": "npx",
      "args": ["-y", "swift-patterns-mcp@latest"]
    }
  }
}

After adding the configuration, restart Claude Code and run /mcp to see the swift-patterns MCP server in the list. If you see Connected, you're ready to use it.

See the Claude Code MCP documentation for more details.

Windsurf

Add the swift-patterns server to your project's .windsurf/mcp.json configuration file:

.windsurf/mcp.json

{
  "mcpServers": {
    "swift-patterns": {
      "command": "npx",
      "args": ["-y", "swift-patterns-mcp@latest"]
    }
  }
}

After adding the configuration, restart Windsurf to activate the MCP server.

See the Windsurf MCP documentation for more details.

VS Code

To configure MCP in VS Code with GitHub Copilot, add the swift-patterns-mcp server to your project's .vscode/mcp.json configuration file:

.vscode/mcp.json

{
  "mcp": {
    "servers": {
      "swift-patterns": {
        "command": "npx",
        "args": ["-y", "swift-patterns-mcp@latest"]
      }
    }
  }
}

After adding the configuration, open .vscode/mcp.json and click Start next to the swift-patterns server.

See the VS Code MCP documentation for more details.

Test It Out

Try these queries:

"Show me SwiftUI animation patterns"
"What does Sundell say about testing?"
"Explain navigation patterns in SwiftUI"

πŸ”§ Configuration

The configuration file is automatically created at ~/.swift-patterns-mcp/config.json:

{
  "sources": {
    "sundell": { "enabled": true, "quality": 60 },
    "vanderlee": { "enabled": true, "quality": 60 },
    "pointfree": { "enabled": false, "quality": 60 },
    "patreon": { "enabled": false }
  },
  "cache": {
    "ttl": 86400
  }
}

Environment Variables (Optional)

For premium features, 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"
      }
    }
  }
}

πŸ’‘ Usage Examples

Basic Queries

"Show me best practices for SwiftUI animations"
"What does Sundell say about testing?"
"Explain navigation patterns in SwiftUI"

Advanced Queries

"Show me performance tips from van der Lee"
"Find iOS architecture patterns for MVVM + coordinator"
"Give me examples for SwiftUI infinite scrolling"

With Patreon Integration

"Show me advanced SwiftUI patterns"
"How do I build a photo editor app?"

πŸ“š Content Sources

Free Sources

Currently supported, no authentication needed:

Source Creator Content Type Update Frequency
Swift by Sundell John Sundell Articles, patterns, best practices Weekly
Antoine van der Lee Antoine van der Lee Tutorials, tips, deep dives Weekly
Nil Coalescing Nil Coalescing SwiftUI patterns, Swift tips Weekly
Point-Free Point-Free Open source libraries, patterns On release

Premium Sources

Requires authentication and active subscriptions:

Source What You Get Setup Method Status
Patreon Premium content from iOS creators OAuth 2.0 βœ… Available

πŸ” Premium Integration (Optional)

Patreon Setup

Access premium content from iOS creators you support:

swift-patterns-mcp setup --patreon

Follow the interactive wizard to:

  1. Create a Patreon OAuth application
  2. Configure credentials
  3. Complete authentication

πŸ“– 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

# Source management
swift-patterns-mcp source list
swift-patterns-mcp source enable <source-name>
swift-patterns-mcp source disable <source-name>

# Configuration
swift-patterns-mcp setup
swift-patterns-mcp setup --patreon

# Authentication
swift-patterns-mcp auth patreon
swift-patterns-mcp auth status

πŸ—οΈ How It Works

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[van der Lee RSS]
    C --> G[Nil Coalescing RSS]
    C --> H[Point-Free GitHub]
    D --> I[Patreon API]
  1. Query: Receives a query through the MCP protocol
  2. Processing: Searches enabled sources based on the query
  3. Content Retrieval: Fetches and parses content from RSS feeds, APIs, and cached data
  4. Quality Filtering: Applies configurable quality thresholds
  5. Response: Returns formatted, relevant patterns and examples

πŸ”§ Troubleshooting

Common Issues

Node version incompatible

node --version  # Should be >= 18.0.0

Sources not returning results

swift-patterns-mcp source list
ls ~/.swift-patterns-mcp/config.json
swift-patterns-mcp setup

Patreon Integration Issues

OAuth redirect not working

  • Ensure redirect URI is exactly: http://localhost:3000/patreon/callback
  • Check 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
  • Re-authenticate: swift-patterns-mcp auth patreon
  • Check Patreon source is enabled: swift-patterns-mcp source list

πŸ—ΊοΈ Roadmap

Current (v1.x)

  • [x] Core MCP server
  • [x] Swift by Sundell RSS
  • [x] Antoine van der Lee RSS
  • [x] Nil Coalescing RSS
  • [x] Patreon OAuth
  • [ ] Point-Free GitHub
  • [ ] Advanced filtering

Future (v2.x)

  • [ ] Additional premium sources
  • [ ] More free sources
  • [ ] Advanced search (with vector embeddings)
  • [ ] 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

Built with Model Context Protocol


Made with ❀️ for the Swift community

⭐ Star this repo β€’ πŸ› Report Bug β€’ ✨ Request Feature

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured