AION
Open-source releaseMLOps, Tooling & Infrastructure1 source · Jun 26, 2026

modelcontextprotocol/python-sdk v2.0.0a3

Pre-releases are opt-in only; pip install mcp still resolves to the stable 1.x line.

Key points

  • A new Connection object owns per-peer state with two factories - fromenvelope for the per-request stateless path and forloop for handshake-driven connections - so protocolversion is always set and the old stateless: bool flag is gone from ServerRunner, ServerSession, and Server.run().
  • Client side: ClientSession gains .discover() and .adopt() alongside .initialize(), each of which installs an outbound stamp closure at connect time so the send path has no era branch. Client gains mode='legacy'|'auto'|<version> and priordiscover=; mode='auto' probes server/discover and falls back to initialize on -32601 or timeout.
  • LATESTPROTOCOLVERSION is now "2026-07-28". SUPPORTEDPROTOCOLVERSIONS is deprecated in favour of HANDSHAKEPROTOCOLVERSIONS and MODERNPROTOCOLVERSIONS.
  • Protocol types split into a standalone mcp-types package (#2973)

Sources (1)

  • [1]modelcontextprotocol/python-sdk v2.0.0a3
    GitHub: modelcontextprotocol/python-sdk · Jun 26, 08:42 AM
    Pre-releases are opt-in only; `pip install mcp` still resolves to the stable 1.x line.
    A new `Connection` object owns per-peer state with two factories - `from_envelope` for the per-request stateless path and `for_loop` for handshake-driven connections - so `protocol_version` is always set and the old `stateless: bool` flag is gone from `ServerRunner`, `ServerSession`, and `Server.run()`.

Extractive summary: sentences quoted from the sources.