build-mcp-sdk

Installation
SKILL.md

Build MCP SDK

Build and maintain MCP servers using @modelcontextprotocol/sdk v1.x (single package, Zod-based, protocol version 2025-11-25). Covers McpServer, registerTool, registerResource, registerPrompt, transports, OAuth 2.1, sessions, and deployment.

When to use a different skill instead:

  • Imports from @modelcontextprotocol/server (split packages) → use build-mcp-sdk-v2
  • Handlers use ctx.mcpReq instead of flat extra → use build-mcp-sdk-v2
  • Uses the mcp-use wrapper library → use build-mcp-use-server
  • Auditing/optimizing an existing server → use optimize-mcp-server

How to detect v1: @modelcontextprotocol/sdk (single package) in package.json. Handlers use (args, extra) with extra.sendNotification, extra.authInfo, extra.signal at the top level.

Core rules:

  • Always use McpServer — the Server class is deprecated for direct use
  • Always use registerTool / registerResource / registerPrompt — positional tool() / resource() / prompt() overloads are deprecated
  • Always use zod for input/output schemas — the SDK converts them to JSON Schema 2020-12 automatically
  • Always use StreamableHTTPServerTransport for HTTP — SSEServerTransport is deprecated
Related skills
Installs
4
GitHub Stars
6
First Seen
Apr 10, 2026