Agent skill · software engineering · yonatangross

mcp-patterns

MCP server building, advanced patterns, and security hardening. Use when building MCP servers, implementing tool handlers, choosing a transport, adding OAuth authentication, wiring MCP Apps UI with @mcp-ui, hardening MCP security, or debugging MCP integrations.

Why this skill is useful

Provides advanced patterns and security hardening techniques for MCP server development that are not widely known.

What it needs

Requires mcp installed locally. About 7k tokens when loaded. Last updated 2026-08-06. 215 stars on the source repository.

What this skill does

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 Anthropic, Block, and OpenAI. Scaffolding a new server? Use Anthropic's mcp-builder skill (from the anthropics/skills marketplace: /plugin marketplace add anthropics/skills) for project setup and evaluation creation. This skill focuses on patterns, security, and advanced features after initial setup. Deploying to Cloudflare? See the building-mcp-server-on-cloudflare skill for Workers-specific deployment patterns. Pin mcp<2 until you migrate. Every Python snippet in this skill targets the v1 SDK (from mcp.server.fastmcp import FastMCP). The Python SDK released 2.0.0, pip install mcp now resolves to it, and upstream's own README says to keep a <2 upper bound on your requirement until you have migrated. FastMCP does not appear anywhere in the 2.0 README, so treat these snippets as v1-only rather than assuming they still apply. v1.x continues to receive critical bug and security fixes on its own branch. Verified 2026-07-31. Migration guide: https://py.sdk.modelcontextprotocol.io/migration/ Decision Tree — Which Rule to Read Quick Reference Category Rule Impact Key Pattern ---------- ------ -------- ------------- Server server-setup.md HIGH FastMCP lifespan, Tool/Resource/Prompt primitives Server server-transport.md HIGH stdio for CLI, Streamable HTTP for production Auth auth-oauth21.md HIGH PKCE, RFC 8707 resource indicators, token validation Advanced advanced-composition.md MEDIUM Pipeline, parallel, and branching tool composition Advanced advanced-resources.md MEDIUM Resource caching with TTL, LRU eviction, lifecycle Advanced elicitation.md MEDIUM Server-initiated structured input from users Advanced sampling-tools.md MEDIUM Server-side agent loops with tool calling Advanced apps-ui.md MEDIUM Interactive UI via MCP Apps + @mcp-ui/ SDK Clien …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills yonatangross/mcp-patterns--c35df8

View the source on GitHub

Browse the @skills marketplace