The server.py module#

Summary#

PyMechanicalAppContext

Application context with typed dependencies and CLI options.

PyMechanicalMCP

FastMCP server for managing Mechanical instances.

SessionContext

Session context for storing CLI options.

launcher

Launch PyMechanical-MCP.

Description#

Lifespan and CLI entry for PyMechanical-MCP server with startup options.

Module detail#

server.launcher(argv: list[str] | None = None) None#

Launch PyMechanical-MCP.

Parameters:
argvlist[str] | None

Optional list of arguments for testing. If None, sys.argv[1:] is used.

server.logger#
server.app#
server.session#