FluidsLeafMCP#
- class ansys.cfx.mcp.common.base.FluidsLeafMCP(*, backends: dict[str, ansys.cfx.mcp.common.backend.Backend], expose_tools: Iterable[str] = ALL_TOOLS, hide_connection_tools: bool = False, conversation_store: ansys.cfx.mcp.common.conversation.ConversationStore | None = None, codegen_pipeline: ansys.cfx.mcp.common.codegen.CodegenPipeline | None = None, name: str | None = None, **fastmcp_kwargs: Any)#
Bases:
ansys.common.mcp.server.PyAnsysBaseMCPBase server class for a single shared MCP leaf.
Overview#
Run the MCP server event loop for the configured transport. |
|
Run product-specific startup hooks before serving MCP requests. |
|
Run product-specific cleanup hooks before shutdown. |
|
Build toolset metadata for the tools exposed by this leaf server. |
|
Register a callback that observes successful run-code executions. |
Return the currently active backend instance. |
Import detail#
from ansys.cfx.mcp.common.base import FluidsLeafMCP
Property detail#
- property FluidsLeafMCP.backend: ansys.cfx.mcp.common.backend.Backend#
Return the currently active backend instance.
- Returns:
BackendValue computed by the helper for the requested CFX workflow.
Attribute detail#
Method detail#
- FluidsLeafMCP.run(transport: str = 'stdio', host: str | None = None, port: int | None = None) None#
Run the MCP server event loop for the configured transport.
- Parameters:
- Returns:
NoneNo value is returned; side effects are applied to the relevant cache, session, or server.
- FluidsLeafMCP.product_startup() None#
Run product-specific startup hooks before serving MCP requests.
- Returns:
NoneNo value is returned; side effects are applied to the relevant cache, session, or server.
- FluidsLeafMCP.product_cleanup() None#
Run product-specific cleanup hooks before shutdown.
- Returns:
NoneNo value is returned; side effects are applied to the relevant cache, session, or server.
- FluidsLeafMCP.build_toolsets() list[dict[str, Any]]#
Build toolset metadata for the tools exposed by this leaf server.