class documentation
class StatelessMCPServerProvider: (source)
Constructor: StatelessMCPServerProvider(name, server_factory)
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 | _create |
Undocumented |
| Method | _get |
Undocumented |
| Instance Variable | _name |
Undocumented |
| Instance Variable | _server |
Undocumented |
| Instance Variable | _server |
Undocumented |
def __init__(self, name:
str, server_factory: Callable[ [], MCPServer] | Callable[ [ (Any | None)], MCPServer]):
(source)
¶
Initialize the stateless temporal MCP server.
| Parameters | |
name:str | The name of the MCP server. |
serverCallable[ | A function which will produce MCPServer instances. It should return a new server each time so that state is not shared between workflow runs. |