class documentation

class StatelessMCPServerProvider: (source)

Constructor: StatelessMCPServerProvider(server_factory)

View In Hierarchy

A stateless MCP server implementation for Temporal workflows.

This class wraps a function to create MCP servers to make them stateless by executing each MCP operation as a separate Temporal activity. Each operation (list_tools, call_tool, etc.) will connect to the underlying server, execute the operation, and then clean up the connection.

This approach will not maintain state across calls. If the desired MCPServer needs persistent state in order to function, this cannot be used.

Method __init__ Initialize the stateless temporal MCP server.
Property name Get the server name.
Method _get_activities Undocumented
Instance Variable _name Undocumented
Instance Variable _server_factory Undocumented
def __init__(self, server_factory: Callable[[], MCPServer]): (source)

Initialize the stateless temporal MCP server.

Parameters
server_factory:Callable[[], MCPServer]A function which will produce MCPServer instances. It should return a new server each time so that state is not shared between workflow runs

Get the server name.

def _get_activities(self) -> Sequence[Callable]: (source)

Undocumented

Undocumented

_server_factory = (source)

Undocumented