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 分