mcp-patterns

mcp-patterns is a skill for Claude Code, Codex from yonatangross/orchestkit. It costs 56 tokens per session (3,370 once invoked), scanned A, original, MIT.

A guide to building and securing MCP servers, which connect AI assistants to tools and data. It covers tool handlers, communication methods, authentication, user interfaces, and security practices.

In plain words
What is it for?
Use it to build MCP servers, add OAuth login, choose a transport, connect MCP Apps interfaces, harden security, and debug integrations.
Why use it?
It helps developers create reliable connections between assistants and external systems while reducing integration and security mistakes.

Skill for Claude CodeCodex

Part of the ork plugin — 68 skills, 35 commands, 36 agents, 32 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/yonatangross/orchestkit/mcp-patterns
Any agent
npx skills add yonatangross/orchestkit --skill mcp-patterns
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit

Made for: Claude Code, Codex.

Or install ork, the plugin that ships this one along with the rest of its 68 skills, 35 commands, 36 agents, 32 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/yonatangross/orchestkit/mcp-patterns.svg)](https://agentmods.dev/skills/yonatangross/orchestkit/mcp-patterns)
Your own site
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/mcp-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/mcp-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,370 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00056 $0.03370
Opus 5 $0.00028 $0.01685
Sonnet 5 $0.00011 $0.00674
Haiku 4.5 $0.00006 $0.00337

Measured yesterday against content hash 84df0996111a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ork/skills/mcp-patterns/SKILL.md · 225 lines

How it starts

The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 (claude install 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

What are you building?
│
├── New MCP server
│   ├── Setup & primitives ──────► rules/server-setup.md
│   ├── Transport selection ─────► rules/server-transport.md
│   └── Scaffolding ─────────────► mcp-builder skill (anthropics/skills)
│
├── Authentication & authorization
│   └── OAuth 2.1 + OIDC ───────► rules/auth-oauth21.md
│
├── Advanced server features
│   ├── Tool composition ────────► rules/advanced-composition.md
│   ├── Resource caching ────────► rules/advanced-resources.md
│   ├── Elicitation (user input) ► rules/elicitation.md
│   ├── Sampling (agent loops) ──► rules/sampling-tools.md
│   └── Interactive UI ──────────► rules/apps-ui.md
│
├── Client-side consumption
│   └── Connecting to servers ───► rules/client-patterns.md
│
├── Security hardening
│   ├── Prompt injection defense ► rules/security-injection.md
│   └── Zero-trust & verification ► rules/security-hardening.md
│
├── Testing & debugging
│   └── Inspector + unit tests ──► rules/testing-debugging.md
│
├── Discovery & ecosystem
│   └── Registries & catalogs ──► rules/registry-discovery.md
│
└── Browser-native tools
    └── WebMCP (W3C) ───────────► rules/webmcp-browser.md

Read the full file on GitHub · 225 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 225 lines · 56 tokens per session scan A 84df0996111a

Subscribe to this mod's changes

mcp-patterns is a skill published in the GitHub repository yonatangross/orchestkit (225 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 3,370 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

frontmcp-development

Use when building any FrontMCP server component other than a tool (for tools, use create-tool). Covers @Resource static resources and parameterized URI templates; @Prompt reusable prompts (RAG, multi-turn); @Provider singleton dependency-injection providers (database pools, API clients); @Agent autonomous LLM agents…

agentfront/frontmcp · 196 tokens

model-context

MCP (Model Context Protocol) - Build AI-native servers with tools, resources, and prompts. TypeScript/Python SDKs for Claude Desktop integration.

bobmatnyc/claude-mpm-skills · 34 tokens

mcp-refactoring

Refactoring MCP Tools for Better LLM Integration and Usability.

adeze/raindrop-mcp · 17 tokens

MCP Server Builder

Step-by-step guidance for creating a new MCP server with FastMCP or the TypeScript SDK — tool definitions, resource handlers, error responses, and usage examples.

Notysoty/openagentskills · 38 tokens

security-audit

Use when auditing a web app for security vulnerabilities. Triggers on: 'audit my project', 'how could this get hacked', 'find bugs in this codebase', 'security review', 'pentest', 'bug bounty scope for X', 'GHSA collaborator invite', 'security audit this'. Handles both internal audits (sitting in your own codebase…

msradam/theodosia · 250 tokens

mcp-standards

MCP server standardization patterns for Claude Code plugins. Use when implementing MCP servers, designing tool interfaces, configuring MCP transports, or standardizing MCP naming conventions. Trigger keywords - "MCP", "MCP server", "MCP tools", "MCP transport", "tool naming", "MCP configuration".

MadAppGang/claude-code · 69 tokens