by IamCatoBot
Transforms natural language prompts into executable discrete-event and system dynamics simulation models, enabling LLMs to create, validate, and run simulations via a Model Context Protocol server.
Text2Sim MCP Server provides a conversational interface for Large Language Models to generate, validate, and execute simulation models. It supports two simulation paradigms—Discrete‑Event Simulation (DES) using SimPy and System Dynamics (SD) using PySD—through JSON‑structured configurations that are validated against formal schemas.
uv package manager.uv sync.python -m mcp_server).uv command as shown in the README.eval, regex‑based distribution handling.Q: Which Python version is required? A: Python 3.12 or newer.
Q: Do I need Docker?
A: No. The server runs directly with the uv package manager handling dependencies.
Q: How do I integrate the server with Claude Desktop?
A: Add a block under mcpServers in claude_desktop_config.json that specifies the uv command, the repository path, and the module mcp_server as shown in the README.
Q: Can I run multiple simulations in parallel?
A: Yes, use the run_multiple_simulations tool to launch replications with seed control and obtain confidence intervals.
Q: How are custom probability distributions handled?
A: Distributions are parsed with a safe regex‑based parser; only supported forms like uniform(a, b) or exponential(lambda) are accepted.
Q: Is there support for version control of models?
A: The save_model tool tracks metadata and handles conflict resolution, allowing versioned retrieval via load_model.
Q: What licensing applies? A: The project is released under the MIT License.

A Model Context Protocol server providing multi-paradigm simulation capabilities through conversational interfaces. The server supports Discrete-Event Simulation via SimPy and System Dynamics modeling via PySD and a PySD-compatible JSON schema.
Text2Sim MCP Server enables Large Language Models to create, validate, and execute simulation models through natural language interfaces. The server processes JSON-structured simulation configurations and returns execution results with comprehensive analytics.
The Text2Sim MCP Server is an open source project developed by The Cato Bot Company Limited. We believe in transparent, commercially-backed open source development that benefits both users and contributors while supporting sustainable project growth. Community contributions are accepted through standard pull request procedures.
uv package manageruvcurl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Learn more: astral-sh/uv
git clone https://github.com/IamCatoBot/text2sim-MCP-server.git
cd text2sim-MCP-server
uv sync
Claude > Settings > Developer > Edit Config > claude_desktop_config.json
{
"mcpServers": {
"Text2Sim MCP Server": {
"command": "uv",
"args": [
"--directory",
"PATH_TO_TEXT2SIM_MCP_SERVER",
"run",
"python",
"-m",
"mcp_server"
],
"env": {}
}
}
}
Note: Replace
PATH_TO_TEXT2SIM_MCP_SERVERwith the actual path to your cloned repository. If theuvcommand is not found, runwhich uv(Unix) orGet-Command uv(PowerShell) and use the full path in the"command"field.
Text2Sim MCP Server v2.6.0 features a completely refactored modular architecture that improves maintainability, testability, and extensibility:
mcp_server/
├── __init__.py # Package exports and version info
├── server.py # Main server entry point
├── registry.py # Centralized tool registration
├── shared/ # Common utilities
│ ├── error_handlers.py # Standardized error handling
│ ├── response_builders.py # Response formatting utilities
│ └── integration_layer.py # SD integration with fallbacks
└── tools/ # Domain-specific tool modules
├── des_tools.py # DES simulation tools
├── sd_tools.py # SD simulation tools
├── model_mgmt_tools.py # Model lifecycle management
├── validation_tools.py # Validation and help tools
└── template_tools.py # Template management tools
The server exposes 16 tools across 5 categories through the Model Context Protocol:
simulate_des - Execute Discrete-Event Simulation models
simulate_sd - Execute System Dynamics models
run_multiple_simulations - Execute multiple simulation replications
validate_model - Validate simulation model configurations
help_validation - Get validation guidance
get_schema_help - Access comprehensive schema documentation
save_model - Store models with metadata
load_model - Retrieve stored models
export_model - Export models to JSON
list_templates - Browse available model templates
load_template - Retrieve specific templates
save_template - Save models as reusable templates
delete_template - Remove user templates
get_sd_model_info - Analyze System Dynamics models
convert_vensim_to_sd_json - Convert Vensim models to PySD JSON
delete_model - Safe model deletion
Text2Sim MCP Server uses formal JSON Schema validation (Draft 2020-12) to ensure simulation model correctness and provide structured error reporting. The server supports two distinct JSON formats optimized for their respective simulation paradigms.
The server uses a SimPy-compatible JSON schema for Discrete-Event Simulation models. This format provides declarative configuration that maps directly to SimPy's native capabilities.
{
"run_time": 480,
"entity_types": {
"customer": {
"probability": 1.0,
"value": {"min": 10, "max": 50},
"priority": 5
}
},
"resources": {
"server": {
"capacity": 2,
"resource_type": "fifo"
}
},
"processing_rules": {
"steps": ["server"],
"server": {
"distribution": "uniform(5, 10)"
}
}
}
For detailed documentation of the DES JSON format, see schemas/DES/README.md.
The server uses a PySD-compatible JSON schema for System Dynamics simulations. This format provides direct compatibility with the PySD Python library ecosystem.
{
"abstractModel": {
"originalPath": "model_name.json",
"sections": [{
"name": "__main__",
"type": "main",
"elements": [
{
"name": "Stock_Name",
"components": [{
"type": "Stock",
"ast": {
"syntaxType": "IntegStructure",
"flow": {"syntaxType": "ReferenceStructure", "reference": "Flow_Name"},
"initial": {"syntaxType": "ReferenceStructure", "reference": "1000"}
}
}],
"units": "items"
}
]
}]
}
}
The PySD format supports two approaches for mathematical expressions:
"Birth_Rate - Death_Rate")For detailed documentation of the PySD JSON format, see docs/PYSD_JSON_SCHEMA_INTEGRATION.md, docs/PYSD_AST_STRUCTURES_GUIDE.md, and schemas/SD/README.md.
Text2Sim is structured into modular components:
Additional technical documentation is available:
docs/PYSD_JSON_SCHEMA_INTEGRATION.md - PySD JSON format specificationdocs/PYSD_AST_STRUCTURES_GUIDE.md - AST structure patterns and best practicesschemas/SD/README.md - System Dynamics schema documentationschemas/DES/README.md - Discrete-Event Simulation schema filesSINGLE_SCHEMA_ARCHITECTURE.md - Architecture overview and design decisionsNo eval() usage
Regex-based parsing prevents arbitrary code execution.
Input Validation
Distribution types, parameters, and model configurations are validated before execution.
Robust Error Handling
Errors are reported cleanly without leaking internal state.
Text2Sim MCP Server is a project under active development. While we strive for accuracy and stability, please be aware of the following:
We are excited for you to use Text2Sim and hope you find it valuable. Your feedback is crucial to its development.
Contributions are accepted through standard fork-and-pull-request procedures. Bug reports and feature suggestions can be submitted via the project issue tracker.
Major changes should be discussed before implementation. The project is under active development and architectural decisions may change.
This project is licensed under the MIT License. See the LICENSE file for details.
For academic use, cite as:
Maniatis, N. (2025). Text2Sim MCP Server (v2.6.0). https://github.com/IamCatoBot/text2sim-MCP-server Copyright The Cato Bot Company Limited and contributors. Licensed under MIT.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
by danny-avila
Provides a self‑hosted ChatGPT‑style interface supporting numerous AI models, agents, code interpreter, image generation, multimodal interactions, and secure multi‑user authentication.
by block
Automates engineering tasks on local machines, executing code, building projects, debugging, orchestrating workflows, and interacting with external APIs using any LLM.
by RooCodeInc
Provides an autonomous AI coding partner inside the editor that can understand natural language, manipulate files, run commands, browse the web, and be customized via modes and instructions.
by pydantic
A Python framework that enables seamless integration of Pydantic validation with large language models, providing type‑safe agent construction, dependency injection, and structured output handling.
by mcp-use
A Python SDK that simplifies interaction with MCP servers and enables developers to create custom agents with tool‑calling capabilities.
by lastmile-ai
Build effective agents using Model Context Protocol and simple, composable workflow patterns.
by Klavis-AI
Provides production‑ready MCP servers and a hosted service for integrating AI applications with over 50 third‑party services via standardized APIs, OAuth, and easy Docker or hosted deployment.
by nanbingxyz
A cross‑platform desktop AI assistant that connects to major LLM providers, supports a local knowledge base, and enables tool integration via MCP servers.