Skip to content

MCP Tool List timeout issue #1743

@somens

Description

@somens

Hi,
While performing this codelab faced issues while communicating with agent. One main issue was faced that it was throwing an error like "ConnectionError: Failed to get tools from MCP server:" .

After further debugging looks like there are timeout issues . To resolve the same changed the code in tools.py and increased the timeout which helped in getting the intended result. But not sure if that is the correct fix or some other issue is there . This is just an observation and pls suggest if the fix is fine of not ?

https://codelabs.developers.google.com/adk-mcp-bigquery-maps?hl=en#6

Fix :-

tools = MCPToolset(
connection_params=StreamableHTTPConnectionParams(
url=MAPS_MCP_URL,
headers={
"X-Goog-Api-Key": maps_api_key
},
timeout=30.0
)
)

tools = MCPToolset(
connection_params=StreamableHTTPConnectionParams(
url=BIGQUERY_MCP_URL,
headers=HEADERS_WITH_OAUTH,
timeout=30.0
)
)

Thanks,
Somen

Metadata

Metadata

Assignees

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