mcp-server-patterns

Implements Node/TypeScript MCP servers with Zod validation and stdio or Streamable HTTP transport.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/sumeetonline90/fitup_all --skill mcp-server-patterns-sumeetonline90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-server-patterns
Source: https://github.com/sumeetonline90/fitup_all/tree/main/.cursor/.agents/skills/mcp-server-patterns
Command: npx skills add https://github.com/sumeetonline90/fitup_all --skill mcp-server-patterns-sumeetonline90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the frustration of implementing broken MCP servers due to frequent changes in the Node/TypeScript SDK API, which often renders outdated registration and transport patterns unusable.

Core Features & Use Cases

  • Tool, Resource & Prompt Registration: Provides up-to-date patterns for registering all MCP server components with the Node/TypeScript SDK, including Zod-based input validation for type-safe schemas.
  • Transport Configuration: Guides setup for stdio transport for local clients like Claude Desktop, and Streamable HTTP for remote clients like Cursor, with notes on legacy HTTP/SSE backward compatibility.
  • Use Case: A developer building an internal AI assistant can use this Skill to quickly implement a server that exposes a custom tool for querying company documentation, without wasting time debugging SDK version mismatches.

Quick Start

Use the mcp-server-patterns skill to build a new MCP server with a validated tool that fetches data from your internal API.

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 with Node and TypeScript?

To build an MCP server with Node and TypeScript, you need to implement correct tool, resource, and prompt registration using the Node/TypeScript SDK, alongside configuring a valid transport layer like stdio or Streamable HTTP. This ensures your server is compatible with MCP clients.

Why does my Model Context Protocol server break after updating the Node SDK?

Your Model Context Protocol server breaks because frequent API changes in the Node/TypeScript SDK often render outdated registration and transport patterns unusable. Using version-agnostic implementation patterns prevents this breakage and maintains compatibility across updates.

How do I validate input schemas for MCP tools using Zod?

To validate input schemas for MCP tools using Zod, you apply Zod-based input validation when registering your tools, resources, and prompts. This provides type-safe schemas for your Model Context Protocol server implementation within the Node/TypeScript environment.

What is the best way to configure MCP server transport for Claude Desktop and Cursor?

The best way to configure MCP server transport is to use stdio transport for local clients like Claude Desktop, and Streamable HTTP for remote clients like Cursor. This approach also provides backward compatibility notes for legacy HTTP/SSE connections.

Can I expose internal data resources to AI assistants using an MCP server?

Yes, you can expose internal data resources to AI assistants by building a custom MCP server that registers specific data resources. This allows MCP-compatible clients to securely query internal APIs or company documentation through the server.

Do I need TypeScript to create reusable prompt templates for MCP clients?

You do not strictly need TypeScript, but using the Node/TypeScript SDK to create reusable prompt templates for MCP clients provides type-safe schemas via Zod. This ensures robust registration and prevents runtime errors when templates are accessed.