modelcontextprotocol / modelcontextprotocol/python-sdk
Mark SSE transport as deprecated
还没有人认领这个 Issue。
- 主要语言
- 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).
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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