mcp-server-patterns

mcp-server-patterns is a skill for Claude Code, Codex from erichare/skillroute. It costs 28 tokens per session (128 once invoked), scanned A, original, MIT.

A set of patterns for building MCP servers with Node and TypeScript. It covers tools, resources, input schemas made with Zod, and communication over standard input and output.

In plain words
What is it for?
Use it when creating or debugging local agent tools, registering MCP tools, or designing integrations whose inputs must be checked.
Why use it?
It provides a structure for keeping an MCP server’s connection code, validation, and main logic organised.

Skill for Claude CodeCodex

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/erichare/skillroute/mcp-server-patterns
Any agent
npx skills add erichare/skillroute --skill mcp-server-patterns
Clone the repo
git clone --depth 1 https://github.com/erichare/skillroute

Made for: Claude Code, Codex.

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-server-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/erichare/skillroute/mcp-server-patterns.svg)](https://agentmods.dev/skills/erichare/skillroute/mcp-server-patterns)
Your own site
<a href="https://agentmods.dev/skills/erichare/skillroute/mcp-server-patterns"><img src="https://agentmods.dev/badge/skills/erichare/skillroute/mcp-server-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 128 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.00028 $0.00128
Opus 5 $0.00014 $0.00064
Sonnet 5 $0.00006 $0.00026
Haiku 4.5 $0.00003 $0.00013

Measured 3d ago against content hash 3843dd74c728, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-server-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 3d ago.

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.

examples/skills/mcp-server-patterns/SKILL.md · 21 lines

What it actually says

MCP Server Patterns

Use this skill when implementing a Model Context Protocol server, wiring stdio transport, registering tools, or designing schema-first agent integrations.

When to Use

  • Build or debug MCP tools for local agents.
  • Add Zod validation for tool inputs.
  • Keep transport setup separate from business logic.

See template.

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 21 lines · 28 tokens per session scan A 3843dd74c728

Subscribe to this mod's changes

mcp-server-patterns is a skill published in the GitHub repository erichare/skillroute (39 stars, last pushed 7d ago), licensed MIT. It adds 28 tokens to every session and 128 once invoked, about $0.0001 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-08-30.

Related

Other skills, from other repositories

docs-writer

Draft or rewrite Strands Agents documentation pages. Use when writing new doc pages, rewriting pages that failed audit, drafting sections for existing pages, or writing blog posts and release notes about Strands. Also triggers on "write a doc", "draft a page", "rewrite the quickstart", "add a tutorial for X"…

strands-agents/harness-sdk · 74 tokens

skill-creator-primer

You MUST load this skill before the skill-creator skill AND before making ANY change to, or conducting a review of ANY Agent Skill. Triggers include creating, editing, reviewing, or contributing to any part of an Agent Skill (description, frontmatter, body, references, scripts, trigger evals, conflicts, etc).

sammcj/agentic-coding · 74 tokens

home-assistant

This skill should be used when helping with Home Assistant setup, including creating automations, modifying dashboards, checking entity states, debugging automations, and managing the smart home configuration. Use this for queries about HA entities, YAML automation/dashboard generation, or troubleshooting HA issues.

sammcj/agentic-coding · 57 tokens

guided-demo

A pattern for adding a self-narrating (typed out) guided walkthrough to any HTML/web application. Use this skill whenever the user wants to add a guided demo, auto-narration, self-running presentation, or step-by-step tour to an HTML page, web app, prototype, HTML slide deck, dashboard, or data story.

sammcj/agentic-coding · 71 tokens

ghostty-config

Use when creating, editing or debugging Ghostty terminal configuration - config.ghostty files, config option names and their valid values, keybinds and key sequences, themes, fonts, shell integration, or ghostty + CLI actions. Covers macOS and Linux/GTK differences.

sammcj/agentic-coding · 62 tokens

web-artifacts-builder-v2

Suite of tools for creating elaborate, multi-component claude.ai HTML artefacts using modern frontend web technologies (React 19, Tailwind CSS v4, shadcn/ui). Use for complex artefacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artefacts.

sammcj/agentic-coding · 73 tokens