PyAEDTAppContext#

class ansys.aedt.mcp.server.PyAEDTAppContext#

Bases: ansys.common.mcp.context.PyAnsysBaseAppContext

Application context with typed dependencies and CLI options.

Attributes:
desktopOptional[Any]

AEDT instance connection. Using Any avoids type issues.

transport_typestr

Transport type for MCP server. Options are "stdio" or "http".

aedt_machineOptional[str]

Machine name or IP address for the AEDT connection.

aedt_portOptional[int]

Port number for the AEDT gRPC connection.

aedt_versionOptional[str]

Version of AEDT to use.

non_graphicalbool

Whether to run AEDT in non-graphical mode.

connect_on_startupbool

Whether to attempt AEDT connection on MCP startup.

include_context_toolsbool

Whether to register optional context helper tools.

dynamic_tool_discoverybool

Whether tool visibility should be dynamically gated by AEDT connection state.

http_hoststr

Host address for HTTP transport.

http_portint

Port number for HTTP transport.

cors_originsOptional[list[str]]

List of allowed CORS origins for HTTP transport.

Overview#

Import detail#

from ansys.aedt.mcp.server import PyAEDTAppContext

Property detail#

property PyAEDTAppContext.product_instance: Any | None#

Default AEDT instance for backward compatibility.

Returns:
Optional[Any]

Default AEDT instance or None if not connected.

Attribute detail#

PyAEDTAppContext.desktop: Any | None = None#
PyAEDTAppContext.transport_type: str = 'stdio'#
PyAEDTAppContext.aedt_machine: str | None = None#
PyAEDTAppContext.aedt_port: int | None = None#
PyAEDTAppContext.aedt_version: str | None = None#
PyAEDTAppContext.non_graphical: bool = True#
PyAEDTAppContext.connect_on_startup: bool = False#
PyAEDTAppContext.include_context_tools: bool = False#
PyAEDTAppContext.dynamic_tool_discovery: bool = False#
PyAEDTAppContext.http_host: str = '127.0.0.1'#
PyAEDTAppContext.http_port: int = 8080#
PyAEDTAppContext.cors_origins: list[str] | None = None#