PLECS-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PLECS_HOST | No | Alias for PLECS_RPC_HOST. PLECS RPC is localhost-only. | 127.0.0.1 |
| PLECS_PORT | No | Alias for PLECS_RPC_PORT. Must match the PLECS preference. | 1080 |
| PLECS_APP_PATH | No | Alias for PLECS_EXECUTABLE. PLECS binary/bundle used by auto-start. | |
| PLECS_RPC_HOST | No | PLECS RPC host (alias: PLECS_HOST). PLECS RPC is localhost-only. | 127.0.0.1 |
| PLECS_RPC_PORT | No | PLECS RPC port (alias: PLECS_PORT). Must match the PLECS preference. | 1080 |
| PLECS_EXECUTABLE | No | PLECS binary/bundle used by auto-start (alias: PLECS_APP_PATH). Auto-detected if unset. | |
| PLECS_MCP_CONFIG | No | Explicit path to config.yml. | |
| PLECS_RPC_TIMEOUT | No | Read timeout for non-simulation RPC calls. | 30 |
| PLECS_MCP_LOG_LEVEL | No | RPC timing/error logging level on stderr. | INFO |
| PLECS_MCP_OUTPUT_DIR | No | Destination for auto-saved results. | ~/.plecs-mcp/out |
| PLECS_MCP_SIM_TIMEOUT | No | SolverOpts.Timeout injected into simulate/analyze. | 600 |
| PLECS_MCP_ALLOW_REMOTE | No | Set to 1 to allow binding a non-loopback HTTP host. There is no auth. | |
| PLECS_MCP_MAX_CSV_ROWS | No | Above this many rows, scope CSV is saved and summarised. | 50000 |
| PLECS_MCP_ALLOWED_ROOTS | No | Write roots, colon-separated. Defaults to ~, /tmp, and the system temp directory. | |
| PLECS_MCP_MAX_INLINE_POINTS | No | Above this many points, simulation results are saved and summarised. | 20000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| plecs_connectA | Handshake/health check; starts PLECS automatically when the RPC port is closed. If the endpoint is unreachable and |
| plecs_list_methodsA | List RPC methods supported by the running PLECS build (system.listMethods). |
| plecs_method_helpB | Return PLECS's own help text for an RPC method (system.methodHelp). |
| plecs_statisticsA | PLECS usage statistics: licence hints plus every open model and its state. |
| plecs_loadB | Open a model file. |
| plecs_saveA | Save a model. With
|
| plecs_closeA | Close a model WITHOUT saving. Refuses when this session changed it via plecs_set. PLECS exposes no "dirty" flag, so the guard only knows about edits made through this
MCP session; pass |
| plecs_get_model_treeA | Return the model tree (needs an absolute path; PLECS returns base64 JSON).
|
| plecs_getA | Read a component/model parameter (model params too, e.g. "TimeSpan"). Values come back as strings; without |
| plecs_setC | Set a parameter. |
| plecs_state_spaceA | Extract A/B/C/D/I for one switch combination.
|
| plecs_simulateA | Run a simulation (blocking).
|
| plecs_analyzeA | Run an analysis (blocking).
|
| plecs_scopeC | Send a command to a scope (HoldTrace / RemoveTrace / ClearTraces / SaveTraces / LoadTraces). |
| plecs_webserverA | Undocumented PLECS webserver channel (verified on PLECS 5.0.6). Commands: getScopeInfo, getTraceNames, getScopeSignals, getScopeCsv, getCursorData,
getScopeBitmap, getCircuitBitmap. Pass the command's own arguments in
|
| plecs_codegenB | Generate code with PLECS Coder (requires a PLECS Coder licence). Verified on 5.0.6: |
| plecs_export_fmuA | Export a subsystem as an FMU (uses the subsystem's saved FMU Export settings). Verified on 5.0.6: only an atomic subsystem can be exported; a normal subsystem returns "Cannot export FMU for non-atomic subsystem". The signature is a single subsystem path. |
| plecs_run_scriptA | Run a model Simulation Script by name. Verified on PLECS 5.0.6: the second argument is an optStruct, not a bare
string —
|
| plecs_compareB | Compare two model files with PLECS's diff engine. Returns the raw |
| plecs_batchA | Run several RPC calls in one tool call (still serialized by the client lock). Each item is |
| plecs_extract_execution_log_dataA | Runtime execution-log counters (Jacobian/Newton/solver call counts) for the last run. |
| plecs_set_cosim_server_enabledC | Enable/disable the PLECS FMU Co-Simulation endpoint (global PLECS state). |
| plecs_signB | Append the PLECS demo signature to a model file (modifies the file). |
| plecs_protectA | Make a subsystem non-viewable/non-modifiable. IRREVERSIBLE once saved; requires confirm=true. Verified on 5.0.6: the call takes a single subsystem path, returns 0, and is idempotent; it changes the open model only, so the protection becomes permanent when you save it. |
| plecs_crashA | Crash the running PLECS process (debug helper). Requires confirm=true. |
| plecs_rpcC | Raw escape hatch: call any PLECS RPC method verbatim. Dict results are returned as-is; scalars and arrays are wrapped as |
| plecs_overviewA | One-call model briefing: files, state, solver settings, analyses, scopes, outports. Cheaper than stitching |
| plecs_layout_checkA | Check schematic geometry of a model that is open in PLECS. Uses the bounding box per component from Top-level schematic only; |
| plecs_validateA | Structural sanity check before simulating. Checks solver/time settings, outports, analyses, and (by default) the native
|
| plecs_captureC | Render a scope or analysis plot as a PNG (inline image, or a file with
|
| plecs_plotB | Run a simulation/analysis and return a PNG.
|
| plecs_submitA | Start a long blocking call in the background and return a task id. Allowed methods: simulate, analyze, codegen, exportfmu, runScript.
For |
| plecs_taskC | Status/elapsed time for a background task. |
| plecs_task_resultA | Fetch a finished task's result (large payloads arrive as summary + saved path). |
| plecs_tasksB | List background tasks, newest first. |
| plecs_checkC | Run simulations/analyses and evaluate pass/fail assertions. Check examples:: |
| plecs_library_searchB | Search the installed PLECS component library (types, names, default parameters).
|
| plecs_scanA | Regex-search a .plecs file on disk without opening it in PLECS. |
| plecs_model_cloneA | Copy a model file, optionally rename/rewrite lines, then load it to verify.
|
| plecs_artifactsC | List generated files (code generation / FMU output) with sizes. |
| plecs_fmu_infoA | Read FMI metadata from an .fmu/.zip or an unpacked folder. |
| plecs_analyze_dataB | Post-process a saved JSON result: metrics, and optional FFT/THD at a fundamental. Accepts a single result object or the list written for a parameter sweep; list
entries are summarised (and THD-processed when |
| plecs_diagnoseA | Explain a PLECS error string and suggest next steps. |
| plecs_instancesB | Known PLECS endpoints for this server process (the active one is flagged). |
| plecs_model_editA | Edit a .plecs file structurally (PLECS RPC cannot modify a schematic). Operations (applied in order)::
In-place editing requires |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| docs-quickstart | PLECS-MCP quickstart |
| docs-rpc | PLECS RPC reference |
| docs-analysis | Simulation and analysis options |
| docs-errors | Troubleshooting PLECS errors |
| docs-gotchas | Common argument traps |
| docs-limits | Data policy and limits |
TDQS
Scored across 45 tools
Most tools target a distinct action (load, save, simulate, codegen, export_fmu, etc.), but several clusters overlap: plecs_simulate/plecs_plot/plecs_capture/plecs_check/plecs_submit all run or wrap simulations, plecs_overview/plecs_statistics/plecs_get_model_tree all summarize model state, and plecs_rpc/plecs_batch/plecs_webserver are three different escape hatches. The detailed descriptions do clarify boundaries in most cases, but an agent must read carefully to pick correctly.
All 45 tools share the plecs_ prefix and snake_case, which is highly predictable. However, the verb_noun convention is not uniform: many tools are noun-only (plecs_artifacts, plecs_instances, plecs_statistics, plecs_overview, plecs_scope, plecs_task, plecs_tasks, plecs_fmu_info), so the pattern is mostly but not entirely consistent.
45 tools is far above the 15-tool sweet spot and well past the 25-tool threshold for 'heavy'. While PLECS is a genuinely complex domain (schematic editing, simulation, codegen, FMU export, RPC introspection), the surface includes several near-duplicates (submit vs simulate, capture vs plot, task/tasks/task_result) that inflate the count.
The surface is unusually thorough: model lifecycle (load/save/close/clone/edit), simulation and analysis, plotting/capture, codegen, FMU export, validation, batch execution, background tasks, and raw RPC/webserver escape hatches. Minor gaps remain, such as no explicit 'create new model from scratch' operation and artifact listing without artifact cleanup, but agents have workarounds.