modelcontextprotocol / modelcontextprotocol/python-sdk

Mark SSE transport as deprecated

オープン
#2,278 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

improves sdk consistency improves spec compliance P3 v2
主要言語
Python
スター
24.3k
フォーク
4k
平均マージ
1日 1時間
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。