swift-patterns
An MCP server providing curated Swift and SwiftUI best practices from leading iOS sources.
claude mcp add --transport stdio efremidze-swift-patterns-mcp npx -y swift-patterns-mcp@latest
How to use
swift-patterns-mcp is an MCP server that provides runtime tooling for accessing curated Swift and SwiftUI best practices. It offers fast, searchable access to patterns from trusted sources, persistent memory across sessions, and optional premium integrations. You can ask it questions like how to implement a pull-to-refresh in SwiftUI, compare MVVM versus The Composable Architecture (TCA), or pull fresh examples from sources such as Swift by Sundell, SwiftLee, Nil Coalescing, and Point-Free. With Memvid-based memory, you can recall prior searches and patterns across sessions, and you can opt into semantic search or AI-powered fallbacks for stronger conceptual matches. The server is designed to be used by MCP clients (Cursor, Claude Code, Windsurf, VS Code) to deliver fast, contextual guidance inside your workflow.
How to install
Prerequisites:
- Node.js 18.0.0 or higher installed on the host
- Internet access to fetch the MCP package
- An MCP client or integration (optional for setup)
Install and run (recommended quickstart):
- Ensure Node.js is installed. You can verify with:
node -v
npm -v
- Start the MCP server with the provided command:
npx -y swift-patterns-mcp@latest
This launches an interactive setup wizard inside your terminal. If you’re integrating with an MCP client, the server will run in MCP mode and expose its commands via the configured entry point.
- For non-interactive/CI setups, you can run the setup with:
npx -y swift-patterns-mcp@latest setup
-
Optional per-client quickstarts follow the wizard prompts or optical configurations in the README (Cursor, Claude Code, Windsurf, VS Code). See the README’s Quick Start and Configure sections for tailored commands and mcp.json edits.
-
If you prefer to pin a specific version, replace @latest with a version tag, e.g. swift-patterns-mcp@v1.2.3.
Additional notes
Tips and caveats:
- The MCP server name commonly used in clients is swift-patterns; configure this name consistently across clients.
- Premium sources require OAuth/subscriptions; if you enable Patreon integration, configure your credentials accordingly.
- Memvid provides cross-session memory and can store heavy patterns; monitor disk usage at ~/.swift-patterns-mcp/swift-patterns-memory.mv2.
- If you encounter issues with non-interactive setups, ensure your MCP client supports non-interactive mode and that the server is reachable from the client.
- The configuration includes sources (sundell, vanderlee, nilcoalescing, pointfree, patreon). You can enable/disable as needed in the config file generated at ~/.swift-patterns-mcp/config.json.
- For advanced usage, explore configuring Cursor/Claude Code/Windsurf/VS Code integrations by editing the respective mcp.json examples in the README to suit your environment.
Related MCP Servers
mcp-client-example
Learn how to implement MCP client with SwiftUI and Anthropic API
mcp-install-instructions-generator
Generate MCP Server Installation Instructions for Cursor, Visual Studio Code, Claude Code, Claude Desktop, Windsurf, ChatGPT, Gemini CLI and more
asc
MCP server for App Store Connect API — 208 tools for managing apps, builds, TestFlight, subscriptions, and more from Claude, Cursor, VS Code, or any MCP client
mcpman
The package manager for MCP servers — install, manage & monitor across Claude Desktop, Cursor, VS Code, Windsurf
claude-code-memory
A Claude Code plugin that gives Claude fully automatic, per-project cognitive memory with hybrid search, session lifecycle hooks, and local embeddings.
markview
Native macOS markdown preview app. Swift/SwiftUI, GitHub Flavored Markdown, syntax highlighting, linting, plugins. No Electron.