add_aux
Add an auxiliary variable (parameter or intermediate calculation) to the current model
Build a stock-and-flow model from an agent — stocks, flows, auxiliaries, connectors and modules — then simulate it, sweep its parameters, compare scenarios and fit it to observed data.
LABSCO SUMMARY
Both batch builders leave the model unchanged on any item error and report the failing item by stage and index, so a half-built model is not a state you can end up in. Two limits are stated rather than left to be discovered: simulation integrates with Euler regardless of the model's own method setting, and calibration rejects stocks because overriding one pins it to a constant instead of setting its initial value. Connector sync and validation run by default on the batch build, which makes the response double as an inspection of what was just built.
A vendor-neutral server for system dynamics models in the XMILE format: model construction, diagram layout, file and template handling, simulation, scenario comparison, sensitivity analysis, calibration, and workspace isolation. What it saves is a .stmx file that opens in Stella Professional.
Python, installed from PyPI. Simulation is an optional extra rather than part of the base install: the simulate, scenario, sensitivity and calibrate tools need the PySD dependency, which the sim extra pulls in — everything to do with building, validating and saving models works without it. On current-protocol clients, create a workspace first and pass its id on the stateful calls; older stdio clients get one process-local workspace and may omit it. Calibration accepts only constant auxiliaries and flows, rejects stocks, and needs observation times inside the simulated range.
One command — pip install stella-mcp
USE CASES
Describe the stocks, flows, auxiliaries and connectors together — nothing is registered unless all of it validates.
Write the equations, then let the server add the dependency connectors they imply and list what it drew.
Simulate and take the downsampled series with per-variable initial, final, minimum and maximum values, rather than a wall of timesteps.
Name each scenario as a set of parameter overrides and read how far each one moves the outcome.
Calibrate the constant parameters against the observed series instead of tuning them by hand.
Auto-place the module boxes, render the stock-and-flow diagram to SVG, and save the model where Stella can open it.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
add_auxAdd an auxiliary variable (parameter or intermediate calculation) to the current model
add_connectorAdd a connector (dependency arrow) between variables
add_flowAdd a flow between stocks in the current model
add_stockAdd a stock (reservoir) to the current model
add_to_moduleAdd variables to an existing module
add_variablesAdd multiple stocks, auxiliaries, flows, connectors, and/or modules to an existing model in one call. All-or-nothing — on any item error the model is left unchanged and the error names the failing item (stage + index).
auto_place_module_boxesAuto-place module view boxes around their member variables
build_modelCreate and populate a model in one call: sim specs, stocks, auxiliaries, flows, connectors, and modules. All-or-nothing — on any item error nothing is registered and the error names the failing item (stage + index). Connector sync and validation run by default, so the response doubles as an inspection.
calibrateFit constant model parameters to an observed time-series — the inverse of simulate. Only constant auxiliaries/flows can be calibrated (stocks are rejected: overriding a stock pins it to a constant rather than setting its initial value). least_squares (default) reports a linearized std_error; differential_evolution is a global, seeded alternative requiring bounds. Observation times must lie within the model window (no extrapolation). Requires the optional pysd dependency (pip install 'stella-mcp[sim]').
compare_scenariosRun several named what-if scenarios (each a set of constant parameter overrides) against a baseline and report how each diverges: per-variable final/max absolute deltas and final percent change. Requires the optional pysd dependency (pip install 'stella-mcp[sim]').
create_modelCreate a new Stella model with specified time settings
create_moduleCreate a logical module/group for organizing variables
create_workspaceCreate an isolated application workspace for stateful Stella tool calls. The returned ID routes state and is not an authorization credential.
delete_modelRemove a model from the current session. Saved .stmx files are not touched. model_id is required — there is deliberately no implicit 'delete current model'.
delete_moduleDelete a module
delete_variableDelete a stock/flow/aux and clean connectors/module membership
get_model_xmlGet the XMILE XML representation of the current model (for preview)
get_template_infoGet detailed metadata for one template
inspect_modelReturn a structured summary of the current model for agent inspection
list_connectorsList connector metadata (uid, endpoints, angle, routing lock/points)
list_modelsList all model IDs available in the current session
list_modulesList modules/groups in the current model
list_templatesList built-in and user-defined templates
list_variablesList all variables (stocks, flows, auxiliaries) in the current model
load_templateLoad a template into the current session as a model
read_modelRead an existing .stmx file and load it as the current model
remove_from_moduleRemove variables from an existing module
rename_moduleRename an existing module
rename_variableRename a stock/flow/aux and update dependent references
render_diagramRender the current model as an SVG stock-and-flow diagram. The SVG is returned inline (for clients without file access) and optionally written to a file. Defaults to running auto-layout first so freshly built models render sensibly.
revoke_workspaceRevoke a workspace and discard all models stored in it.
save_as_templateSave the current model as a user-defined template
save_modelSave the current model to a .stmx file
sensitivity_analysisOne-at-a-time sensitivity: sweep each parameter across a range (holding the others at their baseline) and report how one chosen output metric responds, with a range slope and a baseline-normalized elasticity for ranking. Requires the optional pysd dependency (pip install 'stella-mcp[sim]').
set_connector_routingSet connector angle and/or explicit routing waypoints
set_module_styleSet module box visual style in the diagram view
set_module_viewSet explicit view box geometry for a module
set_sim_specsUpdate simulation time settings on an existing model
simulateRun the model and return downsampled time series with per-variable summaries (initial/final/min/max). Requires the optional pysd dependency (pip install 'stella-mcp[sim]'). Integration is Euler regardless of the model's method setting.
sync_connectors_from_equationsAdd missing dependency connectors inferred from flow and auxiliary equations
update_auxUpdate auxiliary variable fields
update_flowUpdate flow fields while preserving structural stock links
update_stockUpdate stock fields while preserving relationships
validate_modelValidate the current model for errors and warnings
BEFORE YOU INSTALL
44 tools when we connected. simulate, compare_scenarios, sensitivity_analysis and calibrate register but need pip install 'stella-mcp[sim]' to work. save_results_csv and the other save_*_csv names are arguments, not tools.
Python 3.10+
All 3 documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 44 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
pip install stella-mcp{
"mcpServers": {
"stella": {
"command": "stella-mcp"
}
}
}{
"mcpServers": {
"stella": {
"command": "uvx",
"args": [
"stella-mcp"
]
}
}
}