mcp-best-practices

mcp-best-practices is a skill for Claude Code, Codex from tenequm/skills. It costs 60 tokens per session (9,737 once invoked), scanned B, original, MIT.

A practical reference for building and maintaining production MCP servers with the TypeScript SDK. MCP is a standard way for AI clients to call tools provided by other programs.

In plain words
What is it for?
Choosing server connections, defining tool inputs and outputs, adding authentication, handling errors, and updating MCP SDK versions.
Why use it?
It helps resolve design, security, compatibility, error-handling, and performance questions when an MCP server must work reliably in production.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions Claude Code; mentions Codex; built for openclaw.

Good fit Choosing server connections, defining tool inputs and outputs, adding authentication, handling errors, and updating MCP SDK versions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tenequm/skills/mcp-best-practices
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.

Any agent
npx skills add tenequm/skills --skill mcp-best-practices
Clone the repo
git clone --depth 1 https://github.com/tenequm/skills

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-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/tenequm/skills/mcp-best-practices/github.svg)](https://agentmods.dev/skills/tenequm/skills/mcp-best-practices)
Your own site
<a href="https://agentmods.dev/skills/tenequm/skills/mcp-best-practices"><img src="https://agentmods.dev/badge/skills/tenequm/skills/mcp-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/tenequm/skills/mcp-best-practices"><img src="https://agentmods.dev/badge/skills/tenequm/skills/mcp-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,737 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00060 $0.09737
Opus 5.5 $0.00024 $0.03895
Sonnet 5.5 $0.00012 $0.01947
Haiku 4.5 $0.00006 $0.00974

Measured 24d ago against content hash 1a808e44841e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

mcp-best-practices scanned grade B with 2 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 24d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- **v1 stamps every tool schema `"$schema": "http://json-schema.org/draft-07/schema#"`** (still true on 1.32.1), and a strict 2020-12 client rejects the whole tool: *"JSON Schema declares an unsupported dialect ... The d

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request): Promise<Response> {
skills/mcp-best-practices/SKILL.md · 414 lines

How it starts

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

MCP Best Practices

Decision reference for building production MCP servers with the TypeScript SDK. Not a tutorial - assumes you already have a working server and need to make it correct, fast, and secure.

Quick Reference

Component Current Notes
Spec (released) 2026-07-28 (specification) Stateless/sessionless overhaul - see "Spec 2026-07-28" below and references/spec-2026-07-28.md
Spec (still deployed) 2025-11-25 Still the bulk of deployed software and the TS client default - but Claude Code now negotiates 2026-07-28 with HTTP servers that offer it
TS SDK (current) v2.3.1 (2026-10-05): /server, /client, /core 2.3.1; /node 2.1.1, /express + /hono 2.0.2, /fastify 2.0.1 (no longer lockstep) createMcpHandler serves both eras by default; the client speaks 2025-era unless told otherwise
TS SDK (legacy) v1.32.1 (@modelcontextprotocol/sdk) Bug + security fixes for >=6 months after v2 GA, never a revision past 2025-11-25; source on the v1.x branch
JSON Schema 2020-12 default (2019-09 / draft-07 accepted since v2.0.0) -
Transport Streamable HTTP (remote), stdio (local) SSE + WebSocket removed in v2
Extensions MCP Apps (Stable, SEP-1865), Auth Extensions (official), Tasks (ext-tasks) Domain-specific WGs
Registry Preview with v0.1 API freeze since 2025-10-24 (registry) GA pending

v2 imports (current):

import { McpServer } from "@modelcontextprotocol/server";
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/server";
import { ProtocolError, ProtocolErrorCode } from "@modelcontextprotocol/core";

v1 imports (legacy line, still widely deployed):

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

Read the full file on GitHub · 414 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. 24d ago Changed 1a808e44841e
  2. 1mo ago Changed · +15 lines b80d127fd43e
  3. 2mo ago Changed · +15 lines · -27 tokens per session scan A → B f74376d01d2e
  4. 3mo ago First seen · 384 lines · 87 tokens per session scan A 6c3d17d90a2d

Subscribe to this mod's changes

mcp-best-practices is a skill published in the GitHub repository tenequm/skills (39 stars, last pushed 2d ago), licensed MIT. It adds 60 tokens to every session and 9,737 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

mcp-best-practices compared with skills from other repositories

mcp-best-practices next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-best-practicestenequm/skillsSkill392d agoMITB60Claude Code, Codex
build-mcp-serveranthropics/claude-plugins-officialSkill49kyesterdayApache-2.0A111Claude Code
data-manager-api-troubleshootinggoogle/skillsSkill25ktodayApache-2.0A179Claude Code, Codex
data-manager-api-setupgoogle/skillsSkill25ktodayApache-2.0A118Claude Code, Codex
vss-manage-video-io-storageNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0kyesterdayApache-2.0A143Claude Code, Codex
workers-best-practicescloudflare/skillsSkill3.5k4d agoApache-2.0A25Claude Code
vss-search-archiveNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0kyesterdayApache-2.0A67Claude Code, Codex