Skip to main content
Glama

npm version license MCP SwiftUI

A curated, current, production-grade SwiftUI component library — served straight to your AI coding agent over MCP.

Think 21st.dev (curated React components for AI agents), but for SwiftUI.


See it in action

https://github.com/user-attachments/assets/c2460a1d-fb0d-47e0-9d1b-91e6a784717b

A quick tour of components from the catalog (incl. iOS 26 Liquid Glass), running in the demo app.


Related MCP server: uikit-registry

The problem

Coding agents (Claude Code, Cursor, Copilot) are great at logic and mediocre at SwiftUI. They:

  • reach for deprecated APIs (NavigationView, .foregroundColor, ObservableObject everywhere)

  • have never seen iOS 26 "Liquid Glass" (.glassEffect, GlassEffectContainer, .buttonStyle(.glass)) and guess wrong

  • produce bland, one-off views instead of polished, reusable components

You end up rewriting their SwiftUI by hand. Every time.

What SwiftForge does

SwiftForge is a tiny MCP server that gives your agent on-demand access to a hand-curated catalog of modern, compile-ready SwiftUI components. When you ask your agent to "add a glass card" or "build an onboarding flow," it pulls the real, current component instead of hallucinating one.

The value isn't the server — it's the curated catalog: every component uses current API only, is dark-mode + Dynamic Type friendly, includes a #Preview, and is reviewed for taste.

Quick start

Claude Code

claude mcp add swiftforge -- npx -y swiftforge-mcp

Cursor / Windsurf (~/.cursor/mcp.json or project .cursor/mcp.json)

{
  "mcpServers": {
    "swiftforge": {
      "command": "npx",
      "args": ["-y", "swiftforge-mcp"]
    }
  }
}

Full setup, example prompts, and troubleshooting: docs/USAGE.md.

git clone <this repo> && cd swiftforge-mcp
npm install && npm run smoke
# then point your agent at: node /absolute/path/to/src/index.js

Then just talk to your agent:

"Use swiftforge to add a Liquid Glass stat card to this dashboard." "Search swiftforge for a pull-to-refresh list and wire it to my view model."

Demo app — the closed loop, proven

examples/SwiftForgeDemo is a real iOS app that pulls in all 96 catalog components and builds clean — proof that the full loop works (agent → swiftforge → a compiling iOS app):

npm run demo:gen      # (re)generate the demo project from the catalog
npm run demo:build    # headless xcodebuild for the iOS simulator
# or just open it:
open examples/SwiftForgeDemo/SwiftForgeDemo.xcodeproj

Verified ** BUILD SUCCEEDED ** on Xcode 26 / iOS 26 simulator — including the Liquid Glass components. The app live-renders a couple of components (paywall, OTP) and lists the full catalog.

Tools the agent gets

Tool

What it does

list_categories

See the catalog's categories + counts

list_components

Browse components (optionally by category)

search_components

Free-text search by what you're building

get_component

Fetch one component's full, current SwiftUI source + usage + notes

What's inside

96 curated components across 14 categories: Buttons & Controls · Cards & Containers · Navigation & Bars · Lists & Scroll · Lists & Grids · Forms & Inputs · Charts · Effects & Liquid Glass · Feedback & Overlays · Media · Auth & Account · Animations · Layout & Scaffolding · Onboarding & Hero — including dedicated iOS 26 Liquid Glass components with graceful-fallback notes.

Every component is gated through a syntax check (scripts/validate.js, xcrun swiftc -parse) and a senior-review pass that strips deprecated API.

📖 Browse every component → docs/CATALOG.md

Roadmap

  • New components every release, kept current as iOS evolves.

  • Missing something? Open an issue — requests drive what gets added next.

The catalog here is free and MIT.

License

MIT (server). Catalog content © its authors.

Available Tools

4 tools
get_componentA

Fetch one curated SwiftUI component by id, including full production-ready, current-API source code, usage example, and notes. Paste the returned Swift directly into the project.

Inputs: id (required).

list_categoriesA

List the SwiftForge component categories with how many curated SwiftUI components each holds. Call this first to see what's available.

Inputs: no named parameters.

list_componentsA

List curated SwiftUI components (id, title, category, description, minIOS, tags). Optionally filter by category. Use get_component to fetch the full source for one.

Inputs: category.

search_componentsA

Search the curated SwiftUI catalog by free text (matches title, description, tags, category). Returns brief results; follow up with get_component for full source. Prefer this when the user describes a UI need (e.g. 'glass card', 'pull to refresh', 'onboarding').

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 4 tools

    Disambiguation4/5

    list_categories and get_component are clearly distinct. list_components and search_components overlap somewhat as both return component lists, but their filter/search purposes are described well enough to avoid major confusion.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: list_categories, list_components, search_components, get_component.

    Tool Count5/5

    Four tools is well-scoped for a curated SwiftUI component catalog, covering browsing, listing, searching, and fetching details without unnecessary clutter.

    Completeness5/5

    The tool surface covers the full read-only lifecycle of the catalog: discover categories, list/filter components, search by free text, and retrieve full component source. No critical gap for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server providing access to a catalog of reusable React/Next.js component recipes (animations, charts, UI components) with usage examples, props documentation, and architecture notes, enabling AI assistants to generate production-ready code.
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Federates UI component registries, enabling AI agents to fetch exact component code, dependencies, and setup prerequisites directly into the workspace. Includes sandboxed previews, anti-slop layout auditing, and offline-to-cloud telemetry sync.
      1
      -