MCP Specification · 2026-07-28 · zh-TW
主要變更
Key Changes
整理 MCP 自 2025-11-25 到 2026-07-28 的主要、次要、已棄用、schema 與治理流程變更。
本頁整理 Model Context Protocol(MCP)自前一個規範版本 2025-11-25 到 2026-07-28 的變更。
主要變更(Major Changes)
- 移除協定層 session。Streamable HTTP 不再使用
Mcp-Session-Id;tools/list、resources/list、prompts/list等清單也不再依 connection 改變。需要跨 tool call 保存狀態時,改由 server 建立明確 handle,並作為一般 tool argument 傳遞。(SEP-2567) - MCP 改為無狀態協定。移除
initialize/notifications/initializedhandshake。每個 request 都在_meta帶入io.modelcontextprotocol/protocolVersion與io.modelcontextprotocol/clientCapabilities;client SHOULD(應該)在每個 request 自我識別,server 也 SHOULD(應該)在每個 result 自我識別。版本不相容使用UnsupportedProtocolVersionError。(SEP-2575) - 新增
server/discover。Server MUST(必須)實作此 RPC 以公告支援的 protocol versions、capabilities 與 identity;client MAY(可以)在其他 request 前先呼叫,或在 stdio 中作為向後相容探測。(SEP-2575) - 以
subscriptions/listen取代 HTTP GET stream 與resources/subscribe/resources/unsubscribe。它是一個長時間存活的 POST response stream,client 明確選擇toolsListChanged、promptsListChanged、resourcesListChanged、resourceSubscriptions等通知;server 先確認訂閱,再以io.modelcontextprotocol/subscriptionId標記通知。notifications/progress、notifications/message等 request-scoped notifications 仍走原 request 的 response stream。(SEP-2575) - 移除
ping、logging/setLevel與notifications/roots/list_changed。Log level 改為每次 request 的io.modelcontextprotocol/logLevel;未提供此欄位時,server MUST NOT(不得)發送notifications/message。(SEP-2575) - Tasks 移出 core protocol。它成為官方 extension
io.modelcontextprotocol/tasks;新版 extension 以tasks/getpolling 與tasks/update處理進行中的 client input,移除tasks/list,並允許 server 在沒有 per-request opt-in 的情況下回傳 task handle。(SEP-2663) - 新增多回合請求(MRTR)。取代舊有 server-initiated requests。Server 需要 Roots、Sampling 或 Elicitation 等額外輸入時,回傳
InputRequiredResult(resultType: "input_required"),將要求放入inputRequests;client 收集資料後,以重試原 request 的方式送回inputResponses。(SEP-2322) - 所有結果新增必要的
resultType。一般完成結果使用"complete",MRTR 中間結果使用"input_required"。對較舊協定 server 回傳、缺少此欄位的結果,client MUST(必須)視為"complete"。(SEP-2322) - 移除 SSE stream resume 與 redelivery。
Last-Event-ID與 SSE event ID 不再屬於 Streamable HTTP。Response stream 中斷時,進行中的 request 即遺失;client MUST(必須)用新的 request ID 重新送出。(SEP-2575)
次要變更(Minor Changes)
ClientCapabilities與ServerCapabilities新增extensions欄位,支援 core protocol 之外的選用 extension。- 定義
_meta中traceparent、tracestate、baggage的 OpenTelemetry trace-context propagation 慣例。(SEP-414) - Server SHOULD(應該)以 deterministic order 回傳
tools/list,以利 client cache 與 LLM prompt cache。 - Streamable HTTP POST 必須提供標準 MCP request headers(
Mcp-Method、Mcp-Name),並新增由 tool parameter 透過x-mcp-header產生 custom header 的機制。(SEP-2243) tools/list、prompts/list、resources/list、resources/read、resources/templates/list的結果新增必要ttlMs與cacheScopecaching hints;它們與既有listChanged通知互補。(SEP-2549)- Resource not found error 從
-32002改為 JSON-RPC-32602 Invalid params。 - Authorization server SHOULD(應該)依 RFC 9207 在 authorization response 加入
iss;若 response 中存在iss,MCP client 在兌換 authorization code 前 MUST(必須)與已記錄 issuer 比對。(SEP-2468) - Dynamic Client Registration 時,MCP client MUST(必須)指定適當的
application_type,避免 OpenID Connect redirect URI 衝突。(SEP-837) - Client credentials 必須綁定到簽發它的 authorization-server issuer;client MUST(必須)以 issuer 保存 credentials,MUST NOT(不得)跨 authorization server 重用,server 改變時 MUST(必須)重新註冊。(SEP-2352)
inputSchema/outputSchema放寬為可使用任何 JSON Schema 2020-12 keyword;structuredContent可為任意 JSON value,並新增$refresolution 與 composition-keyword resource bounds。(SEP-2106)- 移除 2025-11-25 URL-mode Elicitation 的
notifications/elicitation/complete與elicitationId;MRTR 以重試原 request 取得外部互動結果,需要跨重試的 server identifier 應放在requestState。 - 建立 error-code allocation policy:
-32000–-32019保留舊實作,-32020–-32099保留給 MCP 規範;並將HeaderMismatch、MissingRequiredClientCapability、UnsupportedProtocolVersion分別改為-32020、-32021、-32022。
已棄用(Deprecated)
以下功能仍屬於規範的一部分,但已進入已棄用狀態;新實作不應採用,既有實作應依 migration path 遷移。完整清單與最早移除時間見「已棄用功能」頁。
- Roots、Sampling、Logging 在 2026-07-28 已棄用。替代方式分別為 tool parameters/resource URIs/server configuration、直接整合 LLM provider API,以及 stdio
stderr/OpenTelemetry。(SEP-2577) - HTTP+SSE transport 依 feature lifecycle policy 正式歸類為已棄用;應遷移至 Streamable HTTP。(SEP-2596)
includeContext: "thisServer"與"allServers"歸類為已棄用;應省略欄位或改用"none"。(SEP-2596)- 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)