Skip to main content
Glama
cst-rf-mcp
by JOEYZYC

CST Studio MCP/CLI

A local Python automation core for CST Studio Suite 2026.2, with a CLI (cst-rf) and a stdio MCP server (cst-rf-mcp) sharing the same service, schemas, result envelopes and audit trail.

简体中文 · Architecture · Tool catalog · Acceptance status

Development preview (0.1.0.dev0), not a fully validated unattended simulation product. Registering a tool does not mean that its CST History commands or solver behavior passed live acceptance.

Capabilities and status

  • Inspect: discover/connect to a CST Design Environment, check the expected project identity, inspect the model tree, parameters, boundaries and Floquet modes. Saved results and the locally installed CST help can be read offline.

  • Model safely: copy a source .cst project to an operation-specific scratch, then use structured parameters and fixed History templates; source projects are never live write targets. No arbitrary VBA or shell execution is exposed.

  • Metasurfaces: set Floquet mode counts and incidence angles; calculate R/T/A and PCR from explicit saved complex channels and their real frequency axes. Export CSV, HTML and Touchstone with the recorded reference impedance. A claimed T=0 is an assumption requiring independent complete-backplane evidence, not an inference from missing transmission data.

  • Jobs and safety: require confirm=true for mutation and solver actions, confine writes to CST_WORK_DIR, use a cross-process project lock and append-only audit. Ambiguous solver outcomes stay unknown and block later writes rather than being reported as successful stops.

One periodic unit-cell solve, its S-parameter/R/T/A/PCR analysis, Floquet mode and incidence-angle readback, and selected exports passed local CST 2026.2 acceptance. Finite-array replication, circular-polarization switching, successful solver stopping, parameter sweeps and the patch-antenna recipe have not passed complete live acceptance. The last local stop experiment has an unresolved unknown job; do not treat its later CST SUCCESS as proof of a successful stop. See the public acceptance summary and metasurface status.

Related MCP server: cst-mcp

Architecture

CLI / MCP stdio -> shared ToolSpec registry -> Service (schemas, audit, lock)
                                      -> core/session (single CST worker thread)
                                      -> fixed History / official CST Python API
                                      -> saved-results and workflow adapters

cst.interface is used from its original CST installation location; cst.results.ProjectFile(..., allow_interactive=False) reads saved data without starting CST. The CLI exposes a subset of the MCP tool catalog. See architecture for trust boundaries and lifecycle.

Install and run (Windows)

Requires Python 3.12, a licensed CST Studio Suite installation for live tools, and a compatible CST-provided Python library. The repository does not ship CST binaries, help files, or results. A conventional installation path is C:\Program Files\CST Studio Suite 2026; set CST_PATH for another location.

conda env create -f environment.yml
$env:CST_PATH = 'C:\Program Files\CST Studio Suite 2026'
$env:PYTHONPATH = "$env:CST_PATH\AMD64\python_cst_libraries"
$env:CST_WORK_DIR = Join-Path $HOME 'Documents\cst-rf-work'
conda run -n cst-rf-mcp cst-rf inspect status --json
conda run -n cst-rf-mcp cst-rf tools list --json

The public environment recipe defaults to manual connection and does not auto-launch CST. Set CST_WORK_DIR to a private writable folder before any mutation or solve. An existing conda environment may retain older environment variables: inspect it with conda env config vars list -n cst-rf-mcp before running; editing environment.yml does not reset an already activated process. Automatic launch/open/switch/popup handling is an explicit high-risk opt-in, not a safe installation default. Unknown dialogs are not clicked blindly. CST_TOOLSET currently does not filter tools and is not an authorization boundary; configure MCP client permissions separately. The MCP executable is cst-rf-mcp; do not expose all mutation and solver tools to untrusted agents.

Verify without CST

conda run -n cst-rf-mcp ruff check .
conda run -n cst-rf-mcp ruff format --check .
conda run -n cst-rf-mcp mypy src tests
conda run -n cst-rf-mcp pytest -m "not live and not solver"

GitHub Actions runs the same offline checks on Windows. Real CST acceptance requires separate opt-in and is never part of the default test suite. Reference code was not incorporated; see provenance and reference audit.

License

Apache-2.0; see LICENSE. This is an independent project and is not affiliated with or endorsed by Dassault Systèmes.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Python-first MCP server for CST Studio Suite (2024–2026) that lets AI assistants drive CST from Windows: open projects, build geometry, set materials and ports, run solvers, read S-parameters and farfield metrics, and generate design reports.
      2
      184
      18
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Turns CST Studio Suite into an AI-controllable electromagnetic design lab, enabling conversational THz metamaterial absorber design, unit-cell automation, Floquet port control, batch solve with checkpoint-resume, and surrogate-model predictions.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables natural-language control of CST Studio Suite for electromagnetic simulation, covering modeling, materials, ports, solvers, result reading, and VBA scripting, with an embedded knowledge base and constraint hooks that self-evolve through use.
      10
      Apache 2.0
    • A
      license
      C
      quality
      C
      maintenance
      Enables an MCP client to drive CST Studio Suite 2026 through its official Python automation API, covering 3D modelling, materials, ports, boundaries, mesh and solver configuration, solver runs, and result reading. Also provides verification and export tools — S11, reference impedance, port diagnostics, energy budget and model audit — plus Touchstone/ASCII/JSON evidence output and parameter sweeps, all locally over stdio.
      84
      6
      MIT