class documentation

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_consumer No-op; consumer tracking is handled by the underlying MCP client.
Async Method load_tools Return TemporalMCPTool wrappers for tools cached at worker startup.
Method remove_consumer 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.

def add_consumer(self, consumer_id: Any, **_kwargs: Any): (source)

No-op; consumer tracking is handled by the underlying MCP client.

async def load_tools(self, **_kwargs: Any) -> Sequence[AgentTool]: (source)

Return TemporalMCPTool wrappers for tools cached at worker startup.

def remove_consumer(self, consumer_id: Any, **_kwargs: Any): (source)

No-op; consumer tracking is handled by the underlying MCP client.

MCP server name used as the activity prefix.

_options: dict[str, Any] = (source)

Undocumented

Undocumented