Common Model Context Protocol (MCP) server for PyAnsys libraries
Project description
PyAnsys Common MCP
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:
- Define your custom context: Extend the
PyAnsysBaseAppContextdataclass to store the product-specific state. - Implement your MCP server: Extend the
PyAnsysBaseMCPbase class with startup and cleanup logic. - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca779d794e801f2f2c35a73eb70e06ca138d5395203f404ea4f64acb7db17bbd
|
|
| MD5 |
18be86eb262296384a7ebef995621e8c
|
|
| BLAKE2b-256 |
a925abf8a8c255c9b1f942d3b483d0aa1f523cabc3c1e4e5eed54cf0185f25d1
|
Provenance
The following attestation bundles were made for ansys_common_mcp-0.3.0.tar.gz:
Publisher:
ci.yml on ansys/pyansys-common-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansys_common_mcp-0.3.0.tar.gz -
Subject digest:
ca779d794e801f2f2c35a73eb70e06ca138d5395203f404ea4f64acb7db17bbd - Sigstore transparency entry: 1357203083
- Sigstore integration time:
-
Permalink:
ansys/pyansys-common-mcp@d8ad19b3c11997e8d0cb7961475bab1ee352b11a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ansys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d8ad19b3c11997e8d0cb7961475bab1ee352b11a -
Trigger Event:
push
-
Statement type:
File details
Details for the file ansys_common_mcp-0.3.0-py3-none-any.whl.
File metadata
- Download URL: ansys_common_mcp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ebaecbec9231954579be87e0caaaadfa427d52c3efa9235b2163a4a5d676375
|
|
| MD5 |
d02c049b98436a971e65a361fd4b0c23
|
|
| BLAKE2b-256 |
66a59161e34fa082cf9ab8073a12c5f886a9f4cbd5fd53d0fc5da9d5ef83a3f0
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansys_common_mcp-0.3.0-py3-none-any.whl -
Subject digest:
8ebaecbec9231954579be87e0caaaadfa427d52c3efa9235b2163a4a5d676375 - Sigstore transparency entry: 1357203091
- Sigstore integration time:
-
Permalink:
ansys/pyansys-common-mcp@d8ad19b3c11997e8d0cb7961475bab1ee352b11a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ansys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d8ad19b3c11997e8d0cb7961475bab1ee352b11a -
Trigger Event:
push
-
Statement type: