mcp-server-patterns
Learn to construct MCP servers using the Node/TypeScript SDK, implementing tools for model invocation, resources for data access, and prompt templates. This skill covers registration patterns, transport selection between stdio for local clients and Streamable HTTP for remote, and validation best practices with Zod.
mcp-server-patterns teaches you to build MCP servers with Node/TypeScript, covering tools, resources, prompts, and transport choices.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-27
mcp-server-patterns teaches you to build MCP servers with Node/TypeScript, covering tools, resources, prompts, and transport choices. Learn to construct MCP servers using the Node/TypeScript SDK, implementing tools for model invocation, resources for data access, and prompt templates. This skill covers registration patterns, transport selection between stdio for local clients and Streamable HTTP for remote, and validation best practices with Zod.
Use it when
- mcp-server-patterns explains that stdio transport connects MCP servers directly to local clients like Cursor through standard input/output.
- mcp-server-patterns covers tool registration by defining handlers that respond to tool_call requests.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
affaan-m/ECC/mcp-server-patterns · repository language: JavaScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I set up an MCP server with Node.js?
mcp-server-patterns teaches you to build MCP servers using the Node/TypeScript SDK. Start by initializing a project, importing the Server class, defining tools with input schemas, and choosing your transport layer—stdio for local Cursor integration or Streamable HTTP for remote clients. The skill covers registration patterns and best practices for structuring your server code.
What's the difference between MCP stdio vs HTTP transport?
mcp-server-patterns explains that stdio transport connects MCP servers directly to local clients like Cursor through standard input/output, ideal for development. HTTP transport, specifically Streamable HTTP, enables remote client connections and is better for distributed setups. Your choice depends on whether you need local or remote access to your server's tools and resources.
How do I register tools in an MCP server?
mcp-server-patterns covers tool registration by defining handlers that respond to tool_call requests. You specify tool names, descriptions, and input schemas using Zod for validation. When a client invokes a tool, your handler processes the input and returns results. The skill shows patterns for organizing multiple tools and handling both simple and complex tool implementations.
How can I validate MCP tool inputs with Zod schemas?
mcp-server-patterns demonstrates using Zod schemas to define and validate tool input parameters. Define your schema with Zod's type system, attach it to your tool definition, and let the SDK validate incoming requests. This approach catches errors early and ensures type safety. The skill includes error handling patterns for validation failures and best practices for schema design.
What are MCP resources and prompt templates?
mcp-server-patterns teaches that MCP resources provide data access through URI-based handlers—clients request resources and your server returns content. Prompt templates are reusable instruction sets that guide model behavior. Both extend your server's capabilities beyond tools. The skill covers implementing resource handlers, managing URIs, and creating effective prompt templates for Claude and other models.
How do I debug MCP registration and SDK version issues?
mcp-server-patterns addresses debugging by explaining SDK API changes, version compatibility, and registration validation. Check your server's capabilities declaration, verify tool and resource handlers are properly attached, and use logging to trace requests. The skill covers common pitfalls like mismatched schemas and outdated SDK patterns, plus strategies for upgrading to newer MCP SDK versions.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
MCP Server Patterns
The Model Context Protocol (MCP) lets AI assistants call tools, read resources, and use prompts from your server. Use this skill when building or maintaining MCP servers. The SDK API evolves; check Context7 (query-docs for "MCP") or the official MCP documentation for current method names and signatures.
For the broader routing decision of when a capability should be a rule, a skill, MCP, or a plain CLI/API workflow, see docs/capability-surface-selection.md.
When to Use
Use when: implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, upgrading the SDK, or debugging MCP registration and transport issues.
How It Works
Core concepts
- Tools: Actions the model can invoke (e.g. search, run a command). Register with
registerTool()ortool()depending on SDK version. - Resources: Read-only data the model can fetch (e.g. file contents,
(truncated - see the full file via the links below)
File tree — 1 file
skills/mcp-server-patterns/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Build or extend an MCP server with tools, resources, and prompts”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Create MCP servers that expose capabilities to AI clients through a structured development process covering tool definition, resource management, prompt templates, and transport configuration. The skill guides you through design decisions, implementation patterns, security hardening, and testing to deploy servers ready for CLI and web environments.
mcp-developer is a specialist skill for constructing Model Context Protocol servers and clients that bridge AI systems with external tools and data. It guides you through project initialization, schema design with Zod or Pydantic, tool and resource implementation, transport configuration (stdio/HTTP/SSE), and protocol validation using the MCP inspector. Use it to scaffold complete implementations in TypeScript or Python, debug JSON-RPC compliance, and deploy production-ready integrations.
A production-ready template for building remote MCP servers with GitHub OAuth authentication on Cloudflare Workers. It includes modular tool architecture, role-based access control, dual transport protocols (HTTP and SSE), PostgreSQL integration with SQL injection protection, and optional Sentry monitoring.
Learn to develop Model Context Protocol servers across TypeScript, Python, and C# with support for tools, resources, and prompts. This guide covers Streamable HTTP transport configuration, OAuth authentication, and migration from deprecated SSE endpoints.
mcp-builder covers the essentials of building Model Context Protocol servers, from project structure and transport selection to tool and resource design. It walks through input validation, error handling, multimodal support, and configuration patterns for both local and remote deployments. Follow the included checklist to ensure your server is well-documented, secure, and ready for production use.
mcp guides you through building or consuming Model Context Protocol servers and clients in .NET using the official C# SDK. It covers package selection, transport configuration (stdio for local processes, HTTP for remote endpoints), and capability negotiation patterns. Use this skill when you need protocol interoperability; reach for other tools if you only need model abstraction or agent orchestration without the MCP wire protocol.
More skills Mcp Builder (unlicensed) · mcp-development (Apache-2.0) · mcp-builder (MIT)