mcpField
P
prefab

prefab

Local
github.com/davidjaykellyProductivity2Updated 9w ago

About prefab

prefab-mcp connects Prefab to MCP agents so they can inspect project templates and deploy them. It distinguishes safe previews from folder creation and also exposes watched-folder rules and shared placeholders.

Key features

  1. 01List templates and inspect details
  2. 02Preview deployments and missing values
  3. 03Deploy templates with supplied values
  4. 04Inspect watched folders and rules
  5. 05View global placeholders and presets

Use cases

  1. 01Find a template for a new project
  2. 02Create client or campaign folder structures
  3. 03Check required placeholders before deployment
  4. 04Review Prefab folder-watching rules

MCP support

The server exposes template discovery, deployment previews, and deployment tools to MCP clients. Reading works while Prefab is closed; deployment requires the app to be running and permission for the destination folder.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"io-prefabapp-prefab": {
"command": "npx",
"args": [
"-y",
"prefab-mcp"
]
}
}
}
Run commandnpx -y prefab-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmprefab-mcp0.1.1

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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:

{
  "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 case
npm 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.