modelcontextprotocol / modelcontextprotocol/python-sdk
Mark SSE transport as deprecated
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 24.3k
- Fork
- 4k
- Merge medio
- 1g 1h
- PR unite (30g)
- 31
Descrizione
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).
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con src/mcp/client/sse.py, src/mcp/server/sse.py e i metodi di MCPServer menzionati nell’issue in src/mcp/server/mcpserver/server.py. Confronta la formulazione relativa alla deprecazione di SSE nel TypeScript SDK, quindi verifica che le API elencate emettano DeprecationWarning e che la relativa documentazione indirizzi gli utenti verso Streamable HTTP, riconoscendo al contempo la compatibilità con i server legacy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 68/100