FDTD Lumerical MCP
by pcmdagonger
README.md
# FDTD Lumerical MCP
Local MCP server for controlling Ansys Lumerical FDTD from Codex.
The server uses the Lumerical Python Automation API (`lumapi`) from an existing
Ansys/Lumerical installation. `lumapi` is not installed from pip.
## Setup
```powershell
cd "C:\path\to\FDTD-Lumerical-mcp"
python -m pip install -e ".[dev]"
```
Set `LUMERICAL_API_PATH` if automatic discovery cannot find `lumapi.py`:
```powershell
$env:LUMERICAL_API_PATH = "C:\Program Files\Ansys Inc\vXXX\Lumerical\api\python\lumapi.py"
```
Optional workspace override:
```powershell
$env:FDTD_WORKSPACE = "C:\path\to\FDTD-Lumerical-mcp\workspace"
```
Run the server:
```powershell
python -m fdtd_mcp.server
```
## Verification
Run unit tests without opening FDTD:
```powershell
python -m pytest -q
```
Run the real MCP/FDTD smoke test:
```powershell
$env:FDTD_INTEGRATION = "1"
python -m pytest -q -m integration
```
## Codex MCP Config
See `.codex/config.toml.example`.
## Safety Model
Project and export file paths are restricted to `FDTD_WORKSPACE`, which defaults
to the repository `workspace/` directory when the MCP server is launched from
the project root.
Tools that execute user script or run simulations should stay in prompt approval
mode in Codex configuration.
TDQS
B3.4/5.0
Scored across 15 tools
Disambiguation5/5
Each tool targets a distinct operation: session management (fdtd_*), project CRUD (project_*), object CRUD (object_*), simulation running, result retrieval, script execution, and data export. No two tools have overlapping purposes.
Naming Consistency5/5
All tools follow a consistent <resource>_<verb> pattern in snake_case (e.g., object_add, project_load, fdtd_close). No mixing of conventions.
Tool Count5/5
15 tools is well-scoped for an FDTD simulation server, covering session, project, object, simulation, results, scripting, and data export without bloat.
Completeness4/5
Covers CRUD for projects and objects, simulation lifecycle, results, scripting, and export. Missing is a tool to list all objects in a project, which is a minor gap.
Maintenance
ActivityInactive
ResponsivenessNo issues