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
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