# MCP Scaffolder Skill
When the user describes an MCP server they want to build, scaffold it completely.
什么 到 Generate
- /src/索引.ts — server entry point
- /src/tools/ — one file per tool
- /包.json — 带有 @modelcontextprotocol/sdk dependency
- /tsconfig.json — standard TS 配置
- /.env.示例 — 所有 必填 env vars documented
- /README.md — setup instructions
- Server entry point (src/索引.ts)
- 导入 和 注册 所有 tools
- 设置 transport based 在...上 用户 intent:
- stdio → local tools, file system access, CLI utilities
- HTTP → remote servers, cloud APIs, services
- Include server instructions 字段 — used 由 Claude Code tool 搜索
- 每个 tool gets own file 在...中 /src/tools/
- Include: name, description, inputSchema (zod 或 JSON Schema)
- 添加 JSDoc comments explaining 什么 tool 做 和 当...时 Claude 应该 call
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"
}
}
}
- 什么 server 做
- Prerequisites
- 所有 env vars 带有 descriptions
- Build 和 run instructions
- 如何 到 添加 到 Claude Code
Rules
- Never 使用 SSE transport — deprecated, 使用 HTTP 代替
- Always include server instructions 字段 在...中 entry point
- Keep tool descriptions specific — Claude Code uses these 对于 tool 搜索
- 标志 任何 必填 env vars 在...中 .env.示例 带有 评论 explaining 什么 它们 对于
- 使用 TypeScript 由 默认 unless 用户 specifies 否则
# MCP Scaffolder Skill
When the user describes an MCP server they want to build, scaffold it completely.
What to Generate
- /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
- 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"
}
}
}
- 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