The ansys.common.mcp library#

Summary#

__main__

Entry point for running the MCP server as a module.

context

Common context definitions for PyAnsys MCP servers.

helpers

Helper utilities for the MCP server.

logging_config

Logging configuration for PyAnsys MCP servers.

server

Base MCP server infrastructure for PyAnsys libraries.

tools

Common tool implementations for PyAnsys MCP servers.

PyAnsysBaseAppContext

Base application context for PyAnsys MCP servers.

PersistentPythonSession

Maintains a persistent Python subprocess for stateful code execution.

PyAnsysBaseMCP

Base MCP server for PyAnsys libraries.

get_logger

Get a logger instance with the specified name.

setup_logging

Configure logging for MCP servers.

create_custom_plot

Create a custom plot using Matplotlib or PyVista in the persistent Python session.

execute_python_code

Execute Python code in the persistent Python session with automatic rule generation.

__version__

PyAnsys Common MCP version.

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.

Module detail#

mcp.__version__#

PyAnsys Common MCP version.