cst-sim
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cst-simSimulate a 2.4 GHz patch antenna and return S11."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cst-sim-agent
A Claude Code plugin that turns CST Studio Suite into a conversational electromagnetic simulation assistant via MCP.
AI for Science (AI4S) is pushing AI from "chatting" toward "actually doing research and engineering."
For electromagnetic simulation, a real bottleneck is this: an agent needs to operate professional software like CST, yet cannot communicate with it smoothly — even after a successful connection, it doesn't know the correct VBA method names or the CST-adapted Python idioms. General-purpose LLMs were never trained on how to operate CST; writing raw code produces invented phantom methods, and a single (10091) error can waste hours.
cst-sim-agent solves this with a three-layer design: an MCP toolset lets natural language drive modeling → material assignment → port setup → solving → result reading; an embedded domain knowledge base (an 8-domain VBA syntax library, 158 official examples, pitfall checklists) lets the agent look things up and use them directly — without re-reading technical documentation, re-learning interface settings, or even re-learning physics when switching application domains, the way a human engineer would have to; constraint hooks check the library before writing VBA and check the CST message window after execution, guarding against hallucination and silent failure. In end-to-end validation practice, this mechanism completed close to 20 multi-method simulation projects in 2 days (modeling, method switching, parametric comparison) — the same output would take weeks through a purely manual workflow. More importantly, the mechanism self-evolves with your use — every pitfall you hit and every experience you validate is guided back into the knowledge base at wrap-up, forming a "use → consolidate → reuse" loop: the more you use it, the smarter it gets, and the smoother similar tasks run.
Our vision is to bring AI for Science onto engineers' and researchers' simulation workbenches — not to replace engineers, but to extend humanity's ability to do science through physical simulation: leave the repetitive, mechanical operations and cross-domain learning to the agent, keep humans in electromagnetic design and physical judgment, and free human engineers.
Features
Category | Tools |
Connection & project |
|
Geometry query |
|
Modeling primitives |
|
Materials |
|
Solver |
|
SBR/RCS |
|
VBA/scripting |
|
Operations |
|
Related MCP server: CST Studio Orchestrator MCP
Maturity & verification
This plugin grew out of several CST automation engineering projects, iterated internally over multiple rounds, and passed an independent blind acceptance test before its first public release. Verified coverage: installation & hooks, connecting to a real CST instance, the official patch-antenna tutorial end to end, knowledge base & residue review. Not yet fully covered: multi-version CST compatibility, more complex models, and more tool combinations — these need community developers to validate together.
The end-to-end official example (circular patch antenna, 2–3 GHz) ran through: S11 resonance at 2.40 GHz, matching CST's official tutorial reference value (≈2.4 GHz). See the verification report. Watch the demo video on Bilibili: https://www.bilibili.com/video/BV1CC896qEAt/
Technology selection and design decisions (VBA channel primary, official API auxiliary) are documented in the architecture document.
Prerequisites
Windows (CST's COM interface lives on Windows)
CST Studio Suite 2024/2025/2026 (2026 recommended; older versions should work but are not individually verified)
Python 3.10+ (including the Windows
pylauncher — ships with the official Python installer; the MCP server starts viapy -3and does not depend onpythonbeing on PATH)Python dependencies:
pip install -r requirements.txt(mcp,pywin32)
CST official Python library path resolution (src/controller.py, src/connection.py):
Read the environment variable
CST_INSTALL_DIRfirst (points to the CST installation root, e.g.C:\Program Files\CST Studio Suite 2026)Otherwise auto-detect common install locations (
C:\Program Files\CST Studio Suite 202x, etc.)
Setting the
CST_INSTALL_DIRenvironment variable is recommended for the most reliable path resolution.
Installation
# Option 1: install from the GitHub marketplace (available after publishing to GitHub)
claude plugin marketplace add https://github.com/valenZW/cst-sim-agent
claude plugin install cst-sim-agent@cst-sim-agent
# Option 2: install from a local directory (development / offline)
claude plugin marketplace add /path/to/cst-sim-agent
claude plugin install cst-sim-agent@cst-sim-agentRestart Claude Code after installation, and confirm the plugin is loaded via /plugins; then cst_* tools are callable directly in conversation.
The plugin root ships its own
.claude-plugin/marketplace.json— it is itself a marketplace (source=./).directory-type marketplaces load in place without copying.
Hook mechanism (injected on demand)
The plugin declares 4 hooks in hooks/; they only inject reminders when cst_* tools are actually called in a session:
Hook | Trigger | Reminder |
| just before | check the syntax library before writing VBA (per-domain sniffing for precise hints) |
| after | check the CST message window + look up the library before writing next |
| after geometry/material-changing tools | save immediately after critical operations |
| at wrap-up of a CST-touching session | force experience consolidation (into the knowledge base) |
All hooks only remind, never block (they return no permissionDecision).
Self-evolution: the more you use it, the smarter it gets
The embedded knowledge base is both the initial knowledge and the accumulation container:
Use: the agent performs modeling, solving, and result analysis in each simulation;
Consolidate: at session wrap-up, the
stop_checkhook forces a reminder to write this session's pitfalls and validated conclusions intoreferences/(pitfall checklist, VBA syntax library, experience manual);Reuse: next time a similar problem appears, the
pre_vba/post_vbahooks guide you to hit the library first, instead of re-treading the same pitfall.
This forms a "use → consolidate → reuse" self-evolving loop — the plugin keeps accumulating domain experience with use, and similar tasks run more smoothly each time. The knowledge base is under your control (skills/cst-expert/references/) — what gets consolidated and what gets kept is entirely your call.
Skill knowledge base
Bundled with the plugin in skills/cst-expert/references/:
vba-rules.md— four iron rules, code comment conventions, MCP troubleshootingofficial-docs.md— official documentation map & lookup techniquescase-study-flow.md— official example deep-learning workflowcommon-pitfalls.md— general pitfall checklist (port / mesh / solver / API traps)best-practices-template.md— blank incremental-experience template (for your own additions)knowledge/— VBA syntax library (8 domains), 158 official-example index, 35 deep dives, experience manual
Directory structure
cst-sim-agent/
├── .claude-plugin/plugin.json # plugin manifest
├── .mcp.json # MCP server definition (cst-sim)
├── src/ # MCP server implementation
│ ├── server.py # tool registration (FastMCP)
│ ├── controller.py # unified controller (facade)
│ ├── connection.py # CST process/project lifecycle
│ ├── dezip.py # CST DE-ZIP container parser
│ ├── popup_utils.py # popup detect/dismiss
│ ├── popup_watchdog.py # popup watchdog
│ └── version_manager.py # checkpoint versioning
├── hooks/ # constraint mechanization hooks
├── skills/cst-expert/ # domain-knowledge skill
└── requirements.txtFAQ
cst_connectfails / tools don't appear: first look at the Claude CLI MCP log (Server stderrinside%LOCALAPPDATA%\claude-cli-nodejs\Cache\<workdir-encoded>\mcp-logs-*.jsonl); don't guess.Tool reports CST not found: confirm
CST_INSTALL_DIRis set, or that CST is installed in a standard location..cstwon't open:.cstis CST's private DE-ZIP container; Python'szipfilecan't open it — usesrc/dezip.py.SBR results all zero: check geometry material first — STEP-imported geometry defaults to a scatter-transparent material; assign PEC / dielectric before expecting scattering.
Contributing
We welcome community validation and improvement: report issues, submit code, add knowledge-base experience. Development and submission conventions are in CONTRIBUTING; community behavior is governed by the CODE_OF_CONDUCT; security vulnerability reporting is in SECURITY. Version history is in CHANGELOG.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
- OwlCADOAuthcom.owlcad
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
AI-callable calculators and engineering models with real formulas. No hallucinated math.
Natural-language queries over a verified emissions knowledge graph, plus standards validation
Conversational what-if simulation: build, diagnose and compare Petri-net models; CC0 catalog.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables natural language control of HFSS (v2019-2025) for antenna modeling, simulation, and result extraction via win32com without PyAEDT.5MIT
- AlicenseBqualityCmaintenanceEnables AI agents to control CST Studio Suite for 3D electromagnetic simulation, antenna design, and schematic-based field-circuit co-simulation through 177 MCP tools.1006AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables natural-language-driven automation of Ansys Lumerical photonic simulations (FDTD, MODE, DEVICE, INTERCONNECT) with 40+ tools for geometry, materials, sources, monitors, solvers, results, optimization, and documentation.1MIT
- AlicenseCqualityBmaintenanceEnables engineers to convert antenna papers/diagrams and natural language specs into auditable, versionable HFSS Python modeling code, with optional simulation and parametric optimization.22MIT