mcp-spec

mcp-spec is a skill for Claude Code, Codex from fold-run/fold. It costs 65 tokens per session (1,257 once invoked), scanned A, original, Apache-2.0.

A guide for checking the official Model Context Protocol specification before changing code that communicates over MCP, a standard for connecting AI applications with tools and data sources.

In plain words
What is it for?
It helps find the correct specification page, confirm methods, fields, headers, lifecycle behavior, transport rules, and error codes, then use that evidence when implementing changes.
Why use it?
It prevents protocol behavior from being based on memory, incomplete documentation, or the current implementation instead of the required specification.

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

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-spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/fold-run/fold/mcp-spec.svg)](https://agentmods.dev/skills/fold-run/fold/mcp-spec)
Your own site
<a href="https://agentmods.dev/skills/fold-run/fold/mcp-spec"><img src="https://agentmods.dev/badge/skills/fold-run/fold/mcp-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,257 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.1 $0.00065 $0.01257
Opus 5 $0.00032 $0.00629
Sonnet 5 $0.00013 $0.00251
Haiku 4.5 $0.00006 $0.00126

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

Security

Grade A, and why

mcp-spec 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 5d 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.

.claude/skills/mcp-spec/SKILL.md · 89 lines

How it starts

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

Reading the MCP specification

fold's whole value proposition is that it is invisible: behavior through the gateway matches hitting the upstream directly. That is a claim about a specification, so protocol questions get answered from the specification — not from memory, not from the SDK's Go doc comments, and not from how fold currently behaves.

Fetch the page. Quote the normative sentence. Then write code.

The pin

fold targets 2026-07-28, the revision config.protocol accepts (config/config.go) and the one the Go SDK negotiates. Every URL below carries the revision in its path — keep it there. A bare /specification/ URL redirects to whatever is current and will silently answer a different question than the one you asked.

Append .md to any page for clean markdown (…/server/tools.md). https://modelcontextprotocol.io/llms.txt is the full page index.

Where things are

Question Page
Method shapes, _meta, error codes, error-code allocation policy /specification/2026-07-28/basic/index
Lifecycle, statelessness, server/discover /specification/2026-07-28/server/discover
Streamable HTTP, headers, stream semantics /specification/2026-07-28/basic/transports/streamable-http
stdio framing /specification/2026-07-28/basic/transports/stdio
Tools, inputSchema/outputSchema /specification/2026-07-28/server/tools
Resources, URIs, resources/read /specification/2026-07-28/server/resources
Prompts /specification/2026-07-28/server/prompts
ttlMs / cacheScope (CacheableResult) /specification/2026-07-28/server/utilities/caching
Pagination (cursors) /specification/2026-07-28/server/utilities/pagination
subscriptions/listen /specification/2026-07-28/basic/patterns/subscriptions
MRTR — input_required, inputRequests /specification/2026-07-28/basic/patterns/mrtr
Progress, cancellation /specification/2026-07-28/basic/patterns/progress, …/cancellation
Elicitation, sampling, roots /specification/2026-07-28/client/… (all three deprecated)
Authorization, resource-server discovery, DCR /specification/2026-07-28/basic/authorization/…
Security considerations /specification/2026-07-28/basic/authorization/security-considerations
What changed this revision /specification/2026-07-28/changelog
What is scheduled for removal /specification/2026-07-28/deprecated
Raw types /specification/2026-07-28/schema

Read the full file on GitHub · 89 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. 5d ago First seen · 89 lines · 65 tokens per session scan A 2aeb8c0d8a59

Subscribe to this mod's changes

mcp-spec is a skill published in the GitHub repository fold-run/fold (1 stars, last pushed today), licensed Apache-2.0. It adds 65 tokens to every session and 1,257 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-08-31.