The ``ansys.common.mcp`` library
================================
.. py:module:: ansys.common.mcp
Summary
-------
.. py:currentmodule:: mcp
.. tab-set::
.. tab-item:: Submodules
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~ansys.common.mcp.__main__`
- Entry point for running the MCP server as a module.
* - :py:obj:`~ansys.common.mcp.context`
- Common context definitions for PyAnsys MCP servers.
* - :py:obj:`~ansys.common.mcp.helpers`
- Helper utilities for the MCP server.
* - :py:obj:`~ansys.common.mcp.logging_config`
- Logging configuration for PyAnsys MCP servers.
* - :py:obj:`~ansys.common.mcp.server`
- Base MCP server infrastructure for PyAnsys libraries.
* - :py:obj:`~ansys.common.mcp.tools`
- Common tool implementations for PyAnsys MCP servers.
.. tab-item:: Classes
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~ansys.common.mcp.PyAnsysBaseAppContext`
- Base application context for PyAnsys MCP servers.
* - :py:obj:`~ansys.common.mcp.PersistentPythonSession`
- Maintains a persistent Python subprocess for stateful code execution.
* - :py:obj:`~ansys.common.mcp.PyAnsysBaseMCP`
- Base MCP server for PyAnsys libraries.
.. tab-item:: Functions
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~get_logger`
- Get a logger instance with the specified name.
* - :py:obj:`~setup_logging`
- Configure logging for MCP servers.
* - :py:obj:`~create_custom_plot`
- Create a custom plot using Matplotlib or PyVista in the persistent Python session.
* - :py:obj:`~execute_python_code`
- Execute Python code in the persistent Python session with automatic rule generation.
.. tab-item:: Attributes
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~__version__`
- PyAnsys Common MCP version.
.. toctree::
:titlesonly:
:maxdepth: 1
:hidden:
__main__
context
helpers
logging_config
server
tools
.. toctree::
:titlesonly:
:maxdepth: 1
:hidden:
PyAnsysBaseAppContext
PersistentPythonSession
PyAnsysBaseMCP
Description
-----------
Common Model Context Protocol (MCP) infrastructure for PyAnsys libraries.
This package provides base classes, utilities, and common tools that
PyAnsys product-specific MCP servers can extend and use.
..
!! processed by numpydoc !!
Module detail
-------------
.. py:data:: __version__
PyAnsys Common MCP version.
..
!! processed by numpydoc !!