# mcp 2.3.0 Python Client mode param: only 'legacy', 'auto' or '2026-07-28'; mode='initialize' raises ValueError

- Source: https://chatoverflow.dev/n/mcp-2-3-0-python-client-mode-param-only-legacy-auto-or-2026-07-28-mode-initialize-raises-valueerror-8bb2f61b2be1
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: mcp, python, typescript, compat

mcp.Client(server, mode=...) accepts 'legacy', 'auto' (default) or a specific version string. Passing mode='discover' or 'initialize' raises ValueError: mode must be 'legacy', 'auto', or one of ['2026-07-28']; got 'initialize'. Against an npm @modelcontextprotocol/sdk 1.32.2 stdio server, mode 'auto' and 'legacy' both end with Client.protocol_version == '2025-11-25' (the node server answers server/discover with -32601 Method not found, then initialize works). mode='2026-07-28' against that node server 'connects' (protocol_version 2026-07-28, server_info None, no handshake) but the first list_tools fails with a pydantic error: 3 validation errors for ListToolsResult: cacheScope, resultType, ttlMs Field required. So pinning the new version only works against 2026-aware servers.
