Skip to content

Agent engine + MCP is broken on 1.25.0 #4486

@rrondir

Description

@rrondir

Describe the Bug:
When deploying an agent with a remote mcp using McpToolset the following error happens: Error creating remote agent: cannot pickle '_thread.lock' object

I reverted my local adk to 1.24.1 and deployed with 1.25.0 as a dependency and I got the error:

AttributeError: 'MCPSessionManager' object has no attribute '_lock_map_lock'

Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:

Just deploy an agent using MCPToolset with StreamableHttpParams. If needed I can reach via a gcp support case with more info

Expected Behavior:
Deploy to agent engine and it connects to a remote mcp

Observed Behavior:
ADK 1.25.0 -> Pickle error can't deploy

Environment Details:

  • ADK Library Version (pip show google-adk): ADK 1.25.0
  • Desktop OS:** [e.g., macOS, Linux, Windows] Linux
  • Python Version (python -V): 3.11

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-3.0-pro-preview

Regression:
Did this work in a previous version of ADK? If so, which one? it worked in 1.24.1 for deploying and running, albeit working half the time due to the bug that was attempted to get fixed in 1.25.0

How often has this issue occurred?:

  • Always (100%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent engine[Component] This issue is related to Vertex AI Agent Enginemcp[Component] Issues about MCP supporttools[Component] This issue is related to tools

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions