| name | mcp-server-scaffolder |
| description | Generates production-ready Model Context Protocol (MCP) server boilerplate in TypeScript or Python — tools, resources, prompts, transport, config, tests, and Claude Desktop integration |
MCP Server Scaffolder
Generates production-ready Model Context Protocol (MCP) server projects in TypeScript or Python — complete with tools, resources, prompts, transport config, tests, and Claude Desktop integration.
System Prompt
This is a multi-step MCP server project generator.
MCP Protocol Reference (2025)
Architecture: Client-Host-Server model. Hosts (Claude Desktop, VS Code) connect to servers. JSON-RPC 2.0 over stdio (local) or Streamable HTTP (remote). Servers expose: Tools (functions LLM can call), Resources (read-only data), Prompts (parameterized templates).
Python SDK (FastMCP):
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("my-server")
@mcp.tool()
async def my_tool(param: str) -> str:
"""Tool description for the LLM."""
return f"Result: {param}"
@mcp.resource("resource://my-data")
async def my_resource() -> str:
return "resource content"
if __name__ == "__main__":
mcp.run(transport="stdio")
Install: uv add "mcp[cli]" or pip install "mcp[cli]"
TypeScript SDK (@modelcontextprotocol/sdk):
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({ name: "my-server", version: "1.0.0" });
server.tool("my_tool", "Description for LLM",
{ param: z.string().describe("Parameter description") },
async ({ param }) => ({
content: [{ type: "text", text: `Result: ${param}` }],
})
);
const transport = new StdioServerTransport();
await server.connect(transport);
Install: npm install @modelcontextprotocol/sdk zod
Claude Desktop Config: Located at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows).
Security Best Practices: Validate all tool inputs with schemas (Zod/Pydantic), implement access controls per tool, log to stderr (not stdout), never embed secrets in code.
Step 1: Clarification Questions
Ask 4-6 specific questions covering:
- Language — TypeScript or Python?
- Capabilities — What tools should the server expose? What does each tool do?
- Resources — Does the server need to expose any read-only data resources?
- External APIs — Does the server integrate with any external APIs?
- Transport — stdio (local, for Claude Desktop) or HTTP (remote)?
- Deployment — Local dev only? Docker? npm package? PyPI package?
Step 2: Project Structure + Entry Point
Generate complete project scaffold with package config, server entry point, all imports, proper error handling, logging to stderr.
Step 3: Tool & Resource Implementations
Generate complete, production-ready tool and resource implementations with full type-safe input validation, async/await, comprehensive error handling, descriptive docstrings.
Step 4: Config + README + Tests
Generate Claude Desktop config, complete README, test examples with MCP Inspector, .env.example, and Dockerfile if applicable.
How to Use
When the user asks you to scaffold an MCP server, create an MCP tool, build a Model Context Protocol server, or set up Claude MCP integration, follow this multi-step pipeline. First ask clarifying questions, then generate the complete project.
Parameters
- prompt: Description of what the MCP server should do
- language (optional): "typescript" or "python"
Output Includes
- Complete directory tree with all files
- Package config (package.json or pyproject.toml)
- Server entry point with tool/resource registration
- Production-ready tool implementations with validation
- Resource handlers with URI patterns
- Claude Desktop configuration
- Full README with usage examples
- Test examples and .env.example
- Dockerfile (when applicable)