Build · Step 12 of 14

The Scaffolder

An MCP server whose tools call Claude to build other MCP servers. Describe the job in plain English — get back every file, ready to install and run.

The idea

Once you have read Build an MCP Server, the steps are mechanical — and mechanical work is exactly what an AI is good at. The Scaffolder is itself an MCP server. You add it to your AI client once; from then on you can ask your client to generate a brand-new MCP server for any task, and the Scaffolder hands back complete, runnable code.

What it exposes

  • scaffold_mcp_server — give it a task description (and optionally a language and transport); it returns a full project: package.json, source,README, and a list of any TODOs to finish.
  • explain_mcp_concept — ask how any part of MCP works and get a developer-focused explanation.
Under the hood it calls Claude Opus 5.5 at extra-high effort, streams the response so large multi-file output never times out, and caches its system prompt so repeat calls are cheaper. The servers it writes use the current MCP SDK (@modelcontextprotocol/server).

Install it

You need Node.js 20+ and an Anthropic API key.

cd mcp-server
npm install
npm run build

Register it with Claude Desktop

Add it to claude_desktop_config.json — the client launches it as a subprocess over stdio:

{
  "mcpServers": {
    "scaffolder": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-server/dist/index.js"],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
    }
  }
}

Or with Claude Code

claude mcp add scaffolder --env ANTHROPIC_API_KEY=sk-ant-... \
  -- node /absolute/path/to/mcp-server/dist/index.js

Use it

Restart your client and just ask. For example:

"Scaffold an MCP server that searches a Postgres
 database of products and returns matches as JSON."

The client calls scaffold_mcp_server, and you get a complete project back in the conversation — review the TODOs, drop in your credentials, build, and connect it like any other MCP server.

The Scaffolder runs locally and uses your API key — each call is a real Claude request billed to your account. Generated code is a strong starting point, not a finished product: read it before you run it.