/web:mcp-server-patternsfrom web
Guides building MCP servers with Node/TypeScript SDK — implementing tools, resources, prompts, Zod validation, and choosing between stdio and Streamable HTTP transports. Use when writing, extending, or debugging MCP servers.
Ships in web. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Model Context Protocol (MCP) lets AI assistants call tools, read resources, and use prompts from your server. Use this skill when building or maintaining MCP servers. The SDK API evolves; check Context7 (query-docs for "MCP") or the official MCP documentation for current method names and signatures.
Use when: implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, upgrading the SDK, or debugging MCP registration and transport issues.
registerTool() or tool() depending on SDK version.registerResource() or resource(). Handlers typically receive a uri argument.registerPrompt() or equivalent.The Node/TypeScript SDK may expose tool() / resource() or registerTool() / registerResource(); the official SDK has changed over time. Always verify against the current MCP docs or Context7.
For local clients, create a stdio transport and pass it to your server’s connect method. The exact API varies by SDK version (e.g. constructor vs factory). See the official MCP documentation or query Context7 for "MCP stdio server" for the current pattern.
Keep server logic (tools + resources) independent of transport so you can plug in stdio or HTTP in the entrypoint.
For Cursor, cloud, or other remote clients, use Streamable HTTP (single MCP HTTP endpoint per current spec). Support legacy HTTP/SSE only when backward compatibility is required.
Two official release lines exist (both from modelcontextprotocol/typescript-sdk):
@modelcontextprotocol/server (build servers) and @modelcontextprotocol/client.
Tool/prompt schemas use Standard Schema — Zod v4,
Valibot, or ArkType all work. Thin runtime adapters ship separately:
@modelcontextprotocol/node / express / fastify / hono. Start new
servers here; follow the v2 docs at https://ts.sdk.modelcontextprotocol.io/v2/
for current API signatures rather than copying v1 snippets.@modelcontextprotocol/sdk package (1.x). Not
deprecated — it receives bug fixes for at least 6 months after v2's release —
so existing v1 servers keep working and need no urgent migration.The v1 setup below is kept for maintaining existing servers:
npm install @modelcontextprotocol/sdk zod
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
const server = new McpServer({ name: "my-server", version: "1.0.0" });
Register tools and resources using the API your SDK version provides: some versions use server.tool(name, description, schema, handler) (positional args), others use server.tool({ name, description, inputSchema }, handler) or registerTool(). Same for resources — include a uri in the handler when the API provides it. Check the official MCP docs or Context7 for the current @modelcontextprotocol/sdk signatures to avoid copy-paste errors.
Use Zod (or the SDK’s preferred schema format) for input validation.
@modelcontextprotocol/server + @modelcontextprotocol/client; v1 @modelcontextprotocol/sdk (npm). Use Context7 with library name "MCP" for current registration and transport patterns.modelcontextprotocol/go-sdk).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub davie521/claude-skills --plugin web6 skills in this plugin
/api-designREST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, or deciding between status codes, pagination styles, or versioning strategies./bun-runtimeBun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support./content-hash-cache-patternCache expensive file processing results using a composite key of SHA-256 content hash plus processor version and config — path-independent, auto-invalidating, with service layer separation. Use when caching costly file-processing outputs (PDF parsing, OCR, text extraction, image analysis) that recur across runs and the cache must survive file moves/renames while auto-invalidating on content change./deployment-patternsDeployment strategies (rolling, blue-green, canary), CI/CD pipeline patterns, health checks and Kubernetes probes, rollback playbooks, and production readiness checklists for web applications. Use when planning a release, setting up CI/CD, or preparing rollback. Dockerfile and Compose specifics live in docker-patterns./docker-patternsDocker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration. Use when writing Dockerfiles or compose files, hardening images, or debugging container networking and volume issues.