mcp-server-patterns

Implement Node/TypeScript MCP servers with Zod validation and configurable transports.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill mcp-server-patterns-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-server-patterns
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/mcp-server-patterns
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill mcp-server-patterns-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the confusion and friction of implementing and maintaining Model Context Protocol (MCP) servers in Node/TypeScript, especially when SDK APIs and transport patterns evolve.

Core Features & Use Cases

  • Tool, Resource, and Prompt patterns: Define what the model can do, read, and reuse via server-registered handlers for tools, resources, and parameterized prompts.
  • Transport selection guidance: Choose stdio for local clients and Streamable HTTP for remote clients, with notes on legacy HTTP/SSE compatibility.
  • Schema-first validation with Zod: Ensure tool inputs are validated and predictable to reduce runtime errors when models call your endpoints.

Quick Start

Use this skill to design your MCP server by registering tools, resources, and prompts with Zod schemas, then expose them over stdio for local clients or Streamable HTTP for remote clients.

Frequently Asked Questions about mcp-server-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server in Node and TypeScript?

Schema-first validation with Zod ensures MCP server tool inputs are validated and predictable, reducing runtime errors when AI models call your endpoints by enforcing strict input contracts.

When should I use stdio versus Streamable HTTP for an MCP server?

Use stdio transport for local MCP clients and Streamable HTTP for remote clients, with Streamable HTTP providing better compatibility for network-accessible AI assistant integrations over legacy HTTP/SSE.

How do I define tools, resources, and prompts for an MCP server?

Define MCP server tools, resources, and parameterized prompts through structured server-registered handlers, specifying what the AI model can do, read, and reuse during interactions.

Why use Zod for MCP server tool input validation?

Schema-first validation with Zod ensures MCP server tool inputs are validated and predictable, reducing runtime errors when models call your endpoints by enforcing strict input contracts.

Can I debug transport and registration issues with the Model Context Protocol SDK?

Yes, this approach applies to debugging MCP transport and registration issues by aligning server logic with current Model Context Protocol SDK documentation and transport-agnostic patterns.