A Model Context Protocol (MCP) server for creating and manipulating Stella system dynamics models. This enables AI assistants like Claude to programmatically build, read, validate, and save .stmx files in the XMILE format. Stella is a system dynamics modeling tool used for simulating complex systems in fields like ecology, biogeochemistry, economics, and engineering. This MCP server allows AI assi
Add this skill
npx mdskills install bradleylab/stella-mcpExcellent system dynamics modeling server with comprehensive tooling and clear documentation
A Model Context Protocol (MCP) server for creating and manipulating Stella system dynamics models. This enables AI assistants like Claude to programmatically build, read, validate, and save .stmx files in the XMILE format.
Stella is a system dynamics modeling tool used for simulating complex systems in fields like ecology, biogeochemistry, economics, and engineering. This MCP server allows AI assistants to:
This is particularly useful for:
pip install stella-mcp
git clone https://github.com/bradleylab/stella-mcp.git
cd stella-mcp
pip install -e .
mcp>=1.0.0Add to your claude_desktop_config.json:
{
"mcpServers": {
"stella": {
"command": "stella-mcp"
}
}
}
Add to your .claude/settings.json:
{
"mcpServers": {
"stella": {
"command": "stella-mcp"
}
}
}
If running from source:
{
"mcpServers": {
"stella": {
"command": "python",
"args": ["-m", "stella_mcp.server"],
"cwd": "/path/to/stella-mcp"
}
}
}
| Tool | Description |
|---|---|
create_model | Create a new model with name and time settings (start, stop, dt, method) |
read_model | Load an existing .stmx file |
save_model | Save model to a .stmx file |
| Tool | Description |
|---|---|
add_stock | Add a stock (reservoir) with initial value and units |
add_flow | Add a flow between stocks with an equation |
add_aux | Add an auxiliary variable (parameter or calculation) |
add_connector | Add a dependency connector between variables |
| Tool | Description |
|---|---|
list_variables | List all stocks, flows, and auxiliaries |
validate_model | Check for errors (undefined variables, missing connections, etc.) |
get_model_xml | Preview the XMILE XML output |
User: Create a simple exponential growth model with a population starting at 100
and a growth rate of 0.1 per year
Claude: [Uses create_model, add_stock, add_aux, add_flow, add_connector, save_model]
Creates population_growth.stmx with:
- Stock: Population (initial=100)
- Aux: growth_rate (0.1)
- Flow: growth (Population * growth_rate) into Population
User: Read the carbon cycle model and explain what it does
Claude: [Uses read_model, list_variables]
This model has 3 stocks (Atmosphere, Land Biota, Soil) and 6 flows
representing carbon exchange through photosynthesis, respiration...
User: Create a two-box ocean model with surface and deep nutrients
Claude: [Uses create_model, add_stock (x4), add_aux (x8), add_flow (x6), save_model]
Creates a model with nutrient cycling between surface and deep ocean
including upwelling, downwelling, biological uptake, and remineralization
The validate_model tool checks for:
stella-mcp/
├── README.md
├── LICENSE
├── pyproject.toml
└── stella_mcp/
├── __init__.py
├── server.py # MCP server implementation
├── xmile.py # XMILE XML generation and parsing
└── validator.py # Model validation logic
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT License - see LICENSE for details.
Install via CLI
npx mdskills install bradleylab/stella-mcpStella MCP Server is a free, open-source AI agent skill. A Model Context Protocol (MCP) server for creating and manipulating Stella system dynamics models. This enables AI assistants like Claude to programmatically build, read, validate, and save .stmx files in the XMILE format. Stella is a system dynamics modeling tool used for simulating complex systems in fields like ecology, biogeochemistry, economics, and engineering. This MCP server allows AI assi
Install Stella MCP Server with a single command:
npx mdskills install bradleylab/stella-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Stella MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.