carmaker-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CM_HOME | No | CarMaker install folder. Default: newest C:\IPG\carmaker\win64-*. | |
| CM_MODEL | No | Simulink model to open when a session is started. | |
| CM_ENABLE | No | Optional tools to switch on: tcl (raw Tcl in the CarMaker GUI), experimental (add and delete Simulink blocks). | |
| CM_DISABLE | No | Tool groups to switch off, to give the model a shorter tool list: standalone, study, matlab, movie. | |
| CM_PROJECT | No | CarMaker project folder. The server writes nowhere else. Needed to start a session from scratch. Default: read from the running CarMaker GUI. | |
| CM_LOG_LEVEL | No | Detail of server.log. Default: INFO. | |
| CM_STATE_DIR | No | Where backups, the change log and server.log are kept (never inside the project). Default: %LOCALAPPDATA%\carmaker-mcp. | |
| CM_MATLAB_DIR | No | Folder MATLAB starts in (where cmenv.m is). Default: <project>/src_cm4sl. | |
| CM_MATLAB_EXE | No | MATLAB executable used to start a session. Default: newest installed MATLAB that your CarMaker supports. | |
| CM_MATLAB_INIT | No | Your project's own MATLAB setup script (in src_cm4sl, or a full path), run once when a session is started. Use it if you normally run a script that adds folders to the path and opens the model: without it the model may not compile. | |
| CM_RESULT_DIRS | No | Extra folders to search for result files. | |
| CM_POPUP_TIMEOUT | No | Seconds after which CarMaker pop-ups answer themselves with their default choice, so that a question cannot block a run. Not set: they wait for your click. | |
| CM_ENGINE_TIMEOUT | No | Seconds before a call into MATLAB is given up. Default: 30. | |
| CM_MATLAB_SESSION | No | Name under which MATLAB shares its engine. Default: cm_mcp. |
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": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| cm_session_startA | Bring up a CarMaker for Simulink session as far as it is missing: start MATLAB (visible, in the project's src_cm4sl folder, engine shared), run cmenv, open the Simulink model and open the CarMaker GUI. Nothing is restarted or closed. Returns ready=true, or ready=false with what it is waiting for: call again until ready. Without a model it opens none and lists models_loaded and models_found to choose from. Many projects need their own setup script before the model compiles: if init_scripts_found lists one, pass it as init. |
| cm_doctorA | Check the setup: CarMaker install, Python version, MATLAB release and engine, shared MATLAB session, GUI, project folder. Each failed check comes with its fix. ok: at least one mode is ready (see ready); all_checks_passed: everything, the MATLAB session included. |
| cm_statusA | The MATLAB session (CarMaker for Simulink) only; standalone work needs none of it (cm_doctor). Simulation state (sim_status; sim_status_code is CarMaker's raw value, -2 idle, 0 or more running), matlab_simstate (Simulink's model state: 'terminated' is normal when idle), active model, project directory, last end status, the GUI's storage mode (save_mode) and gui_all_saved (false: the GUI holds unsaved data and will ask before a load; true is no guarantee). |
| cm_load_testrunA | Load a test run into the CarMaker GUI. Requires an idle simulation. Find names with cm_list('testrun'). |
| cm_start_simA | Start the loaded test run. Returns once it is running; fails at once, with Simulink's error, if the model does not compile. Then call cm_wait_end until it reports finished. |
| cm_stop_simA | Stop the running simulation. With wait_s > 0 it returns what cm_wait_end returns. |
| cm_wait_endA | Wait until the simulation is idle again. finished=true: end status, simulation time and distance, result_file, new log errors and warnings (settings CarMaker ignored show up there) and pop-ups. finished=false: current state and live values; call again to keep waiting. |
| cm_logA | Last lines of the newest CarMaker session log of the project. Use it when a run aborts or does not start. |
| cm_liveA | Current values of CarMaker quantities during a run (or the last values after it). |
| cm_dva_writeC | Overwrite a quantity during a run via Direct Variable Access. |
| cm_dva_releaseA | Release all quantities from DVA control. |
| cm_popupsA | Pop-up messages the CarMaker GUI raised for this server's commands (type info/warn/err/question, text, index of the answer given) and the current pop-up timeout. Also the "Internal Debugger" dialog that the GUI or IPGMovie shows after an error of its own (type 'internal error', with the program and the call stack): it is read and then closed. Reading empties the GUI's buffer (it keeps five). cm_load_testrun, cm_start_sim and cm_wait_end already return new ones as 'popups'. |
| cm_popup_timeoutA | Let GUI pop-ups raised by this server's commands answer themselves with their DEFAULT choice, so that a question such as 'Vehicle not saved. All changes will be lost. OK to continue?' cannot block a run. The default answer there discards the unsaved changes. Read what was answered with cm_popups. Stays until set back, cm_revert_all or a GUI restart. |
| cm_results_listB | Newest .erg result files under the project's SimOutput folder, CM_RESULT_DIRS and the folders this session's runs wrote to. |
| cm_results_summaryB | First / last / min / max / mean and unit of quantities in a result file, plus rows and duration. |
| cm_results_readB | Time series from a result file, decimated to at most max_points samples. |
| cm_results_exportA | Write quantities of a result file at full resolution (no thinning) to a MAT file (one double variable per quantity, dots as underscores, plus quantity_names and units) or a CSV file (header 'Time [s],Car.v [m/s],...': name and unit), in any folder of this computer. Never overwrites. |
| cm_results_plotA | Plot quantities of result files in IPGControl, IPG's plotting program; needs no MATLAB. The window stays open for the user (the next plot replaces it) and a picture comes back as an image. This server has no MATLAB evaluation: for MATLAB figures use a MATLAB server, or cm_results_export. |
| cm_driver_adaptionA | Let IPGDriver learn the car (basic) or the car on this circuit (race), and save the knowledge. It takes minutes (basic about 2 standalone, 5 to 20 with MATLAB; race as long as the test run allows): run it only when the car changed noticeably, the race driver lacks knowledge, or the user asks, and tell the user the duration first. Start returns at once; then 'wait' until state is done/failed. |
| cm_guideC | A section of this server's guide (the same text as the resource carmaker://guide). |
| cm_results_crossingsA | Interpolated times at which a quantity crosses each value, and the time between the first
crossings of consecutive values (lap or sector times from distance gates); with |
| cm_output_quantitiesB | The quantities the next run writes to its result file, per storage rate (names may hold wildcards), with the sample times. movie_replay says whether such a result file can be replayed in IPGMovie. What a finished result file holds: cm_results_summary(erg, search='*'). |
| cm_output_quantities_editA | Add quantities to, or remove them from, the project's output-quantities file (backed up first, logged, restored by cm_revert_all). Applies from the next start. Requires an idle simulation. Find names with cm_live (it reads any quantity) or in another result file. |
| cm_movie_openA | Open IPGMovie, CarMaker's 3D animation window (or take over one that is open). Open it BEFORE a run: it records a run only while it is open, and cm_movie_snapshot can then show any moment of it. Needs the MATLAB session; without it use cm_standalone_launch(movie=true). |
| cm_movie_snapshotA | A picture of IPGMovie's 3D view, returned as an image. After a run it shows any moment of the last run (time_s), provided IPGMovie was open during that run. During a run, without time_s, it shows the IPGMovie window as it is at that moment (in the window's own size). With erg it replays a saved result file, which must hold the vehicle's motion (cm_output_quantities_edit(preset='movie') before that run). Do not pass time_s during a run: that makes IPGMovie stop following the run. Needs the MATLAB session's IPGMovie (cm_movie_open); a standalone IPGMovie (movie=true) has no pictures. |
| cm_listB | Names of project data files of one kind (test runs, vehicles, drivers, tyres...). |
| cm_readB | Key / value pairs of a CarMaker infofile, 300 at a time: filter by keys, prefix or search, or page
with offset. For a test run first |
| cm_diffA | Keys only in a, only in b, and those whose values differ ([a, b]), e.g. two vehicles or a test run and its clone. |
| cm_editA | Change keys in a project file in place (backed up first, logged; only the edited lines change). Requires an idle simulation; load the test run again afterwards. Driver parameters belong in the driver template (kind 'driver', 'Template/'), which other test runs share: say which changed. |
| cm_cloneA | Copy a project file to a new name in the same kind's folder. Never overwrites. A copied test run
keeps the source's driver and knowledge ( |
| cm_createA | Write a new project file, for example a tyre property file that differs from an existing one. Never overwrites; the file is logged and cm_revert_all moves it to the trash folder. To change a file that exists use cm_edit, to copy one cm_clone. |
| cm_list_workspace_varsA | Variables (name, class, size) of the MATLAB base workspace or of a Simulink model's workspace. Controller parameters usually live in the model workspace. |
| cm_get_workspace_varA | Value of a variable or field. MATLAB objects are described, not converted: read their fields. |
| cm_set_workspace_varA | Set a variable or field. The old value is logged and cm_revert_all restores it. Model-workspace changes live in memory until cm_model_save. Requires an idle simulation. overruled_by in the answer: the model has a variable of that name in its own workspace and uses that one, so set it there. |
| cm_model_getB | get_param on a loaded Simulink model or block. |
| cm_model_setA | set_param on a loaded Simulink model or block. Logged; cm_revert_all restores the old value. |
| cm_model_saveA | Save a loaded Simulink model. The file must be inside the project; it is backed up first. |
| cm_model_logs_saveA | After a CarMaker for Simulink run: write what Simulink logged (signals marked for logging and To Workspace blocks) to a MAT file, with the base workspace and the model workspace as one struct each (variables: signals, base_workspace, model_workspace, info); the answer lists signal_names. Requires an idle simulation. The result file (.erg) holds CarMaker's quantities, this the Simulink side. To see whether a signal is logged, run with save_logs=true and read signal_names. |
| cm_standalone_serversB | CarMaker simulation programs running on this machine (pid, description, whether this server manages it). A CarMaker Office window you opened shows up once its application is started. |
| cm_standalone_launchA | Start a NEW independent CarMaker simulation program (not connected to MATLAB) and run a test run on it. Only for test runs whose vehicle does not need a Simulink controller. Results go to the project's SimOutput; see cm_standalone_results. start=false only opens CarMaker (and IPGMovie). |
| cm_standalone_attachA | Attach to a CarMaker simulation program that is already running, for example one started from a CarMaker Office window. |
| cm_standalone_statusC | State of a standalone instance plus live values. |
| cm_standalone_controlB | Start, pause, resume or stop the simulation of a standalone instance, or open its IPGMovie. A study with movie=true runs on one instance: cm_standalone_status shows it. |
| cm_standalone_wait_endA | Wait until the instance's simulation has finished. finished=true: simulation time and distance, error flag and log errors. finished=false: call again to keep waiting. |
| cm_standalone_dva_writeB | Overwrite a quantity in a running standalone simulation (Direct Variable Access). |
| cm_standalone_resultsA | Result .erg files of the instance's run (read them with cm_results_summary / cm_results_read). |
| cm_standalone_closeA | Disconnect; for instances this server launched, also stop the CarMaker process. |
| cm_study_startA | Run one test run several times with different parameter values, one after another, in the background. Returns a study id at once; wait with cm_study_wait. Nothing is written to project files. The answer names values that will change nothing: keys_not_found, workspace_not_found and workspace_overruled (use scope=); Driver.* keys that a driver template overrides are refused (use 'driver'). Rows give valid and wall_s, the clock time of the run. A study stops at the first run that finds no CarMaker licence. |
| cm_study_statusA | State of a study (running, done, cancelled, failed) and one row per finished run, which also maps every label to its result file. The ranking names each run's result file. To wait use cm_study_wait. |
| cm_study_waitA | Wait until another run of the study has finished or the study has ended, at most timeout_s, and return the rows no earlier call returned (cm_study_status has the whole table and rank_by). Call it again while state is 'running'. Use this for studies instead of cm_wait_end. |
| cm_study_cancelA | Stop the run in progress, skip the remaining ones and restore the changed workspace values. Only cancel a study this conversation started. |
| cm_changelogB | Recorded changes (file keys, workspace variables, model parameters, GUI settings) with old and new values. |
| cm_revert_allA | Undo every change made in this server session: workspace values and model parameters in reverse order, backed-up files put back (created files go to a trash folder), GUI settings restored. |
| cm_restoreB | Restore project files from the backups of an earlier session. Files only. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| run_and_summarise | Run a test run and summarise the result |
| compare_settings | Run a test run with two values of one parameter and compare the results |
| undo_session | Show what this session changed and undo it |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| guide | How to use this server: workflows, parameters, troubleshooting |
| status | Current simulation status (same as cm_status) |
| changelog | Changes made by this server session (same as cm_changelog) |
| log | Last 200 lines of the newest CarMaker session log |
TDQS
Scored across 54 tools
Detailed descriptions distinguish most tools, but the set has parallel 'twins' for two execution worlds (e.g. cm_status vs cm_standalone_status, cm_start_sim vs cm_standalone_control, cm_wait_end vs cm_standalone_wait_end, cm_dva_write vs cm_standalone_dva_write) that agents can easily pick wrongly. Tools like cm_live, cm_status, cm_standalone_status, and cm_results_read overlap in 'show me current/result values' intent, so boundary clarity depends on reading the long descriptions.
All tools share a cm_ prefix and snake_case, which is highly predictable. However, some names are bare nouns (cm_live, cm_log, cm_status, cm_doctor, cm_read) while others follow a verb_noun pattern (cm_load_testrun, cm_list_workspace_vars, cm_set_workspace_var), giving a minor inconsistency in convention.
With 54 tools this server is far above the typical 3-15 range, and the surface includes many near-duplicated variants for MATLAB-attached vs standalone operation. The CarMaker domain is genuinely broad, so the count is not arbitrary, but it is too heavy for an agent to navigate reliably.
Coverage is unusually thorough: session lifecycle (start/status/doctor/stop/wait), standalone launch/attach/control/close, file list/read/edit/clone/create/diff/restore, workspace and model get/set/save, result listing/summary/read/plot/export/crossings, studies, movie capture, popups, logging, changelog, and revert-all. Almost every workflow implied by the domain has a supporting tool.