mcp-server-patterns

Configure MCP servers for tools, resources, and prompts in Node/TypeScript.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/cescrafli/compyrasion --skill mcp-server-patterns-cescrafli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-server-patterns
Source: https://github.com/cescrafli/compyrasion/tree/main/skills/mcp-server-patterns
Command: npx skills add https://github.com/cescrafli/compyrasion --skill mcp-server-patterns-cescrafli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the construction and maintenance of MCP servers so AI assistants can expose tools, resources, and prompts over stdio or streamable HTTP.

Core Features & Use Cases

  • Tools, Resources, and Prompts: design and register actions, data sources, and reusable templates for client interactions.
  • Transport-Agnostic Architecture: keep server logic independent of transport to switch between stdio locally and HTTP remotely.
  • Use Case: quickly prototype an MCP server for a bot that can search a repository, fetch file contents, and run commands via the registered tools.

Quick Start

Create a new MCP server using the SDK and register a sample tool and resource to verify the 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 an MCP server with Node and TypeScript?

To build an MCP server with Node and TypeScript, you configure server instances using the SDK to expose tools, resources, and prompts for client interactions. This involves registering actions and templates over your chosen transport.

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

The difference between stdio and Streamable HTTP transports lies in their deployment context. Stdio is used for local development, while Streamable HTTP supports remote production workloads, with the server architecture remaining transport-agnostic to switch between them.

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

To register tools, resources, and prompts in an MCP server, you design and register actions, data sources, and reusable templates using the Node/TypeScript SDK. This allows AI clients to call tools, read resources, and use prompts during interactions.

Does the MCP Node SDK support input validation and error handling?

Yes, the MCP Node SDK supports input validation and error handling. When configuring your server, you ensure compatibility with SDK variations to maintain robust operations and handle errors effectively across both local and remote transports.

Can I use the same MCP server logic for local development and production?

Yes, you can use the same MCP server logic for local development and production by maintaining a transport-agnostic architecture. This design allows you to switch between local stdio and remote Streamable HTTP without altering core server logic.