autogen-ext: mcp 2.0.0 breaks MCP tools (no upper bound, uses removed/renamed 1.x APIs)
Summary
The autogen-ext MCP integration does not cap the MCP Python SDK, so pip install autogen-ext[mcp] now resolves to mcp 2.0.0 (released 2026-07-28) — and the code breaks on it, because it uses several mcp 1.x APIs that were removed or renamed in 2.0. This is a live latent bug today, not just a future migration concern.
Current constraint
mcp = ["mcp>=1.11.0"] — python/packages/autogen-ext/pyproject.toml:153 (no upper bound).
Breaking changes in mcp 2.0 that affect autogen-ext
All client-side, in python/packages/autogen-ext/src/autogen_ext/tools/mcp/, verified against the installed mcp==2.0.0 SDK:
streamablehttp_clientrenamed →streamable_http_client, 3-tuple → 2-tuple, and dropped kwargs._session.py:9—from mcp.client.streamable_http import streamablehttp_client; used at_session.py:50._session.py:50-54— unpacks a 3-tupleas (read, write, session_id_callback); 2.0 returns only(read, write)._session.py:47-48— passestimeout=/sse_read_timeout=(astimedelta), both removed in 2.0; timeouts must move onto anhttpx2.AsyncClientpassed ashttp_client=.
ClientSession(read_timeout_seconds=timedelta(...))now takes a float._session.py:27, :38, :59— pass a float of seconds instead oftimedelta.
camelCase attribute reads on
mcp.types→ snake_case..inputSchema→input_schema:_base.py:50,_workbench.py:302-304.isError→is_error:_base.py:122,_workbench.py:347
sse_client(**server_params.model_dump(...))at_session.py:34— passes the full params dict; if it includes kwargs removed in 2.0, this path also breaks and should be re-verified.
Notes
- Short term, capping
mcp<2would stop the breakage; the longer-term fix is the migration above. - Dependency-floor updates.
mcp2.0 requirespydantic>=2.12,anyio>=4.9,typing-extensions>=4.13, and adds required depsopentelemetry-apiandmcp-types(exact-pinned to the SDK version); the SDK's HTTP layer moved fromhttpx/httpx-ssetohttpx2>=2.5.0.
Happy to help with a PR if the maintainers are open to it.
Source: microsoft/autogen