build-mcp-sdk-v2

Installation
SKILL.md

Build MCP SDK v2

Build and maintain MCP servers using the v2 split-package SDK: @modelcontextprotocol/server, @modelcontextprotocol/client, @modelcontextprotocol/core. Node.js 20+, ESM-only, Zod v4. Released Q1 2026, community adoption still early.

When to use a different skill instead:

  • @modelcontextprotocol/sdk (single package) in package.json → use build-mcp-sdk
  • Handlers use (args, extra) with extra.sendNotification / extra.authInfo → that's v1, use build-mcp-sdk
  • Uses the mcp-use wrapper library → use build-mcp-use-server

How to detect v2: Look for split package imports (@modelcontextprotocol/server, @modelcontextprotocol/client), handlers using (args, ctx) with ctx.mcpReq.log() / ctx.mcpReq.signal, and "type": "module" in package.json.

Core rules:

  • Always use McpServer from @modelcontextprotocol/server — the Server class is deprecated
  • Always use registerTool / registerResource / registerPrompt — positional overloads removed
  • Always use Zod v4 full schemas (z.object({...})) — raw shapes not accepted in v2
  • Always use NodeStreamableHTTPServerTransport from @modelcontextprotocol/node for HTTP
  • Server-side OAuth is removed — use better-auth or a dedicated auth library
Related skills
Installs
2
GitHub Stars
6
First Seen
Apr 10, 2026