module documentation

Temporal-aware mcp.ClientSession shim.

TemporalMcpClientSession is an mcp.ClientSession subclass that the user places in generate_content(config=GenerateContentConfig(tools=[...])) just like a real MCP session. The Gemini SDK recognizes it via isinstance(tool, McpClientSession) and, inside generate_content (which runs in the workflow), calls only two methods on it: list_tools() at tool discovery and call_tool(name, arguments) in the automatic-function-calling loop. Both are overridden here to dispatch to the {server}-list-tools / {server}-call-tool activities, so the real mcp.ClientSession lives only on the worker (registered via GoogleGenAIPlugin(mcp_servers=...)).

This mirrors strands' TemporalMCPClient: the handle carries only the server name (which selects the worker-side factory) plus activity options; the connection factory is never passed to the workflow or the root client.

Constant _DEFAULT_MCP_TIMEOUT Undocumented
_DEFAULT_MCP_TIMEOUT = (source) ΒΆ

Undocumented

Value
timedelta(seconds=60)