mcp-server-patterns

Build MCP servers exposing tools, resources, and prompts with Zod validation.

1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/samymity/bridge-ventures-backend --skill mcp-server-patterns-samymity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-server-patterns
Source: https://github.com/samymity/bridge-ventures-backend/tree/main/.claude/skills/mcp-server-patterns
Command: npx skills add https://github.com/samymity/bridge-ventures-backend --skill mcp-server-patterns-samymity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the challenge of building and maintaining MCP servers by guiding how to structure tools, resources, prompts, validation, and transport so AI clients can reliably call your server.

Core Features & Use Cases

  • Tooling structure: Implement callable actions with clear input schemas and predictable handler behavior.
  • Resource and prompt registration: Expose read-only data (resources) and reusable templates (prompts) so clients can fetch and use server-provided context.
  • Transport guidance: Choose correct connectivity for local clients (stdio) versus remote clients (Streamable HTTP), with notes on legacy compatibility.
  • Validation with Zod: Apply Zod to enforce input correctness and prevent schema drift across SDK upgrades.
  • SDK version drift mitigation: Provide patterns that explicitly account for changing Node/TypeScript SDK APIs by advising verification against official MCP docs.

Quick Start

Ask an AI assistant to outline a TypeScript MCP server that registers one tool with Zod input validation and exposes one resource via Streamable HTTP for a remote client workflow.

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 a TypeScript MCP server with Zod input validation?

To build a TypeScript MCP server, define schema-first tools using Zod for input validation, then implement error-safe handlers to expose callable actions predictably to AI clients across Node SDK versions.

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

Use stdio transport for local client connectivity and Streamable HTTP for remote client workflows, ensuring your MCP server applies the correct connectivity mode for its target environment.

How do I register resources and prompts in an MCP server?

Register resources to expose read-only data and prompts to provide reusable templates, allowing AI clients to fetch server-provided context and structured interactions reliably.

Does the MCP Node SDK API change across versions?

Yes, the MCP Node SDK APIs change across versions, so you must verify current API signatures against official MCP docs or Context7 to mitigate SDK version drift during server upgrades.

What is the best way to prevent schema drift when upgrading MCP servers?

The best way to prevent schema drift when upgrading MCP servers is applying Zod-based input validation with schema-first tool definitions to enforce input correctness across Node SDK versions.