Skip to content

autogen-ext: mcp 2.0.0 breaks MCP tools (no upper bound, uses removed/renamed 1.x APIs) #8014

Description

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:

  1. streamablehttp_client renamed → streamable_http_client, 3-tuple → 2-tuple, and dropped kwargs.

    • _session.py:9from mcp.client.streamable_http import streamablehttp_client; used at _session.py:50.
    • _session.py:50-54 — unpacks a 3-tuple as (read, write, session_id_callback); 2.0 returns only (read, write).
    • _session.py:47-48 — passes timeout= / sse_read_timeout= (as timedelta), both removed in 2.0; timeouts must move onto an httpx2.AsyncClient passed as http_client=.
  2. ClientSession(read_timeout_seconds=timedelta(...)) now takes a float.

    • _session.py:27, :38, :59 — pass a float of seconds instead of timedelta.
  3. camelCase attribute reads on mcp.types → snake_case.

    • .inputSchemainput_schema: _base.py:50, _workbench.py:302-304
    • .isErroris_error: _base.py:122, _workbench.py:347
  4. 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<2 would stop the breakage; the longer-term fix is the migration above.
  • Dependency-floor updates. mcp 2.0 requires pydantic>=2.12, anyio>=4.9, typing-extensions>=4.13, and adds required deps opentelemetry-api and mcp-types (exact-pinned to the SDK version); the SDK's HTTP layer moved from httpx/httpx-sse to httpx2>=2.5.0.

Happy to help with a PR if the maintainers are open to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions