MCP 2026-07-28 one lesson per page
23 lessons
On a 12-month clockUse Cases & Ecosystem · 20%Track 2 · 12 / 14

Deprecated, not dead: the twelve-month clock

The revision adds a formal feature lifecycle, Active → Deprecated → Removed, with at least twelve months between Deprecated and Removed, and puts several features on it.

Listen to this lessonAudio overview in Gemini Notebook · about 15–25 min · opens in a new tab

The code-search tool on borrowed time

Your team's search_code tool asks the client which folders it may read, using Roots. It works today.

But Roots is deprecated, so a future revision can remove it, no sooner than twelve months out. Migrating now is a one-line schema change: add a path parameter. As a bonus, the user sees and approves the exact folder in the tool call instead of a hidden list.

Same story for Sampling. Your summariser used to borrow the client's model. Calling the LLM API directly lets you pick the model, set your own budget, and stop depending on whatever model the user happens to run.

  • Roots: pass directories or files as tool parameters, resource URIs or server configuration instead.
  • Sampling: call your LLM provider's API directly instead.
  • Logging: log to stderr (stdio) or use OpenTelemetry instead.
  • HTTP+SSE transport (from 2024-11-05): reclassified as Deprecated; migrate to Streamable HTTP.
  • includeContext values "thisServer" and "allServers": omit the field or use "none". They'll be removed no later than Sampling itself.
  • Dynamic Client Registration: deprecated in favour of Client ID Metadata Documents (next page).

Deprecated features still work, but new implementations shouldn't adopt them. The spec keeps a public registry of every deprecated feature.

Roots, Sampling and Logging all make the server depend on the client mid-request, or on shared mutable state. The direct alternatives are simpler and already standard. The lifecycle policy gives everyone a predictable runway instead of surprise removals.

Replacing Roots with an explicit parameter

2026-07-28
// the tool simply takes the folder as an argument{  "name": "search_code",  "inputSchema": {    "type": "object",    "properties": {      "path": { "type": "string", "description": "Folder to search, e.g. file:///projects/myapp" },      "query": { "type": "string" }    },    "required": ["path", "query"]  }}
What it used to look like (legacy, for comparison only)
Legacybefore
// the server asked the client which folders it may touch{"jsonrpc": "2.0", "id": "srv-2", "method": "roots/list"}

Roots still works during the window (now through MRTR inputRequests), but new servers shouldn't build on it.

includeContext in a sampling request

2026-07-28
"params": {  "messages": [ … ],  "includeContext": "none",  "maxTokens": 400}
What it used to look like (legacy, for comparison only)
Legacybefore
"params": {  "messages": [ … ],  "includeContext": "allServers",  "maxTokens": 400}
  • Nothing breaks today. But any new feature built on Roots, Sampling or Logging is building on borrowed time.
  • Plan the migration inside the window: a removal can only come in a revision at least twelve months after deprecation.
First time here? Set up the test helper (once per terminal)
ShellSetup
# 1. In a SECOND terminal, start the reference server (Node 18+, no dependencies)curl -sO https://www.diegozuluaga.dev/mcpa/reference-server.mjsnode reference-server.mjs                 # http://localhost:3000/mcp, logs appear here # 2. In THIS terminal, define the helper every test uses (bash or zsh)export MCP=http://localhost:3000/mcpMETA='"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}'mcp() {  # usage: mcp <method> '<json body>' [extra curl args...]  curl -sS -N "$MCP" \    -H 'Content-Type: application/json' \    -H 'Accept: application/json, text/event-stream' \    -H 'MCP-Protocol-Version: 2026-07-28' \    -H "Authorization: Bearer ${MCP_USER:-alice}" \    -H "Mcp-Method: $1" "${@:3}" -d "$2" \    -w '\nHTTP %{http_code}\n'}# Demo auth: the reference server treats the bearer token as the user's name.# Prefix a command with MCP_USER=bob to act as someone else.
ShellAudit your code
# Find code that depends on deprecated featuresgrep -rnE 'roots/list|sampling/createMessage|logging/setLevel|includeContext|notifications/message' src/grep -rnE '/register|registration_endpoint' src/    # Dynamic Client Registrationgrep -rnE 'text/event-stream.*GET|/sse\b' src/      # old HTTP+SSE endpoints

Answer all 3 correctly and this lesson is marked as learned.

Q1What is the minimum time between a feature becoming Deprecated and being Removed?

Q2The suggested replacement for Sampling is…

Q3Spot the problem: a brand-new server built in 2026 uses MRTR to ask the client for roots, to learn which folders it may search.

Feedback or a correction? Email diego [at] diegozuluaga [dot] dev or open an issue on GitHub.

Content CC BY 4.0 · Code MIT

Tip: ← and → move between lessons. Hover any heading and press # to copy a link to it.