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.
Hi — I’m interested in helping with this, but I’d like to confirm the intended scope before starting implementation.
The immediate breakage appears to come from autogen-ext allowing mcp>=1.11.0 with no upper bound while the integration still targets MCP SDK 1.x APIs. I see two reasonable scopes:
- A minimal compatibility fix that caps the dependency at
mcp<2to restore reliable installs with the current implementation. - A full MCP 2.0 migration covering the renamed streamable HTTP client, changed tuple and timeout behavior,
ClientSessiontimeout typing, and snake_case schema/result attributes.
For the minimal fix, I would add a dependency-resolution regression check plus MCP import/smoke coverage. For a full migration, I would add deterministic tests for stdio, SSE, and streamable HTTP session setup, along with tool schema and error-result conversion, using mocks/fakes rather than external services.
Would maintainers prefer the compatibility cap or the full migration? If this is open to an external contribution, please confirm the scope and assign the issue if assignment is part of the workflow. I’ll wait for that direction before opening a PR.
Ran into this one myself a few weeks back...... quick unblock is pinning the SDK: pip install "mcp<2" and autogen-ext's MCP tools work again while upstream decides. There's an open PR (#8021) capping mcp>=1.11.0,<2 if you want to add signal; heads up that mcp 2.0 also drags in pydantic>=2.12 and anyio>=4.9, so a fresh venv helps when you test the migration.