PyMAPDLAppContext#
- class ansys.mapdl.mcp.server.PyMAPDLAppContext#
Bases:
ansys.common.mcp.context.PyAnsysBaseAppContextApplication context with typed dependencies and CLI options.
- Attributes:
- mapdl
Optional[Any] MAPDL instance connection. Using Any to avoid type issues with MAPDL variants.
- transport_type
str Transport type for MCP server (‘stdio’ or ‘http’).
- mapdl_ip
Optional[str] IP address or hostname for MAPDL connection.
- mapdl_port
Optional[int] Port number for MAPDL connection.
- connect_on_startupbool
Whether to attempt MAPDL connection on MCP startup.
- http_host
str Host address for HTTP transport.
- http_port
int Port number for HTTP transport.
- cors_origins
Optional[list[str]] List of allowed CORS origins for HTTP transport.
- mapdl
Overview#
Returns the default MAPDL instance for backward compatibility. |
Import detail#
from ansys.mapdl.mcp.server import PyMAPDLAppContext