mcp-builder
Create a new MCP server — clarify purpose, choose transport, scaffold, implement, test, and register
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create a new MCP server — clarify purpose, choose transport, scaffold, implement, test, and register
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Health check procedures D1–D14 for the Audit agent — structural validation, attention budget, version checks, workspace integrity, and static audit
Configure and manage Model Context Protocol servers for external tool access
Review a UI for accessibility — WCAG 2.1 AA compliance, semantic HTML, ARIA usage, keyboard navigation, focus management, colour contrast, and screen reader compatibility
Design or review a REST or GraphQL API — resource modeling, versioning strategy, error contract, OpenAPI/schema-first workflow, and security baseline
Generate a CHANGELOG.md entry from staged changes, a commit range, or a PR diff — following Keep a Changelog format with conventional commit classification
Set up and audit environment variable management — create .env.example, add startup validation, separate secrets from config, and document every variable
| name | mcp-builder |
| description | Create a new MCP server — clarify purpose, choose transport, scaffold, implement, test, and register |
| compatibility | >=2.0 |
Skill metadata: version "1.2"; license MIT; tags [mcp, server, tool, integration, scaffold]; compatibility ">=2.0"; recommended tools [codebase, editFiles, runCommands].
Build a new MCP server: clarify purpose, choose transport, scaffold, implement tools/resources, test, and register in .vscode/mcp.json.
Ask the user: what capability, what tools (1–5 with descriptions), what resources (if any), and what credentials (environment variables)?
| Transport | When to use | Trade-offs |
|---|---|---|
| stdio (default) | Local servers, same machine | Simplest, no network config, most secure |
| SSE | Remote/shared team servers | Requires HTTPS in production |
| Streamable HTTP | Latest MCP spec targets | Newest, best for stateless ops |
Choose language by project stack.
TypeScript (recommended):
mkdir -p .mcp-servers/<server-name> && cd .mcp-servers/<server-name>
npm init -y && npm install @modelcontextprotocol/sdk zod
npm install --save-dev tsx typescript @types/node
Entry point src/index.ts:
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: "<server-name>", version: "1.0.0" });
// Tools registered in Step 4
const transport = new StdioServerTransport();
await server.connect(transport);
Python:
mkdir -p .mcp-servers/<server-name> && cd .mcp-servers/<server-name>
uv init && uv add mcp
For each tool: define input schema (Zod/Pydantic), implement handler, register:
server.tool(
"<tool-name>",
"<one-sentence description>",
{ param: z.string().describe("what this parameter does") },
async ({ param }) => {
return { content: [{ type: "text", text: result }] };
}
);
Rules: one tool = one action, validate all inputs with schemas, return structured content (text or JSON), handle errors gracefully (return error content, don't throw).
npx @modelcontextprotocol/inspector tsx .mcp-servers/<server-name>/src/index.ts
Python: npx @modelcontextprotocol/inspector python .mcp-servers/<server-name>/main.py
Verify: server starts, all tools appear in inspector, each executes correctly with sample inputs, error cases return meaningful messages.
| Capability | Purpose | VS Code access |
|---|---|---|
| Resources | Read-only data context (schemas, docs) | Chat → Add Context → MCP Resources |
| Prompts | Pre-configured prompt templates | /<server>.<prompt> in chat |
| MCP Apps | Interactive UI (forms, visualisations) | Inline in chat |
Add resources when the server has reference data. Add prompts for common task patterns. Consider MCP Apps (@modelcontextprotocol/ext-apps SDK) for interactive output.
.vscode/mcp.json{
"<server-name>": {
"type": "stdio",
"command": "npx",
"args": ["tsx", ".mcp-servers/<server-name>/src/index.ts"],
"env": { "API_KEY": "${env:SERVER_NAME_API_KEY}" }
}
}
For production, compile TypeScript first (npx tsc) and reference compiled JS.
Add the server to the Available servers table in .github/skills/mcp-management/SKILL.md. If reusable across projects, consider publishing to an MCP registry.
Create .mcp.json at plugin root (uses mcpServers key, not servers):
{
"mcpServers": {
"<server-name>": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/<server-name>",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"]
}
}
}
For Claude-format plugins, use ${CLAUDE_PLUGIN_ROOT}. For OpenPlugin plugins, replace it with ${PLUGIN_ROOT}. Copilot-format plugins do not currently document a plugin-root token in VS Code, so prefer Claude or OpenPlugin format when the server path must resolve inside the plugin directory. Plugin MCP servers start on enable and are implicitly trusted.
initialize.vscode/mcp.json is valid JSON with the new server entry