MCP Python SDK v1.28.0

v1.28.0
Added 1
  • Support Python 3.14
Fixed 1
  • Omit null optional fields from task result payloads
Deprecated 2
  • WebSocket transport (mcp.client.websocket.websocket_client and mcp.server.websocket.websocket_server) will be removed in v2; use the streamable HTTP transport instead
  • Experimental tasks API (ClientSession.experimental, Server.experimental, ServerSession.experimental, and experimental_task_handlers= kwarg) will be removed in v2 as tasks were removed from the MCP specification
Deprecations

Two API surfaces now emit DeprecationWarning ahead of their removal in v2. Nothing is removed in 1.x, and the warnings fire only when the deprecated API is called - importing the modules stays silent.

  • WebSocket transport - mcp.client.websocket.websocket_client and mcp.server.websocket.websocket_server. WebSocket was never part of the MCP specification; use the streamable HTTP transport instead. The TypeScript SDK has likewise removed its WebSocket client for v2 (modelcontextprotocol/typescript-sdk#1783).
  • Experimental tasks API - ClientSession.experimental, Server.experimental, ServerSession.experimental, and the experimental_task_handlers= kwarg on ClientSession. Tasks (SEP-1686) were removed from the MCP specification and are expected to return as a separate MCP extension.

If your test suite runs with filterwarnings = ["error"] and exercises these paths, add a scoped ignore such as ignore:The experimental tasks API is deprecated:DeprecationWarning or ignore:The WebSocket .* transport is deprecated:DeprecationWarning.

See #2828 for full details.

What's Changed
New Contributors

Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.27.2...v1.28.0

View original

Upgraded? How did it go?

Discussion