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.2.tar.gz (21.4 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.2-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansys_common_mcp-0.3.2.tar.gz
  • Upload date:
  • Size: 21.4 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.2.tar.gz
Algorithm Hash digest
SHA256 085474f680dd83d52fdbabc5208fb8640b12f9aa2f5d6e802d1c3eb5ec421949
MD5 b4d16a5a93d7453d8a5c4d0e7a0b2448
BLAKE2b-256 0b4f79bfbdc02163cc09f1c48085e38a546702cf0773f381c88e5ab195e389c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ansys_common_mcp-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6bccc9964b51e07948aadeec32d219bc6740cc9cc837e94c6a2b9ab588fe7a1
MD5 0aa227e73ed95e19b910304554a74f2e
BLAKE2b-256 e454c8c5899a7178a1f07b4cfaa9ec5fcbdddc810e003e05badc38813d0abe6d

See more details on using hashes here.

Provenance

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