The ``server.py`` module
========================
.. py:module:: ansys.mechanical.mcp.server
Summary
-------
.. py:currentmodule:: server
.. tab-set::
.. tab-item:: Classes
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~ansys.mechanical.mcp.server.PyMechanicalAppContext`
- Application context with typed dependencies and CLI options.
* - :py:obj:`~ansys.mechanical.mcp.server.PyMechanicalMCP`
- FastMCP server for managing Mechanical instances.
* - :py:obj:`~ansys.mechanical.mcp.server.SessionContext`
- Session context for storing CLI options.
.. tab-item:: Functions
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~launcher`
- Launch PyMechanical-MCP.
.. tab-item:: Attributes
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~logger`
-
* - :py:obj:`~app`
-
* - :py:obj:`~session`
-
.. toctree::
:titlesonly:
:maxdepth: 1
:hidden:
PyMechanicalAppContext
PyMechanicalMCP
SessionContext
Description
-----------
Lifespan and CLI entry for PyMechanical-MCP server with startup options.
..
!! processed by numpydoc !!
Module detail
-------------
.. py:function:: launcher(argv: list[str] | None = None) -> None
Launch PyMechanical-MCP.
:Parameters:
**argv** : :class:`python:list`\[:class:`python:str`] | :data:`python:None`
Optional list of arguments for testing. If ``None``, ``sys.argv[1:]`` is used.
..
!! processed by numpydoc !!
.. py:data:: logger
.. py:data:: app
.. py:data:: session