Repository navigation
Description
Packages: temporalio-google-genai and temporalio-google-adk on main.
Is your feature request related to a problem? Please describe.
OpenAI Agents and Strands run their MCP Activities on temporalio-mcp (python/mcp), so a fix there reaches all three packages. Recent examples are the lost-session retry (#379), the protocol errors wrapped in an ExceptionGroup (#411, #433), and the factory type check for #320.
Google GenAI and Google ADK each have their own MCP code instead:
temporalio-google-genai:_mcp.pyhas its own connection pool and{server}-list-tools/{server}-call-toolActivities forGoogleGenAIPlugin(mcp_servers={name: factory}), where a factory yields an MCPClientSession. Its docstring says the pool is modeled on the Strands plugin's old MCP client, which Breaking: run the Strands MCP activities through temporalio-mcp #190 replaced withtemporalio-mcp. Itsmcpextra needs MCP SDK v1 ([Feature Request] google_genai: support MCP SDK v2 in the mcp extra #415).temporalio-google-adk:_mcp.py(about 1,200 lines) runs ADK'sMcpToolsetfrom atoolset_factory, inTemporalMcpToolSetProviderandTemporalStatefulMcpToolSetProvider.
So each MCP fix has to land up to three times, and the copies drift. For example, neither Google plugin checks what its factory returns, which is the gap #320 fixes for the other two. I haven't run that case for these plugins.
Describe the solution you'd like
Consider moving both plugins' MCP support onto temporalio-mcp, the way #190 did for Strands. The worker registers mcp.Client factories, and the workflow-side tool or session calls the shared Activities. For Google GenAI this would also resolve #415, since temporalio-mcp uses MCP SDK v2.
Describe alternatives you've considered
Keep the separate code and port each temporalio-mcp fix by hand.
Additional context
Things to check before starting:
- Replay: the shared Activities are named
temporalio.mcp.{server}.*. Runs recorded with the current{server}-list-toolsand{server}-call-toolnames would fail replay after the move, as Strands runs did after Breaking: run the Strands MCP activities through temporalio-mcp #190. - Google ADK's stateful toolset keeps one MCP session open across a block of calls ([Bug] google_adk: a retried stateful MCP session Activity silently opens a new, empty MCP session #310, [Bug] google_adk: a second stateful MCP block with the same name reaches the first block's MCP session #380).
temporalio-mcphas no stateful sessions; OpenAI Agents keeps its stateful path outside it. - Both plugins would take a
temporalio-mcppin, as OpenAI Agents and Strands do.
Activity