enable_source
Enable a content source (requires setup for premium sources)
Ask for a Swift or SwiftUI pattern and get it from Sundell, SwiftLee, Nil Coalescing, and Point-Free without leaving the editor.
LABSCO SUMMARY
The value here is retrieval quality rather than volume: a small set of trusted educators, a quality filter on what gets indexed, and a store that keeps what you already looked up. The premium half is genuinely optional — the free sources work with no credentials at all, and Patreon only matters if you already support the creators it reaches.
An MCP server over a curated body of Swift and SwiftUI writing. It fetches, caches, and indexes four public sources, keeps what it finds in a single-file store so recall survives a restart, and can reach Patreon creators once OAuth is set up.
Node.js 18.0.0 or higher. Clients run npx -y swift-patterns-mcp@latest; the same command opens a setup wizard when you run it in an interactive terminal, and the wizard can write the config for Cursor, Claude Code, Windsurf, or VS Code. Nothing else is needed for the four free sources. Configuration lands at ~/.swift-patterns-mcp/config.json. Patreon content needs PATREON_CLIENT_ID and PATREON_CLIENT_SECRET, and YOUTUBE_API_KEY adds video search from those creators. Semantic recall downloads a transformer model the first time it runs.
One command — npx -y swift-patterns-mcp@latest
USE CASES
Search every enabled source in one call and get back the passage that answers it.
Pull reference patterns per topic, then widen to a natural-language search when the topic name is not the term the authors used.
Search with the require-code option so prose-only articles drop out of the results.
List the sources with their status, then switch on the one you expected to be answering.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
enable_sourceEnable a content source (requires setup for premium sources)
get_swift_patternGet Swift/SwiftUI reference patterns from curated free sources (Sundell, van der Lee, Nil Coalescing, Point-Free). Best for conceptual guidance and free-source examples.
list_content_sourcesList all available content sources and their status
search_swift_contentUnified search across all enabled sources (free + premium). Use this for broad natural-language queries. When Patreon is enabled, includes premium creator posts and downloadable code.
BEFORE YOU INSTALL
4 tools when we connected. The patreon source is disabled until its OAuth wizard runs; enable_source and list_content_sources let an agent check and change sources.
CONTEXT COST
Rated by the size of the 4 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y swift-patterns-mcp@latest{
"mcpServers": {
"swift-patterns": {
"command": "npx",
"args": [
"-y",
"swift-patterns-mcp@latest"
]
}
}
}{
"servers": {
"swift-patterns": {
"command": "npx",
"args": [
"-y",
"swift-patterns-mcp@latest"
]
}
}
}npx -y swift-patterns-mcp@latest setup --all --global