Lumerical MCP Server
MCP (Model Context Protocol) server for controlling Lumerical FDTD simulations from LLMs.
Installation
cd lumerical-mcp
pip install -e .
Configuration
Required Environment Variable
# Windows (PowerShell)
$env:LUMERICAL_ROOT = "D:\Program Files\ANSYS Inc\v251\Lumerical"
# Windows (cmd)
set LUMERICAL_ROOT=D:\Program Files\ANSYS Inc\v251\Lumerical
# Linux/macOS
export LUMERICAL_ROOT=/opt/lumerical/v251
Optional Environment Variables
| Variable | Default | Description |
|---|---|---|
MCP_HOST |
127.0.0.1 |
Server bind address |
MCP_PORT |
8000 |
Server port |
MCP_TRANSPORT |
streamable-http |
Transport protocol (streamable-http or stdio) |
MCP_WORK_DIR |
Current directory | Working directory for relative paths |
MCP_LOG_LEVEL |
INFO |
Log level (DEBUG, INFO, WARNING, ERROR) |
Config File (Optional)
Create ~/.config/lumerical-mcp/config.json:
{
"MCP_HOST": "127.0.0.1",
"MCP_PORT": 8000,
"MCP_TRANSPORT": "streamable-http",
"MCP_WORK_DIR": "C:/Users/name/projects/lumerical",
"MCP_LOG_LEVEL": "INFO"
}
Environment variables take precedence over config file.
Running the Server
lumerical-mcp
Or with custom settings:
MCP_PORT=9000 MCP_TRANSPORT=stdio lumerical-mcp
Available Tools
| Tool | Description |
|---|---|
hello |
Connectivity check |
start_fdtd / end_fdtd |
Start/stop FDTD API session |
open_projects / fdtd_load_project_tool |
Load .fsp project |
save_project / fdtd_save_project_tool |
Save project |
set_parameter |
Set object property |
run_simulation / fdtd_run_simulation_tool |
Run simulation |
get_transmission |
Get transmission spectrum from monitor |
fdtd_eval_script_tool |
Execute Lumerical script |
fdtd_eval_script_get_tool |
Execute script and return variable |
fdtd_run_script_file_tool |
Run .lsf/.lsfx script file |
fdtd_get_variable_tool / fdtd_put_variable_tool |
Read/write script variables |
fdtd_launch_gui_tool |
Launch Lumerical GUI |
fdtd_command_docs_tool |
Search command documentation |
Client Usage
# Using the test client
python client_test.py
# Or with custom server address
MCP_HOST=192.168.1.100 MCP_PORT=9000 python client_test.py
LLM Client Configuration
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"lumerical": {
"command": "lumerical-mcp",
"env": {
"LUMERICAL_ROOT": "D:\\Program Files\\ANSYS Inc\\v251\\Lumerical"
}
}
}
}
VS Code / Continue / Other MCP Clients
{
"mcpServers": {
"lumerical": {
"command": "lumerical-mcp",
"args": [],
"env": {
"LUMERICAL_ROOT": "/opt/lumerical/v251"
}
}
}
}
Development
pip install -e .[dev]
ruff check .
pytest
License
MIT
Metadata
Release files for lumerical-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lumerical_mcp-0.1.1.tar.gz | 6.8 kB | Without provenance | Details for lumerical_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lumerical_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for lumerical_mcp-0.1.1-py3-none-any.whl |
Total release size: 13.8 kB
Release files / lumerical_mcp-0.1.1.tar.gz
| Download URL | lumerical_mcp-0.1.1.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84f7fecaa5a764513ebff01a4aa81837f37d61185915ffc23d89d0d700e2af28
|
|
BLAKE2b-256 checksum How to use checksums |
1d0b652b09fc2371eb0a181fa271e8cc01188840e14ab0c79dc17fad02f3d953
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / lumerical_mcp-0.1.1-py3-none-any.whl
| Download URL | lumerical_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5c487b7526c7768c708f908b38520159de4070d34e3ae949d3fcbfab257d395
|
|
BLAKE2b-256 checksum How to use checksums |
4100c59580411544e8d35773c610579b5855d071954ae39d40d3eea8ebef5345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Security for lumerical-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.