build-mcp-sdk-v2
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) inpackage.json→ usebuild-mcp-sdk- Handlers use
(args, extra)withextra.sendNotification/extra.authInfo→ that's v1, usebuild-mcp-sdk - Uses the
mcp-usewrapper library → usebuild-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
McpServerfrom@modelcontextprotocol/server— theServerclass 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
NodeStreamableHTTPServerTransportfrom@modelcontextprotocol/nodefor HTTP - Server-side OAuth is removed — use
better-author a dedicated auth library
More from yigitkonur/skills-by-yigitkonur
run-research
Use skill if you are answering one technical research question with current web evidence, Reddit practitioner experience, and source-backed synthesis, optionally fanned out across parallel subagents.
42run-agent-browser
Use skill if you are driving the agent-browser CLI for ad hoc browser automation — @ref snapshots, sessions, forms, extraction, screenshots, headed/stealth, or provider runs.
38publish-npm-package
Use skill if you are publishing to npm via GitHub Actions release workflow with trusted publishing, NPM_TOKEN, provenance, semantic-release, changesets, release-please, or fixing npm publish CI.
35build-mcp-use-server
Use skill if you are building TypeScript MCP servers with mcp-use/server — server.tool, response helpers, ctx.auth, sessions, transports, widgets, Inspector, deploy.
34init-agent-config
Use skill if you are creating, auditing, or migrating CLAUDE.md, AGENTS.md, or REVIEW.md instruction files, folder-scoped agent guidance, or cross-agent companion entrypoints.
34build-skills
Use skill if you are creating or substantially revising a Claude skill and need workspace-first evidence, remote comparison, and repo-fit synthesis before writing SKILL.md.
32