Skip to content

Support mcp 2.x (Python SDK): pin blocks mcp 2.0.0 #6532

Description

@ProgrammerPlus1998

Summary

adk-python currently pins the MCP Python SDK to the 1.x line and cannot be installed alongside mcp 2.0.0 (released 2026-07-28). This issue tracks the breaking changes in mcp 2.0 that affect the MCP tooling.

Current constraint

mcp>=1.24,<2pyproject.toml:86 (also referenced at :198, :246).

Breaking changes in mcp 2.0 that affect adk-python

In src/google/adk/tools/mcp_tool/, verified against the installed mcp==2.0.0 SDK:

  1. ClientSession(read_timeout_seconds=timedelta(...)) now takes a float.

    • session_context.py:324 and :338 — pass a float of seconds instead of timedelta.
  2. camelCase attribute reads on mcp.types → snake_case.

    • mcp_tool.py:204-205._mcp_tool.inputSchemainput_schema, and .outputSchemaoutput_schema.
  3. McpError renamed → MCPError.

    • mcp_tool.py:31 — import; mcp_tool.py:378except McpError. In 2.0 the name is MCPError (constructor MCPError(code, message, data=None)).
  4. Lowlevel mcp.server.fastmcp server API. _agent_to_mcp.py:26-27 builds a server via the in-SDK mcp.server.fastmcp.FastMCP, whose surface changed in 2.0 — this server-side path should be re-verified.

Notes

  • The streamable-HTTP client is already 2.0-ready: mcp_session_manager.py:66-68, 129-133 uses the new streamable_http_client name with the http_client= kwarg. The blockers are the three items above plus the server-side FastMCP path. A stale docstring reference to the old name at session_context.py:105 is cosmetic.
  • 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

Labels

mcp[Component] This issues is related to MCP support

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions