Prefab

io.prefabapp由 prefabapp.io 發布v0.1.1更新於 Oct 25, 2026

List, create and deploy your Prefab project templates from any MCP agent.

已驗證STDIO僅桌面效率與工作流檔案與儲存

概覽

AI 產生的概覽

Prefab 的本機 MCP 伺服器,讓助理列出你的專案範本並部署其中一個,在你的 Mac 上建立資料夾。

可以做什麼
列出並說明範本,包括其結構、預留位置和動作,以及程式庫層級的全域項目和受監看資料夾及其規則。預覽部署,查看會建立什麼、還缺哪些值,但不建立任何內容。部署範本以建立資料夾,並填入你提供的值。
適用情境
適合在 Mac 上用 Prefab 保存可重複使用的資料夾和檔案範本,並希望助理據此建立新專案或客戶資料夾(例如新的活動目錄)時使用,最好先查看預覽。
執行需求
macOS,已安裝並至少開啟過一次 Prefab;除使用自帶 Node 的安裝包外,需要 Node 18+。透過 npx 以 stdio 在本機執行。部署需要 Prefab 正在執行、在 Prefab 設定中開啟代理控制權限(Prefab 1.1.6 或更新版本),且目標必須是已授予 Prefab 存取權限的資料夾。
安裝前請注意
部署會在磁碟上建立資料夾和檔案,請先檢查預覽。代理控制權限預設關閉,需在 Prefab 中開啟;1.1.6 之前的版本只有讀取工具可用。此伺服器直接讀取 Prefab 的程式庫,從不寫入,且沒有網路存取權限。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

prefab-mcp

An MCP server for Prefab, so an agent can see your templates and deploy one for you.

"Set up a new client folder for Northwind, autumn campaign, on my Desktop"

What it exposes

ToolDoes
list_templatesEvery template, what it creates, what it asks for
describe_templateOne template in full: structure, placeholders, actions
preview_deployWhat a deploy would create, and what values are still missing. Creates nothing
deploy_templateCreates the folders, filling in the values given
list_watched_foldersFolders Prefab is watching, and the rules on them
list_globalsLibrary-wide placeholders, actions and value presets

Setting it up

Works with any client that speaks MCP over stdio.

As a bundle - download prefab.mcpb from the releases page and double-click it. Clients that install MCP bundles, Claude Desktop among them, bring their own Node, so there is nothing else to install.

From the command line (Claude Code, and anything with the same idea):

claude mcp add prefab -- npx -y prefab-mcp

In a config file - Cursor, Zed, and most others:

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

Then switch on Let agents and scripts control Prefab in Prefab's Settings ▸ Permissions. It is off by default; reading your templates works without it, creating and deploying does not.

That switch arrives in Prefab 1.1.6. On an earlier version the reading tools work and the rest say so.

Requires macOS, Prefab installed and opened once, and Node 18+ (except for the .mcpb route).

How it works

Prefab is sandboxed and has no network access, so it cannot host anything. This server runs beside it instead: it reads the library straight out of the app group (~/Library/Group Containers/group.VFDG327T66.prefab) and asks the app to deploy through the same prefab:// URL the Finder extension uses. Two consequences worth knowing:

  • Prefab has to be running for a deploy. Reading works either way.
  • The destination has to be a folder Prefab has been granted. macOS keeps a sandboxed app out of your folders until you point it at one. preview_deploy and deploy_template both check first and say so, rather than leaving a permission dialog on screen that an agent cannot answer. Grant folders in Prefab, under Settings ▸ Permissions.

Nothing here writes to Prefab's library. The app owns those files, and editing them behind its back would be overwritten the next time it saves.

Development

npm test    # checks placeholder resolution matches the app's Swift, case for casenpm run try '[["list_templates",{}]]'    # call a tool the way a client does

src/resolve.js is a deliberate duplicate of RenamePattern.swift. If you change one, change the other - npm test compiles the Swift and compares the two.

來源:README.md,提交 96547a7

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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