skillfed

mcp-patterns

A reference guide to building production-ready MCP servers with patterns for transport selection, OAuth authentication, tool composition, and security hardening. Covers 14 decision rules across server setup, advanced features, client integration, and ecosystem discovery, grounded in the latest stable specification.

mcp-patterns teaches secure MCP server design through 14 reference rules covering transport, authentication, composition, and security hardening.

AI-generated summary based on this skill's SKILL.md

208 20 MIT updated by yonatangross

Install

yonatangross/orchestkit/mcp-patterns · repository language: TypeScript

git clone https://github.com/yonatangross/orchestkit
cp -r orchestkit/src/skills/mcp-patterns ~/.claude/skills/mcp-patterns
npx skillfed install yonatangross/orchestkit/mcp-patterns

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What are the best practices for building secure MCP servers?

mcp-patterns provides patterns for building production-ready MCP servers with security hardening as a core focus. The guide covers OAuth authentication implementation, prompt injection defense, zero-trust security principles, and tool handler patterns. It includes 14 decision rules for secure server setup, authentication best practices, and hardening strategies to protect against common vulnerabilities in Model Context Protocol implementations.

How do I implement OAuth and authentication in MCP?

mcp-patterns details OAuth implementation and authentication best practices for MCP servers. The reference covers authentication patterns, secure credential handling, and integration strategies. It guides you through implementing OAuth flows, managing tokens, and applying zero-trust security principles to ensure your MCP server enforces proper access controls and protects sensitive operations.

What patterns exist for MCP server patterns and best practices?

mcp-patterns is a comprehensive reference covering 14 decision rules for MCP server development. It addresses transport selection (stdio vs HTTP), tool composition patterns, resource caching strategies, and advanced features. The guide includes FastMCP server setup, MCP Apps UI implementation, sampling and agent loop patterns, and testing/debugging approaches grounded in the latest stable specification.

How do I debug MCP integrations and troubleshoot connectivity?

mcp-patterns includes debugging and troubleshooting guidance for MCP integrations. It covers server connectivity issues, testing patterns, and diagnostic approaches. The reference helps you identify and resolve integration problems through structured debugging techniques, server testing strategies, and best practices for validating MCP client-server communication.

What transport should I choose for my MCP deployment?

mcp-patterns guides transport selection decisions for MCP servers, comparing stdio and HTTP approaches. The reference covers deployment strategy patterns, helping you evaluate tradeoffs between different transport mechanisms based on your use case, scalability requirements, and integration context. It includes decision rules for choosing the appropriate transport for production environments.

What advanced MCP features like tool composition should I know?

mcp-patterns covers advanced MCP features including tool composition, resource caching patterns, and agent loop sampling. The guide explains how to compose tools effectively, implement caching strategies for performance, and handle user input elicitation. It provides patterns for building sophisticated MCP servers that leverage advanced protocol capabilities within the latest stable specification.

SKILL.md

rendered from the published skill — quoted content, verbatim

MCP Patterns

Patterns for building, composing, and securing Model Context Protocol servers. Based on the 2025-11-25 specification — the latest stable release maintained by the Agentic AI Foundation (Linux Foundation), co-founded by

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 15 files
src/skills/mcp-patterns/SKILL.md
src/skills/mcp-patterns/checklists/mcp-server-checklist.md
src/skills/mcp-patterns/references/mcp-audit-runbook.md
src/skills/mcp-patterns/references/mcp-version-matrix.md
src/skills/mcp-patterns/rules/_sections.md
src/skills/mcp-patterns/rules/_template.md
src/skills/mcp-patterns/rules/advanced-composition.md
src/skills/mcp-patterns/rules/advanced-resources.md
src/skills/mcp-patterns/rules/apps-ui.md
src/skills/mcp-patterns/rules/auth-oauth21.md
src/skills/mcp-patterns/rules/client-patterns.md
src/skills/mcp-patterns/rules/elicitation.md
src/skills/mcp-patterns/rules/registry-discovery.md
src/skills/mcp-patterns/rules/sampling-tools.md
src/skills/mcp-patterns/rules/security-hardening.md

Related skills

Tags

protocol-architecture server-implementation authentication-flow threat-mitigation transport-layer composition-patterns caching-strategy interactive-ui testing-framework ecosystem-integration