Skip to main content

Common Model Context Protocol (MCP) server for PyAnsys libraries

Project description

PyAnsys Common MCP

PyAnsys Python Apache

PyAnsys Common MCP provides the infrastructure for building Model Context Protocol (MCP) servers for PyAnsys libraries.

Overview

This package provides the foundation for creating MCP servers that enable AI assistants (like Claude, ChatGPT) to interact with Ansys products through PyAnsys libraries.

Key features:

  • Persistent Python sessions: Maintains stateful code execution across multiple AI requests.
  • Lifecycle management: Handles startup, cleanup, and errors automatically.
  • Extensible architecture: Uses base classes and patterns for product-specific implementations.
  • Logging infrastructure: Uses pre-configured logging that does not interfere with the MCP protocol.

Installation

For users

The ansys.common.mcp package currently supports Python 3.10 through Python 3.14 on Windows, Mac OS, and Linux.

Install the latest package for use with this command:

pip install ansys-common-mcp

Alternatively, install the latest PyAnsys Common MCP GitHub package with this command:

pip install git+https://github.com/ansys/pyansys-common-mcp.git

For developers

If you are contributing to PyAnsys Common MCP or creating custom servers, install the package in developer mode:

# Clone the repository
git clone https://github.com/ansys/pyansys-common-mcp.git
cd pyansys-common-mcp

# Install in editable mode with development dependencies
pip install -e .[dev]

# Or install documentation dependencies for building documentation
pip install -e .[doc]

Quick start

To create an MCP server for your PyAnsys library, follow these three main steps:

  1. Define your custom context: Extend the PyAnsysBaseAppContext dataclass to store the product-specific state.
  2. Implement your MCP server: Extend the PyAnsysBaseMCP base class with startup and cleanup logic.
  3. Create MCP tools: Define tools that interact with your product.

Real-world example

For a complete, production-ready implementation, see the PyMAPDL-MCP repository.

Resources

For general PyAnsys questions, email pyansys.core@ansys.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_common_mcp-0.3.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_common_mcp-0.3.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file ansys_common_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: ansys_common_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ansys_common_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ca779d794e801f2f2c35a73eb70e06ca138d5395203f404ea4f64acb7db17bbd
MD5 18be86eb262296384a7ebef995621e8c
BLAKE2b-256 a925abf8a8c255c9b1f942d3b483d0aa1f523cabc3c1e4e5eed54cf0185f25d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_common_mcp-0.3.0.tar.gz:

Publisher: ci.yml on ansys/pyansys-common-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_common_mcp-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_common_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ebaecbec9231954579be87e0caaaadfa427d52c3efa9235b2163a4a5d676375
MD5 d02c049b98436a971e65a361fd4b0c23
BLAKE2b-256 66a59161e34fa082cf9ab8073a12c5f886a9f4cbd5fd53d0fc5da9d5ef83a3f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_common_mcp-0.3.0-py3-none-any.whl:

Publisher: ci.yml on ansys/pyansys-common-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page