mcp-best-practices

mcp-best-practices is a skill for Claude Code, Codex from tenequm/skills. It costs 60 tokens per session (8,219 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 8,219 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.08219
Opus 5 $0.00030 $0.04110
Sonnet 5 $0.00012 $0.01644
Haiku 4.5 $0.00006 $0.00822

Measured 2d ago against content hash f74376d01d2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

mcp-best-practices scanned grade B with 1 finding 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 2d 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.30.0 stamps every tool schema `"$schema": "http://json-schema.org/draft-07/schema#"`**, and a strict 2020-12 client rejects the whole tool: *"JSON Schema declares an unsupported dialect ... The default validator s
skills/mcp-best-practices/SKILL.md · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 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 What most shipped clients and servers actually speak today; the v2 SDK's default
TS SDK (current) v2.0.0 (2026-07-27), nine packages in lockstep: /server, /client, /core, /hono, /express, /node, /fastify, /codemod, /server-legacy Speaks 2025-era by default; 2026-07-28 is opt-in
TS SDK (legacy) v1.30.0 (@modelcontextprotocol/sdk) Bug + security fixes for >=6 months after v2 GA; 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 · 399 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. 2d ago Changed · +15 lines · -27 tokens per session scan A → B f74376d01d2e
  2. 12d 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 (36 stars, last pushed today), licensed MIT. It adds 60 tokens to every session and 8,219 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). 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

debridge

Complete deBridge Protocol SDK for building cross-chain bridges, message passing, and token transfers on Solana. Use when building cross-chain applications, bridging assets between Solana and EVM chains, or implementing trustless external calls.

sendaifun/skills · 48 tokens

lifi

Integrate LI.FI for cross-chain swaps, bridging, payments, route discovery, and transfer status tracking across Solana, EVM, Bitcoin, and Sui. Use when building Solana applications or AI agents that need quotes, routes, executable transactions, supported chains/tokens/tools, or cross-chain transfer monitoring.

sendaifun/skills · 67 tokens

ct-alpha

Crypto Twitter intelligence and alpha research. Search X/Twitter for real-time crypto narratives, trending tokens, yield strategies, smart money signals, and protocol research. Features TweetRank (PageRank-inspired credibility scoring), multi-signal token detection, coordinated raid detection, and dynamic tool…

sendaifun/skills · 71 tokens

switchboard

Complete Switchboard Oracle Protocol SDK for Solana - the permissionless oracle solution for price feeds, on-demand data, VRF randomness, and real-time streaming via Surge. Covers TypeScript SDK, Rust integration, Oracle Quotes, and all Switchboard tools.

sendaifun/skills · 54 tokens

raydium

Complete Raydium Protocol SDK - the single source of truth for integrating Raydium on Solana. Covers SDK, Trade API, CLMM, CPMM, AMM pools, LaunchLab token launches, farming, CPI integration, and all Raydium tools.

sendaifun/skills · 58 tokens

helius

Skill "helius" from helius-labs/core-ai, covering helius — build on solana, prerequisites, 1. helius mcp server, 2. mcp router surface and 3. api key.

helius-labs/core-ai · 0 tokens