@@ -196,7 +196,7 @@ class OpenAIAgentsPlugin(temporalio.client.Plugin, temporalio.worker.Plugin):
196196 of model calls. If None, default parameters will be used.
197197 model_provider: Optional model provider for custom model implementations.
198198 Useful for testing or custom model integrations.
199- mcp_servers : Sequence of MCP servers to automatically register with the worker.
199+ mcp_server_providers : Sequence of MCP servers to automatically register with the worker.
200200 The plugin will wrap each server in a TemporalMCPServer if needed and
201201 manage their connection lifecycles tied to the worker lifetime. This is
202202 the recommended way to use MCP servers with Temporal workflows.
@@ -223,7 +223,7 @@ class OpenAIAgentsPlugin(temporalio.client.Plugin, temporalio.worker.Plugin):
223223 >>> # Create plugin with MCP servers
224224 >>> plugin = OpenAIAgentsPlugin(
225225 ... model_params=model_params,
226- ... mcp_servers =[filesystem_server]
226+ ... mcp_server_providers =[filesystem_server]
227227 ... )
228228 >>>
229229 >>> # Use with client and worker
@@ -242,7 +242,7 @@ def __init__(
242242 self ,
243243 model_params : Optional [ModelActivityParameters ] = None ,
244244 model_provider : Optional [ModelProvider ] = None ,
245- mcp_servers : Sequence [
245+ mcp_server_providers : Sequence [
246246 Union ["StatelessMCPServerProvider" , "StatefulMCPServerProvider" ]
247247 ] = (),
248248 ) -> None :
@@ -253,7 +253,7 @@ def __init__(
253253 of model calls. If None, default parameters will be used.
254254 model_provider: Optional model provider for custom model implementations.
255255 Useful for testing or custom model integrations.
256- mcp_servers : Sequence of MCP servers to automatically register with the worker.
256+ mcp_server_providers : Sequence of MCP servers to automatically register with the worker.
257257 Each server will be wrapped in a TemporalMCPServer if not already wrapped,
258258 and their activities will be automatically registered with the worker.
259259 The plugin manages the connection lifecycle of these servers.
@@ -276,7 +276,7 @@ def __init__(
276276
277277 self ._model_params = model_params
278278 self ._model_provider = model_provider
279- self ._mcp_servers = mcp_servers
279+ self ._mcp_server_providers = mcp_server_providers
280280
281281 def init_client_plugin (self , next : temporalio .client .Plugin ) -> None :
282282 """Set the next client plugin"""
@@ -340,13 +340,13 @@ def configure_worker(self, config: WorkerConfig) -> WorkerConfig:
340340 ]
341341 new_activities = [ModelActivity (self ._model_provider ).invoke_model_activity ]
342342
343- server_names = [server .name for server in self ._mcp_servers ]
343+ server_names = [server .name for server in self ._mcp_server_providers ]
344344 if len (server_names ) != len (set (server_names )):
345345 raise ValueError (
346346 f"More than one mcp server registered with the same name. Please provide unique names."
347347 )
348348
349- for mcp_server in self ._mcp_servers :
349+ for mcp_server in self ._mcp_server_providers :
350350 new_activities .extend (mcp_server ._get_activities ())
351351 config ["activities" ] = list (config .get ("activities" ) or []) + new_activities
352352
0 commit comments