Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API. Use when building or debugging an MCP server — tools, resources, prompts, validation, or transport choice.
Ships in yus-backend. 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.
For the broader routing decision of when a capability should be a rule, a skill, MCP, or a plain CLI/API workflow, see docs/capability-surface-selection.md.
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().registerResource(); handlers receive the resolved uri.registerPrompt().In @modelcontextprotocol/sdk 1.x the register* methods are current; the older positional tool(), resource() and prompt() are deprecated. Check the MCP docs or Context7 when you pin a different major.
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
await server.connect(new StdioServerTransport());
A stdio server owns stdout for protocol messages: log to stderr (console.error), never console.log.
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) through StreamableHTTPServerTransport from @modelcontextprotocol/sdk/server/streamableHttp.js. The SSE transport is deprecated; support it only for old clients.
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" });
server.registerTool(
"search_issues",
{
title: "Search issues",
description: "Search open issues by text. Returns at most `limit` results.",
inputSchema: { query: z.string().min(1), limit: z.number().int().max(50).default(10) },
},
async ({ query, limit }) => {
const issues = await searchIssues(query, limit);
return { content: [{ type: "text", text: JSON.stringify(issues) }] };
},
);
server.registerResource(
"config",
"config://app",
{ title: "App config", mimeType: "application/json" },
async (uri) => ({ contents: [{ uri: uri.href, text: JSON.stringify(await loadConfig()) }] }),
);
inputSchema is a shape of Zod fields, not a z.object(). Report a failure the model should see with { isError: true, content: [...] } instead of throwing.
@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
Other plugins' skills for the same job
/yus-backend:mcp-server-patternsfrom yus-backend
npx claudepluginhub yusei21/yus --plugin yus-backend29 skills in this plugin
/api-connector-builderBuild a new API connector or provider by matching the target repo's existing integration pattern exactly. Use when adding one more integration without inventing a second architecture./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, resource names, status codes, pagination, or versioning./backend-patternsBackend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes. Use when building or reviewing Node.js, Express, or Next.js API routes and their data access./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 SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation. Use when repeated file processing is slow and results should be cached and invalidated by content rather than path./contract-firstCoordinate frontend/backend or service-to-service work through one authoritative machine-checkable contract (OpenAPI, AsyncAPI, Protocol Buffers, or JSON Schema), with generated consumer types and contract-verified integration. Use when parallel consumer and provider work must evolve an API or event schema without field drift, mock/production shape mismatch, or one side silently redefining the interface.3 plugins in one repository ship this exact skill · first indexed Nov 17, 2026