Model Context Protocol (MCP) server for Ansys Lumerical through PyLumerical
Project description
PyLumerical MCP Server
PyLumerical MCP Server provides a Model Context Protocol (MCP) server that enables AI assistants to interact with Ansys Lumerical (FDTD, MODE, DEVICE, INTERCONNECT) through PyLumerical. This server enables natural language interaction with Lumerical for photonics and electromagnetic simulation workflows.
Overview
Key features:
- Multi-session management: Open, list, and close multiple concurrent Lumerical sessions (FDTD, MODE, DEVICE, INTERCONNECT) under user-chosen names.
- Persistent Python execution: Run arbitrary Python and PyLumerical code against live Lumerical handles, with state preserved across tool calls.
- Workflow guidance: Access context and best practices for Lumerical simulations.
- Cross platform support: Enable Windows and Linux support with headless CAD.
Prerequisites
- Python 3.11, 3.12, 3.13, or 3.14
- Ansys Lumerical installation
- Ansys Lumerical license
Installation
For users
Install the latest release with:
pip install ansys-lumerical-mcp
Or run directly without installing using uvx:
uvx --from git+https://github.com/ansys/pylumerical-mcp ansys-lumerical-mcp
For developers
Install
# Clone the repository
git clone https://github.com/ansys/pylumerical-mcp.git
cd pylumerical-mcp
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate or .venv\Scripts\Activate.ps1
pip install uv
# Install dependencies
uv sync
# Run
uv run ansys-lumerical-mcp
Quick start with VS Code or Cursor
If you're using the devopment container:
{
"servers": {
"pylumerical-mcp": {
"type": "stdio",
"command": "/workspaces/pylumerical-mcp/.venv/bin/ansys-lumerical-mcp",
"args": []
}
},
"inputs": []
}
Usage
For step-by-step setup instructions for VS Code, Claude Code, Claude Desktop, Cursor, and other MCP-compatible clients, follow your client's documentation.
License
This project is licensed under the Apache 2.0 license agreement. See the LICENSE file for details.
Resources
- PyLumerical-MCP documentation
- PyLumerical documentation
- Model Context Protocol
- FastMCP documentation
- Ansys Lumerical
- Repository's Issues page
- Repository's Discussions page
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_lumerical_mcp-0.1.0.tar.gz.
File metadata
- Download URL: ansys_lumerical_mcp-0.1.0.tar.gz
- Upload date:
- Size: 88.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5350deea880c8ee130b9e89697989c63240bf3cd007796497e1969fe14bbb71c
|
|
| MD5 |
2601f25dbec0e8c93dc4afcfdfd6d2bd
|
|
| BLAKE2b-256 |
34a0bb5a455da88473360b26a13123483a7fb65b03f4c8b7dfbf04bde9e9e254
|
Provenance
The following attestation bundles were made for ansys_lumerical_mcp-0.1.0.tar.gz:
Publisher:
ci.yml on ansys/pylumerical-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansys_lumerical_mcp-0.1.0.tar.gz -
Subject digest:
5350deea880c8ee130b9e89697989c63240bf3cd007796497e1969fe14bbb71c - Sigstore transparency entry: 2036048574
- Sigstore integration time:
-
Permalink:
ansys/pylumerical-mcp@0955bba6b9c3adaf3010b434191c77d89239b370 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ansys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0955bba6b9c3adaf3010b434191c77d89239b370 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ansys_lumerical_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ansys_lumerical_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 108.1 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 |
33a95d7d0952541c3f020e30ac2df26033029de784c86698b365f65b95c7c782
|
|
| MD5 |
9f9c35361908307bed97ce8e1d28bcf9
|
|
| BLAKE2b-256 |
03c5bbc6d32fe03e96e0b82d5250c698a47e3feffb82aead510fe1209ef9c2be
|
Provenance
The following attestation bundles were made for ansys_lumerical_mcp-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on ansys/pylumerical-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansys_lumerical_mcp-0.1.0-py3-none-any.whl -
Subject digest:
33a95d7d0952541c3f020e30ac2df26033029de784c86698b365f65b95c7c782 - Sigstore transparency entry: 2036048654
- Sigstore integration time:
-
Permalink:
ansys/pylumerical-mcp@0955bba6b9c3adaf3010b434191c77d89239b370 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ansys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0955bba6b9c3adaf3010b434191c77d89239b370 -
Trigger Event:
push
-
Statement type: