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.1.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.1-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansys_common_mcp-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 16f1b40eb715212dc1b161305d86ba100b1b0242c1ec6d31e5c63e36468fe822
MD5 b9bec3c2e0354b301fbbce57d9247299
BLAKE2b-256 63f9801f9e14163f6067d100ebfeef7cfb7699551aa0bc7311a7bbf7387de7e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_common_mcp-0.3.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_common_mcp-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b25437e0f00b698b24d58e684e5b297d869c02e53ac77a229289c4bb42f0d7cb
MD5 965a457bbc5d004d351623225504a29c
BLAKE2b-256 b1efca76196fd91603f04392beea14a1e8cf2d9695c3a013aa2bacd0cc95c90a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_common_mcp-0.3.1-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