Skip to main content
Glama
FDTD Lumerical MCP

FDTD Lumerical MCP

by pcmdagonger

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

cd "C:\path\to\FDTD-Lumerical-mcp"
python -m pip install -e ".[dev]"

Set LUMERICAL_API_PATH if automatic discovery cannot find lumapi.py:

$env:LUMERICAL_API_PATH = "C:\Program Files\Ansys Inc\vXXX\Lumerical\api\python\lumapi.py"

Optional workspace override:

$env:FDTD_WORKSPACE = "C:\path\to\FDTD-Lumerical-mcp\workspace"

Run the server:

python -m fdtd_mcp.server

Related MCP server: mcp-kicad

Verification

Run unit tests without opening FDTD:

python -m pytest -q

Run the real MCP/FDTD smoke test:

$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.

Available Tools

15 tools
data_exportC

Export data to FDTD_WORKSPACE, optionally using a Lumerical script.

Inputs: path (required), script. Returns: object

fdtd_closeA

Close the active FDTD session.

Inputs: no named parameters. Returns: object

fdtd_runB

Run the active FDTD simulation.

Inputs: no named parameters. Returns: object

fdtd_startC

Start a local Ansys Lumerical FDTD GUI session.

Inputs: hide, project_path. Returns: object

fdtd_statusA

Return FDTD MCP session status.

Inputs: no named parameters. Returns: object

object_addC

Create an FDTD object with a Lumerical add* command.

Inputs: command (required), properties. Returns: object

object_deleteC

Delete a named FDTD object.

Inputs: name (required). Returns: object

object_getC

Read selected properties from a named FDTD object.

Inputs: name (required), properties. Returns: object

object_setC

Set properties on a named FDTD object.

Inputs: name (required), properties (required). Returns: object

project_loadA

Load an .fsp project from FDTD_WORKSPACE.

Inputs: path (required). Returns: object

project_newA

Create a new blank FDTD project in the active session.

Inputs: no named parameters. Returns: object

project_saveC

Save the active FDTD project under FDTD_WORKSPACE.

Inputs: path. Returns: object

result_getC

Read a result dataset from a named FDTD object.

Inputs: object_name (required), result_name (required). Returns: object

script_evalC

Evaluate Lumerical script code in the active FDTD session.

Inputs: code (required), return_vars. Returns: object

script_run_fileC

Run a Lumerical script file from FDTD_WORKSPACE.

Inputs: path (required), return_vars. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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 recent community issues

    Related MCP Connectors

    Related MCP Servers