Skip to content

MCP Specification · 2026-07-28 · zh-TW

主要變更

Key Changes

整理 MCP 自 2025-11-25 到 2026-07-28 的主要、次要、已棄用、schema 與治理流程變更。

本頁整理 Model Context Protocol(MCP)自前一個規範版本 2025-11-252026-07-28 的變更。

主要變更(Major Changes)

  1. 移除協定層 session。Streamable HTTP 不再使用 Mcp-Session-Idtools/listresources/listprompts/list 等清單也不再依 connection 改變。需要跨 tool call 保存狀態時,改由 server 建立明確 handle,並作為一般 tool argument 傳遞。(SEP-2567)
  2. MCP 改為無狀態協定。移除 initializenotifications/initialized handshake。每個 request 都在 _meta 帶入 io.modelcontextprotocol/protocolVersionio.modelcontextprotocol/clientCapabilities;client SHOULD(應該)在每個 request 自我識別,server 也 SHOULD(應該)在每個 result 自我識別。版本不相容使用 UnsupportedProtocolVersionError。(SEP-2575)
  3. 新增 server/discoverServer MUST(必須)實作此 RPC 以公告支援的 protocol versions、capabilities 與 identity;client MAY(可以)在其他 request 前先呼叫,或在 stdio 中作為向後相容探測。(SEP-2575)
  4. subscriptions/listen 取代 HTTP GET stream 與 resources/subscriberesources/unsubscribe它是一個長時間存活的 POST response stream,client 明確選擇 toolsListChangedpromptsListChangedresourcesListChangedresourceSubscriptions 等通知;server 先確認訂閱,再以 io.modelcontextprotocol/subscriptionId 標記通知。notifications/progressnotifications/message 等 request-scoped notifications 仍走原 request 的 response stream。(SEP-2575)
  5. 移除 pinglogging/setLevelnotifications/roots/list_changedLog level 改為每次 request 的 io.modelcontextprotocol/logLevel;未提供此欄位時,server MUST NOT(不得)發送 notifications/message。(SEP-2575)
  6. Tasks 移出 core protocol。它成為官方 extension io.modelcontextprotocol/tasks;新版 extension 以 tasks/get polling 與 tasks/update 處理進行中的 client input,移除 tasks/list,並允許 server 在沒有 per-request opt-in 的情況下回傳 task handle。(SEP-2663)
  7. 新增多回合請求(MRTR)。取代舊有 server-initiated requests。Server 需要 Roots、Sampling 或 Elicitation 等額外輸入時,回傳 InputRequiredResultresultType: "input_required"),將要求放入 inputRequests;client 收集資料後,以重試原 request 的方式送回 inputResponses。(SEP-2322)
  8. 所有結果新增必要的 resultType一般完成結果使用 "complete",MRTR 中間結果使用 "input_required"。對較舊協定 server 回傳、缺少此欄位的結果,client MUST(必須)視為 "complete"。(SEP-2322)
  9. 移除 SSE stream resume 與 redelivery。Last-Event-ID 與 SSE event ID 不再屬於 Streamable HTTP。Response stream 中斷時,進行中的 request 即遺失;client MUST(必須)用新的 request ID 重新送出。(SEP-2575)

次要變更(Minor Changes)

  1. ClientCapabilitiesServerCapabilities 新增 extensions 欄位,支援 core protocol 之外的選用 extension。
  2. 定義 _metatraceparenttracestatebaggage 的 OpenTelemetry trace-context propagation 慣例。(SEP-414)
  3. Server SHOULD(應該)以 deterministic order 回傳 tools/list,以利 client cache 與 LLM prompt cache。
  4. Streamable HTTP POST 必須提供標準 MCP request headers(Mcp-MethodMcp-Name),並新增由 tool parameter 透過 x-mcp-header 產生 custom header 的機制。(SEP-2243)
  5. tools/listprompts/listresources/listresources/readresources/templates/list 的結果新增必要 ttlMscacheScope caching hints;它們與既有 listChanged 通知互補。(SEP-2549)
  6. Resource not found error 從 -32002 改為 JSON-RPC -32602 Invalid params
  7. Authorization server SHOULD(應該)依 RFC 9207 在 authorization response 加入 iss;若 response 中存在 iss,MCP client 在兌換 authorization code 前 MUST(必須)與已記錄 issuer 比對。(SEP-2468)
  8. Dynamic Client Registration 時,MCP client MUST(必須)指定適當的 application_type,避免 OpenID Connect redirect URI 衝突。(SEP-837)
  9. Client credentials 必須綁定到簽發它的 authorization-server issuer;client MUST(必須)以 issuer 保存 credentials,MUST NOT(不得)跨 authorization server 重用,server 改變時 MUST(必須)重新註冊。(SEP-2352)
  10. inputSchemaoutputSchema 放寬為可使用任何 JSON Schema 2020-12 keyword;structuredContent 可為任意 JSON value,並新增 $ref resolution 與 composition-keyword resource bounds。(SEP-2106)
  11. 移除 2025-11-25 URL-mode Elicitation 的 notifications/elicitation/completeelicitationId;MRTR 以重試原 request 取得外部互動結果,需要跨重試的 server identifier 應放在 requestState
  12. 建立 error-code allocation policy:-32000-32019 保留舊實作,-32020-32099 保留給 MCP 規範;並將 HeaderMismatchMissingRequiredClientCapabilityUnsupportedProtocolVersion 分別改為 -32020-32021-32022

已棄用(Deprecated)

以下功能仍屬於規範的一部分,但已進入已棄用狀態;新實作不應採用,既有實作應依 migration path 遷移。完整清單與最早移除時間見「已棄用功能」頁。

  1. Roots、Sampling、Logging 在 2026-07-28 已棄用。替代方式分別為 tool parameters/resource URIs/server configuration、直接整合 LLM provider API,以及 stdio stderr/OpenTelemetry。(SEP-2577)
  2. HTTP+SSE transport 依 feature lifecycle policy 正式歸類為已棄用;應遷移至 Streamable HTTP。(SEP-2596)
  3. includeContext: "thisServer""allServers" 歸類為已棄用;應省略欄位或改用 "none"。(SEP-2596)
  4. OAuth 2.0 Dynamic Client Registration 作為 MCP client-registration mechanism 已棄用,優先改用 Client ID Metadata Documents;DCR 僅保留給不支援 CIMD 的 authorization server。

其他 Schema 變更(Other Schema Changes)

schema.json 現已正確反映 TypeScript definition 中 minimum、maximum、default 可為 number,不再錯誤限制為 integer。

治理與流程更新(Governance and Process Updates)

  • 採用 specification feature lifecycle and deprecation policy,定義 Active、已棄用(Deprecated)、Removed 狀態、至少十二個月的 deprecation window,以及已棄用功能(Deprecated Features)registry。(SEP-2596)
  • 正式建立以 PR 為核心的 SEP workflow:SEP Markdown 放在 seps/,編號由 PR 產生,並定義 sponsor 與 label-based status management。(SEP-1850)