modelcontextprotocol / modelcontextprotocol/python-sdk

Mark SSE transport as deprecated

未關閉
#2,278 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

improves sdk consistency improves spec compliance P3 v2
主要語言
Python
星號
24.3k
分支
4k
平均合併
1 天 1 小時
30 天內合併 PR
31

描述

The HTTP+SSE transport was replaced by Streamable HTTP in protocol revision 2025-03-26 (spec PR #206). The spec now refers to it as the "deprecated HTTP+SSE transport" and only documents it for backwards compatibility.

The Python SDK still exposes the SSE transport with no indication that it is deprecated.

Proposal

Add warnings.warn(..., DeprecationWarning, stacklevel=2) and @deprecated docstring markers to:

The warning should point users to streamable-http / StreamableHTTPTransport instead.

Prior art

The TypeScript SDK already marks SSEClientTransport as @deprecated with a note to prefer StreamableHTTPClientTransport.

Open questions
  • Should we remove SSE entirely in v2, or deprecate now and remove in a later major?
  • The 2024-11-05 spec is still technically valid — clients connecting to old servers may still need the SSE client. The deprecation message should acknowledge this (same as the TS SDK wording does).

AI Disclaimer

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 src/mcp/client/sse.py、src/mcp/server/sse.py 以及 src/mcp/server/mcpserver/server.py 中 issue 指定的 MCPServer 方法開始。比較 TypeScript SDK 中關於 SSE 棄用的措辭,然後驗證列出的 API 會發出 DeprecationWarning,且其文件會將使用者導向 Streamable HTTP,同時說明與舊版伺服器的相容性。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api, backend
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
描述清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。