YantrikDB/packs
Sign in
officialyantrikdbsigned

mcp-spec

yantrik/mcp-spec@0.3.2·213 facts·1752 KB·10 downloads·by spranab

The complete Model Context Protocol specification, revision 2026-07-28 — published after every current model's training data, which is exactly why it matters: this revision removes the initialize handshake and protocol sessions, deprecates Roots, Sampling and Logging, replaces server-initiated requests with Multi Round-Trip Requests (MRTR), and replaces resources/subscribe with subscriptions/listen. A model writing MCP code from memory writes the old protocol. Covers all 31 specification pages and the official extensions: the migration delta first, then tools, resources, prompts, the OAuth authorization framework with Client ID Metadata Documents, both transports, caching, pagination, completion, and the Tasks and Apps extensions.

covers

MCP protocol revision 2026-07-28 changes and migration from earlier revisions · MCP stateless requests, _meta fields and capability negotiation · MCP tools: tools/list, tools/call, schemas, annotations and x-mcp-header · MCP resources, resource templates, prompts and content blocks · MCP Multi Round-Trip Requests, elicitation, sampling and roots · MCP Streamable HTTP and stdio transports, headers and SSE streams · MCP OAuth authorization, Client ID Metadata Documents and token validation · MCP subscriptions, notifications, server discovery and caching · MCP pagination, completion, logging and progress utilities · MCP extensions: tasks, apps, and extension negotiation · MCP error codes, JSON-RPC message rules and JSON Schema usage

rules this pack installs (12)

Injected on every turn while mounted. Shown verbatim — a pack's rules are public by design.

No initialize handshake: There is no `initialize` / `notifications/initialized` exchange. Every request is self-contained: `_meta` carries `io.modelcontextprotocol/protocolVersion` and `io.modelcontextprotocol/clientCapabilities` (both required). Writing a handshake means writing the 2025 protocol.
No sessions: Never mint, expect, or echo `Mcp-Session-Id`. State that spans requests travels as explicit server-minted handles passed as ordinary tool arguments, integrity-protected if they influence authorization.
Servers never initiate requests: `sampling/createMessage`, `elicitation/create` and `roots/list` are sent only inside an `InputRequiredResult` (`resultType: "input_required"`) with `inputRequests`; the client retries the original request with `inputResponses` and a NEW JSON-RPC id, echoing `requestState` untouched. Only `tools/call`, `resources/read` and `prompts/get` may return it.
Every result carries resultType: `"complete"` for ordinary results. Treat an absent `resultType` from an older server as `"complete"`; treat an unrecognized value as invalid.
HTTP requests carry the mirrored headers: Single POST endpoint. Every POST includes `MCP-Protocol-Version`, `Mcp-Method`, and `Mcp-Name` (for tools/call, resources/read, prompts/get), matching the body exactly — mismatch is `400` + `HeaderMismatch` (-32020). No GET stream, no `Last-Event-ID` resume: a broken stream means re-issue the request with a new id.
Do not implement Roots, Sampling, or Logging in new code: All three are deprecated. Pass directories as tool parameters or configuration; call LLM provider APIs directly instead of sampling; log to stderr (stdio) or OpenTelemetry. Per-request log level comes from `io.modelcontextprotocol/logLevel` in `_meta` — never emit `notifications/message` for a request that did not include it.
Change notifications go through subscriptions/listen: One long-lived request whose response stream carries only opted-in types (`toolsListChanged`, `promptsListChanged`, `resourcesListChanged`, `resourceSubscriptions`). Acknowledge first; tag everything with `io.modelcontextprotocol/subscriptionId`. `resources/subscribe`, `resources/unsubscribe` and `ping` no longer exist.
Use the error codes as allocated: Resource not found is `-32602`, not `-32002`. `-32020` HeaderMismatch, `-32021` MissingRequiredClientCapability, `-32022` UnsupportedProtocolVersion. Never invent codes in `-32020`..`-32099`; put application errors outside `-32768`..`-32000`.
requestState is attacker-controlled: If it influences authorization, resource access or business logic: HMAC or AEAD, verify principal, TTL, and originating-request digest on receipt, reject on failure. Clients never inspect or modify it.
Implement server/discover: Mandatory for servers: advertise supported versions, capabilities and identity. Reject unsupported versions with `UnsupportedProtocolVersionError` listing `supported`, so clients can retry with a mutual version.
Validate Origin, bind localhost: HTTP servers reject invalid `Origin` with 403 (DNS rebinding), bind 127.0.0.1 when local, and authenticate connections.
State the revision when uncertain: If asked about MCP behaviour this pack does not cover, say the answer is from model memory and may describe an earlier protocol revision.

evaluation notes

skills.constitution — pack installs 12 always-on rule(s); they are shown verbatim on the listing for review

install

Native client — verifies against the registry, then installs:

curl -O https://packs.yantrikdb.com/client/yantrik_pack_client.py
python yantrik_pack_client.py install yantrik-mcp-spec

Manual — download first, then:

yantrikdb pack info mcp-spec-0.3.2.ydbpack
yantrikdb pack install mcp-spec-0.3.2.ydbpack

Verify any copy of this file, wherever it came from:

curl "https://packs.yantrikdb.com/api/v1/verify?sha256=34c7506d1261a24979927c1f78a35bbda76bcb6fbbb6e044d20d731b7b14db6f"

get it

Download 0.3.2
sha256
34c7506d1261a24979927c1f78a35bbda76bcb6fbbb6e044d20d731b7b14db6f
digest
blake3:2eb8929627c839c629a2749460714630959ef4bac6b6bb51c52c1a378c8171ed
signer
13a9232bc7829ea6a03e4bd6a0706c08f80ff4a2ecc83fd10062314acfb59683

versions

0.3.2 2026-08-03 download
0.2.0 2026-07-30 download
0.1.0 2026-07-30 download