build-mcp-server-sdk-v2

Installation
SKILL.md

Build MCP Server (SDK v2 Alpha)

Build and maintain MCP servers on the v2 alpha split-package SDK: @modelcontextprotocol/server, @modelcontextprotocol/client, @modelcontextprotocol/core, plus /node, /express, /hono adapters. ESM-only, Node 20+, Zod v4. Status as of 2026-05-09: latest npm tag is 2.0.0-alpha.2 — pin exact, plan rollback.

When to use

Trigger this skill if any of these are true:

  • Building a brand-new MCP server and the user picks v2, "the alpha", or split packages.
  • package.json already depends on @modelcontextprotocol/server, @modelcontextprotocol/client, or @modelcontextprotocol/core.
  • Existing code uses new McpServer(...) from @modelcontextprotocol/server and server.registerTool(...) with the high-level API.
  • Tool/resource/prompt handlers use (args, ctx) with ctx.mcpReq.signal, ctx.mcpReq.log(), ctx.mcpReq.notify(), or ctx.http?.authInfo.
  • HTTP work uses NodeStreamableHTTPServerTransport from @modelcontextprotocol/node, or createMcpExpressApp() / createMcpHonoApp() from the official adapters.
  • Schemas are full z.object({...}) from zod/v4, not raw-shape shorthand.

Do NOT use this skill if any of these are true:

  • package.json depends on the single-package @modelcontextprotocol/sdk (v1) — use build-mcp-server-sdk-v1 instead.
  • Handlers use (args, extra) with extra.sendNotification, extra.authInfo, or extra.signal — that is v1; use build-mcp-server-sdk-v1.
Related skills
Installs
19
GitHub Stars
6
First Seen
Apr 22, 2026