class documentation
class TemporalMCPClient(ToolProvider): (source)
Constructor: TemporalMCPClient(server, task_queue, schedule_to_close_timeout, schedule_to_start_timeout, ...)
Workflow-side handle to an MCP server registered on the worker.
The transport factory and tool discovery live worker-side via StrandsPlugin(mcp_clients={"server": lambda: ...}). This handle only carries the server name (which selects the registered factory) and the per-call activity options.
Construct once at module level and pass to TemporalAgent(tools=[...]) inside the workflow. Multiple handles may reference the same server name with different activity options.
| Method | __init__ |
Configure the server name and activity options. |
| Method | add |
No-op; consumer tracking is handled by the underlying MCP client. |
| Async Method | load |
Return TemporalMCPTool wrappers for tools cached at worker startup. |
| Method | remove |
No-op; consumer tracking is handled by the underlying MCP client. |
| Property | server |
MCP server name used as the activity prefix. |
| Instance Variable | _options |
Undocumented |
| Instance Variable | _server |
Undocumented |
def __init__(self, server:
str, *, task_queue: str | None = None, schedule_to_close_timeout: timedelta | None = None, schedule_to_start_timeout: timedelta | None = None, start_to_close_timeout: timedelta | None = None, heartbeat_timeout: timedelta | None = None, retry_policy: RetryPolicy | None = None, cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, versioning_intent: VersioningIntent | None = None, summary: str | None = None, priority: Priority = Priority.default):
(source)
¶
Configure the server name and activity options.