Skip to content

deprecate: Mark SSE transport as deprecated#2314

Closed
goingforstudying-ctrl wants to merge 2 commits intomodelcontextprotocol:mainfrom
goingforstudying-ctrl:deprecate-sse
Closed

deprecate: Mark SSE transport as deprecated#2314
goingforstudying-ctrl wants to merge 2 commits intomodelcontextprotocol:mainfrom
goingforstudying-ctrl:deprecate-sse

Conversation

@goingforstudying-ctrl
Copy link

Description

The HTTP+SSE transport was replaced by Streamable HTTP in protocol revision 2025-03-26. The spec now refers to it as the "deprecated HTTP+SSE transport".

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

  • sse_client in src/mcp/client/sse.py
  • SseServerTransport in src/mcp/server/sse.py
  • run_sse_async in MCPServer
  • sse_app in MCPServer

The warnings direct users to use StreamableHTTPTransport instead, consistent with the TypeScript SDK which already marks SSEClientTransport as @deprecated.

Testing

  • Verified that the deprecation warnings are properly formatted
  • Confirmed that existing code continues to work (backwards compatible)

Fixes #2278

PR-Contributor added 2 commits March 19, 2026 21:27
The HTTP+SSE transport was replaced by Streamable HTTP in protocol
revision 2025-03-26. This change adds DeprecationWarning and docstring
markers to:

- sse_client in mcp/client/sse.py
- SseServerTransport in mcp/server/sse.py
- run_sse_async in MCPServer
- sse_app in MCPServer

The warnings direct users to use StreamableHTTPTransport instead.

Fixes modelcontextprotocol#2278
@maxisbey maxisbey closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark SSE transport as deprecated

2 participants