When using AgentTool to call a sub-agent that uses MCP tools, ADK creates multiple MCP connections (9 observed) that all execute the same tool call in parallel, resulting in massive duplication (3x, 5x, 7x for different tools).
This causes 80% of API calls to be unnecessary duplicates, wasting resources and hitting rate limits faster.
Environment
- ADK Version: 1.19.0
- Python: 3.11.14
- OS: macOS 24.6.0
- MCP Server: GitHub Copilot MCP (https://api.githubcopilot.com/mcp/)
- Architecture: Orchestrator agent → github_search sub-agent (via AgentTool)
Steps to Reproduce
- Create an orchestrator agent with
AgentTool configured to call a sub-agent
- Configure the sub-agent to use MCP tools (e.g., GitHub MCP)
- Start ADK web server and invoke the orchestrator
- Observe logs showing multiple "Creating GitHub MCP connection" messages during startup
- Observe the same API call executed 3-7 times simultaneously with identical arguments