modelcontextprotocol / modelcontextprotocol/python-sdk

Mark SSE transport as deprecated

Offen
#2,278 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

improves sdk consistency improves spec compliance P3 v2
Vorherrschende Sprache
Python
Sterne
24.3k
Forks
4k
Ø Merge
1 T. 1 Std.
Gemergte PRs (30 T.)
31

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit src/mcp/client/sse.py, src/mcp/server/sse.py und den im Issue genannten MCPServer-Methoden in src/mcp/server/mcpserver/server.py. Vergleiche die Formulierung zur SSE-Abkündigung im TypeScript SDK und überprüfe anschließend, dass die aufgeführten APIs DeprecationWarning ausgeben und ihre Dokumentation die Benutzer auf Streamable HTTP verweist, während sie die Kompatibilität mit Legacy-Servern anerkennt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api, backend
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.