Install
$ agentstack add skill-archive228-lab-skills-mcp-2026-migration ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
MCP 2026-07-28 Migration (Stateless Core, MRTR, CIMD)
This skill is an operating procedure for moving MCP servers, gateways, and clients from protocol 2025-11-25 (or earlier) to 2026-07-28 — which the maintainers call MCP's most important release since remote MCP first launched. It gives you the exact headers, _meta keys, result fields, error codes, and deprecation offramps from the official spec and the maintainers' deep-dive, plus a per-role migration checklist.
When to use
- Upgrading an existing MCP server, client, or SDK integration to protocol version
2026-07-28. - Writing any NEW MCP implementation (start on the new patterns; do not adopt deprecated features).
- Configuring gateways, load balancers, rate limiters, or WAFs in front of MCP servers.
- Debugging
UnsupportedProtocolVersion(-32022),HeaderMismatch(-32020), or session-related breakage after an SDK upgrade — the blog notes the migration cost lands hardest on developers who depended on session identifiers.
Do NOT use when the deployment is deliberately pinned to 2025-11-25 or earlier with no upgrade planned, or for OAuth work unrelated to MCP. Do not use it to justify ripping out deprecated features immediately — Roots, Sampling, and Logging keep working for at least twelve months under the formal deprecation policy.
Rules
Stateless core
- Remove the
initialize/notifications/initializedhandshake and theMcp-Session-Idheader entirely (SEP-2575, SEP-2567). Every request must carry its protocol version and client capabilities in_meta:io.modelcontextprotocol/protocolVersionandio.modelcontextprotocol/clientCapabilities. Clients SHOULD addio.modelcontextprotocol/clientInfoper request; servers SHOULD returnio.modelcontextprotocol/serverInfoin each result's_meta. Why: any request can now land on any server instance behind a plain round-robin load balancer with no shared storage. - Servers MUST implement the
server/discoverRPC advertising supported versions, capabilities, and identity. Clients MAY call it up front for version selection or as a backward-compatibility probe on STDIO. Version mismatches returnUnsupportedProtocolVersionError(-32022). - Protocol sessions are gone but application state is not: have a tool mint an explicit state handle and require the model to pass it back as an ordinary tool argument on later calls (the maintainers' recommended pattern). List endpoints (
tools/list,resources/list,prompts/list) no longer vary per-connection.
Header-based routing
- Every Streamable HTTP POST MUST carry
MCP-Protocol-VersionandMcp-Method(the RPC method);Mcp-Name(fromparams.nameorparams.uri) is additionally REQUIRED ontools/call,resources/read, andprompts/getrequests (SEP-2243). Header/body mismatch — or a missing/malformed required header — isHeaderMismatchError(-32020). Custom headers come from tool parameters annotated withx-mcp-headerin the tool'sinputSchema, mirrored asMcp-Param-{Name}headers. - Gateways should, per the maintainers, "route and meter on those headers instead of parsing JSON bodies" — apply routing, rate limits, and WAF rules at the header layer.
Multi Round-Trip Requests (MRTR)
- Server-initiated requests (
roots/list,sampling/createMessage,elicitation/create) are no longer supported — breaking change (SEP-2322). Instead, respond to the client's request with anInputRequiredResult:resultType: "input_required", an optionalinputRequestsmap, and an optionalrequestStatestring. At least one of the two MUST be present. inputRequestskeys are server-assigned identifiers, unique within the request; values MUST be one ofElicitRequest,CreateMessageRequest, orListRootsRequest. Never include a request type the client did not declare in its capabilities.InputRequiredResultis allowed ONLY ontools/call,resources/read, andprompts/get. Servers MUST NOT send it on any other client request, and MUST NOT assume the client will fulfill the requests or retry.requestStateis opaque to clients: echo it back byte-exact on retry, never inspect, parse, or modify it. Servers MUST treat incomingrequestStateas attacker-controlled — protect integrity (HMAC or AEAD) whenever it influences authorization, resource access, or business logic, and reject state that fails verification. Embed the authenticated principal, a short TTL, and an identifier of the originating request; enforce single-use server-side where at-most-once matters.- The retry is an independent request: it MUST use a different JSON-RPC
id, with the client's answers ininputResponses(keys matchinginputRequests). If responses are missing, servers SHOULD return a newInputRequiredResultasking again, not an error. - Every result now carries a required
resultType:"complete"or"input_required". Clients MUST treat results from earlier-protocol servers that omit the field as"complete"— this is the backward-compatibility hinge.
Cacheable lists and notifications
tools/list,prompts/list,resources/list,resources/read, andresources/templates/listresults MUST carryttlMs(freshness hint, milliseconds) andcacheScope("public"or"private"— whether shared intermediaries may cache) via theCacheableResultinterface (SEP-2549).- Return tools from
tools/listin deterministic order — it enables client-side caching and stable upstream LLM prompt-cache hits across reconnects. - The HTTP GET endpoint and
resources/subscribe/resources/unsubscribeare replaced bysubscriptions/listen: one long-lived POST-response stream, opted into per type (toolsListChanged,promptsListChanged,resourcesListChanged,resourceSubscriptions), with notifications taggedio.modelcontextprotocol/subscriptionId. Request-scopednotifications/progressandnotifications/messagestay on the originating request's response stream. ping,logging/setLevel, andnotifications/roots/list_changedare removed. Log level is set per-request viaio.modelcontextprotocol/logLevelin_meta; servers MUST NOT emitnotifications/messagefor requests that did not include it.- SSE resumability is removed (
Last-Event-ID, SSE event IDs). A broken response stream loses the in-flight request — re-issue it as a new request with a new request ID.
Authorization
- Prefer Client ID Metadata Documents (CIMD): the
client_idis an HTTPS URL with a path component (e.g.https://example.com/client.json) serving a JSON document with at leastclient_id,client_name,redirect_uris; the document'sclient_idMUST match the URL exactly. Authorization servers advertise support viaclient_id_metadata_document_supported: true. CIMD client IDs are portable across authorization servers — no re-registration when the AS changes. - Registration priority order: (1) pre-registered credentials, (2) CIMD if advertised, (3) Dynamic Client Registration as deprecated fallback, (4) prompt the user.
- If you must use DCR, set
application_typeexplicitly:"native"for desktop/CLI/localhost apps,"web"for remote browser apps. Omitting it defaults to"web"under OIDC and breakslocalhostredirect URIs. - Validate the RFC 9207
issparameter, when present, against the recorded issuer before redeeming any authorization code (SEP-2468). Key persisted credentials by issuer; MUST NOT reuse them with a different authorization server; MUST re-register when the AS changes (SEP-2352).
Extensions and deprecations
- Negotiate extensions through the new
extensionsfield onClientCapabilities/ServerCapabilities. Tasks moved from experimental core to theio.modelcontextprotocol/tasksextension: blockingtasks/result→ pollingtasks/get, newtasks/updatefor client-to-server input,tasks/listremoved, unsolicited task handles allowed (SEP-2663). Other notable extensions: MCP Apps (inline interactive UI), Skills over MCP (rich structured instructions for agent workflows), Enterprise Managed Authorization (EMA). - Roots, Sampling, and Logging are Deprecated (SEP-2577) with a minimum twelve-month window. Migrate: Roots → pass directories/files via tool parameters, resource URIs, or server configuration; Sampling → integrate directly with LLM provider APIs; Logging →
stderron stdio, or OpenTelemetry._metaOTel keys aretraceparent,tracestate,baggage. - HTTP+SSE transport is formally Deprecated with a year-long offramp — migrate to Streamable HTTP.
includeContextvalues"thisServer"/"allServers"are Deprecated — omit the field or use"none". - Error-code updates: resource-not-found moves -32002 → -32602 (Invalid Params); -32020..-32099 is reserved for the MCP spec (
HeaderMismatch-32020,MissingRequiredClientCapability-32021,UnsupportedProtocolVersion-32022); -32000..-32019 stays implementation-defined.
Checklist
Server
- [ ] Upgrade to a 2026-07-28-capable SDK (Tier 1: TypeScript, Python, Go, C#; Rust in beta).
- [ ] Delete session/handshake logic; read
io.modelcontextprotocol/protocolVersion+clientCapabilitiesfrom_meta; returnUnsupportedProtocolVersionError(-32022) on mismatch. - [ ] Implement
server/discover. - [ ] Convert every server-initiated
elicitation/create/sampling/createMessage/roots/listinto MRTR (InputRequiredResult+ integrity-protectedrequestState); only ontools/call,resources/read,prompts/get. - [ ] Add
resultTypeto all results; addttlMs+cacheScopeto the five cacheable list/read results; maketools/listorder deterministic. - [ ] Replace GET endpoint and
resources/subscribe/unsubscribewithsubscriptions/listen; droppingandlogging/setLevel; gatenotifications/messageon the request'sio.modelcontextprotocol/logLevel. - [ ] Move cross-call state into server-minted handles passed as tool arguments.
- [ ] Schedule removal of any Roots/Sampling/Logging usage within the twelve-month window.
Gateway / proxy / WAF
- [ ] Route, meter, rate-limit, and authorize on
Mcp-Method+Mcp-Name; stop parsing JSON bodies for routing. - [ ] Remove
Mcp-Session-Idsticky-session affinity; plain round-robin is now valid. - [ ] Cache only
cacheScope: "public"responses at shared intermediaries, withinttlMs. - [ ] Support long-lived POST response streams for
subscriptions/listen; dropLast-Event-IDreplay logic. - [ ] Pass through
Mcp-Param-*custom headers (mirrored fromx-mcp-header-annotated tool parameters).
Client
- [ ] Stamp every request:
MCP-Protocol-Version+Mcp-Methodheaders (plusMcp-Nameontools/call,resources/read,prompts/get);_metaprotocolVersion/clientCapabilities/clientInfo. - [ ] Handle
resultType: "input_required": fulfillinputRequests, echorequestStateexactly, retry with a NEW JSON-RPC id andinputResponses; treat a missingresultTypefrom older servers as"complete". - [ ] Declare only capabilities you actually handle — servers may not send undeclared
inputRequeststypes. - [ ] Cache list results per
ttlMs/cacheScope; opt into thesubscriptions/listennotification types you need. - [ ] On broken streams, re-issue the request with a new id — no resumption exists.
- [ ] Auth: host a CIMD document (HTTPS URL client_id, matching
client_idfield,client_name,redirect_uris); checkclient_id_metadata_document_supported; fall back to DCR with explicitapplication_type; validateiss; key credentials by issuer. - [ ] Do not add Roots/Sampling/Logging support in new code.
Anti-patterns
- Keeping
Mcp-Session-Id, sticky sessions, or theinitializehandshake — the transport no longer defines them. - Sending server-initiated
elicitation/create,sampling/createMessage, orroots/listrequests — no longer supported at all. - Inspecting, parsing, or mutating
requestStateon the client; accepting it on the server without integrity verification when it affects authorization or business logic. - Reusing the same JSON-RPC
idon an MRTR retry — initial request and retry are independent requests. - Relying on
Last-Event-ID/ SSE event-ID redelivery after a dropped stream. - Emitting
notifications/messagefor requests that did not setio.modelcontextprotocol/logLevel. - Varying list results per connection or returning tools in nondeterministic order — breaks client caches and prompt caching.
- New implementations adopting Roots, Sampling, Logging, DCR, HTTP+SSE, or
includeContext: "thisServer"/"allServers"— all Deprecated. - Reusing OAuth client credentials across different authorization servers instead of re-registering keyed by issuer.
Source
- MCP Specification 2026-07-28 (incl. changelog, MRTR pattern, client registration) — https://modelcontextprotocol.io/specification/2026-07-28 — 2026-07-28
- The 2026-07-28 Specification (maintainers deep-dive) — https://blog.modelcontextprotocol.io/posts/2026-07-28/ — 2026-07-28
Distilled from the official document(s) above on 2026-08-12. If this skill and the source disagree, trust the source.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Archive228
- Source: Archive228/lab-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.