Swiftforge

io.github.jrlingyin888由 GitHub 帳號 jrlingyin888 發布v0.2.1更新於 Oct 24, 2026

Curated, current SwiftUI components (incl. iOS 26 Liquid Glass) for your AI coding agent.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為程式設計助理提供精選的現代 SwiftUI 元件目錄,可瀏覽、搜尋並取得元件原始碼。

可以做什麼
檢視目錄中的分類與元件數量,可依分類篩選,先了解有哪些可用元件,再為檢視或頁面挑選。
適用情境
當 AI 程式設計助理在建立 iOS 或 SwiftUI 介面,希望它取用目前且經過審閱的元件,而不是猜測 API 或使用已棄用寫法時適用。
執行需求
以本機程序透過 stdio 執行,從 npm 套件 swiftforge-mcp 安裝(例如使用 npx),因此機器上需要 Node.js 和 npm。未宣告任何驗證、環境變數或請求標頭。
安裝前請注意
伺服器只提供元件原始碼和說明,程式碼仍由助理寫入你的專案,建置前應檢查其插入的內容。README 中的示範建置在 Xcode 26 與 iOS 26 模擬器上驗證,較舊的工具鏈可能無法編譯最新元件。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Swiftforge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[SwiftForge logo]

SwiftForge MCP

[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.


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

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

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

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

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

Run from a local clone (development)
bash
git clone <this repo> && cd swiftforge-mcpnpm 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):

bash
npm run demo:gen      # (re)generate the demo project from the catalognpm 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

ToolWhat it does
list_categoriesSee the catalog's categories + counts
list_componentsBrowse components (optionally by category)
search_componentsFree-text search by what you're building
get_componentFetch 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.

來源:README.md,提交 eca0728

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分