mcp-server-patterns

Build and maintain MCP servers with Node/TypeScript SDK and configurable transports.

1|Updated Jan 30, 2021
One-click install
npx skills add https://github.com/fideguch/my_dotfiles --skill mcp-server-patterns-fideguch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-server-patterns
Source: https://github.com/fideguch/my_dotfiles/tree/main/claude/skills/mcp-server-patterns
Command: npx skills add https://github.com/fideguch/my_dotfiles --skill mcp-server-patterns-fideguch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MCP servers enable AI-assisted tools, resources, and prompts to be called from an external server, standardizing interactions and improving integration fidelity.

Core Features & Use Cases

  • Tools: register actions the model can invoke.
  • Resources: expose read-only data and responses to the model.
  • Prompts: reusable templates surfaced by the client.
  • Transport: choose stdio for local use or Streamable HTTP for remote clients.
  • Use Case: building a new MCP server, debugging registration, or upgrading the SDK.

Quick Start

Create a new MCP server using the Node/TypeScript SDK and register a sample tool.

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, use the MCP SDK to define schemas with Zod and register tools, resources, and prompts for AI clients to invoke.

What is the difference between stdio and Streamable HTTP transports in MCP servers?

MCP server transports differ by deployment target: use stdio for local client interactions or Streamable HTTP to expose your server's tools and resources to remote clients.

How do I register tools and resources in a TypeScript MCP server?

Register tools and resources in a TypeScript MCP server by using the Node SDK to define handlers and Zod schemas, aligning with current API signatures to expose actions and read-only data.

Can I use prompt templates in an MCP server?

Yes, you can use prompt templates in an MCP server. The Node/TypeScript SDK allows you to define and surface reusable prompt templates directly to the connected AI client.

How do I debug MCP server registration and SDK upgrades?

Debug MCP server registration and SDK upgrades by aligning your implementation with Context7 or current MCP docs to verify API signatures, transport configurations, and schema definitions.

Do I need Zod schemas to define tools in a Node MCP server?

Yes, using Zod schemas to define tools in a Node MCP server is required. The MCP SDK implementation relies on these schemas to standardize interactions and validate tool invocations.