The context.py module#

Summary#

SessionInfo

Metadata for one Lumerical CAD session.

PyLumericalContext

Multi-session context for the PyLumerical MCP server.

_lifespan_context

Pull the typed application context off a FastMCP request context.

Description#

Application context for the PyLumerical MCP server.

Extends ansys.common.mcp.PyAnsysBaseAppContext with a per-name sessions registry that mirrors the Lumerical handles living inside the framework’s persistent Python subprocess. The dictionary here is metadata only. The live FDTD/MODE/DEVICE/INTERCONNECT instances live in the subprocess and are reached via the seeded _lum_get(name) helper.

Module detail#