MCP Scaffolder Skill
When the user describes an MCP server they want to build, scaffold it completely.
What to Generate
- Folder structure
- /src/index.ts — server entry point
- /src/tools/ — one file per tool
- /package.json — with @modelcontextprotocol/sdk dependency
- /tsconfig.json — standard TS config
- /.env.example — all required env vars documented
- /README.md — setup instructions
- Server entry point (src/index.ts)
- Import and register all tools
- Set transport based on user intent:
- stdio → local tools, file system access, CLI utilities
- HTTP → remote servers, cloud APIs, services
- Include server instructions field — used by Claude Code tool search
- Tool definitions
- Each tool gets its own file in /src/tools/
- Include: name, description, inputSchema (zod or JSON Schema)
- Add JSDoc comments explaining what the tool does and when Claude should call it
- Claude Code config snippet
Always output a ready-to-paste config block:
For stdio:
{
"mcpServers": {
"": {
"type": "stdio",
"command": "node",
"args": ["/build/index.js"],
"env": { "": "your-value-here" }
}
}
}
For HTTP:
{
"mcpServers": {
"": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}
- README
- What the server does
- Prerequisites
- All env vars with descriptions
- Build and run instructions
- How to add to Claude Code
Rules
- Never use SSE transport — it is deprecated, use HTTP instead
- Always include the server instructions field in the entry point
- Keep tool descriptions specific — Claude Code uses these for tool search
- Flag any required env vars in .env.example with a comment explaining what they are for
- Use TypeScript by default unless user specifies otherwise