modelcontextprotocol/python-sdk v2.0.0a3
Pre-releases are opt-in only; pip install mcp still resolves to the stable 1.x line.
ProofCode ↗
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.0a3GitHub: 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.
Before this
- Jun 16, 2026modelcontextprotocol/python-sdk v2.0.0a2
- Jun 16, 2026modelcontextprotocol/python-sdk v1.28.0
- Jun 11, 2026modelcontextprotocol/python-sdk v2.0.0a1
- May 29, 2026modelcontextprotocol/python-sdk v1.27.2
- May 15, 2026Gemini 3.5: frontier intelligence with action
- Apr 2, 2026modelcontextprotocol/python-sdk v1.27.0