Text2sim MCP Server
Text2Sim MCP Server is a discrete-event simulation engine that generates and executes flexible SimPy-based models from natural language descriptions. Supports multi-domain workflows (airport, healthcare, manufacturing) with configurable entities, stochastic logic, and real-time metrics.
IamCatoBot
README

Text2Sim MCP Server
Multi-paradigm Simulation Engine for LLM Integration
Text2Sim MCP Server is a simulation engine that supports multiple modeling paradigms, including Discrete-Event Simulation (DES) and System Dynamics (SD). It integrates with LLMs using the Model Context Protocol (MCP), enabling powerful simulation capabilities within natural language environments like Claude Desktop.
🚀 Features
-
Large Language Model (LLM) Integration
Create simulation models using plain English descriptions to LLMs. -
Multi-Paradigm Support
- Discrete-Event Simulation (DES) using SimPy for process-oriented models
- System Dynamics (SD) using PySD for feedback-driven continuous models
-
Multi-Domain Support
Build simulations for domains such as airport operations, healthcare, manufacturing, supply chains, and more. -
Flexible Model Configuration
- DES: Configurable entities with stochastic process logic
- SD: Stock-and-flow models with feedback loops and time-based equations
-
Real-Time Metrics
- DES: Performance indicators such as wait times and throughput
- SD: Time series data for stocks, flows, and auxiliaries
-
Secure Implementation
Uses regex-based parsing (noteval()) for processing distribution inputs and safe model execution.
🔧 Installation
Prerequisites
- Python 3.12 or higher
uvpackage manager
Install uv
On macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
On Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Learn more: astral-sh/uv
🛠️ Usage
Clone the repository
git clone https://github.com/IamCatoBot/text2sim-MCP-server.git
Integration with Claude Desktop
- Open:
Claude > Settings > Developer > Edit Config > claude_desktop_config.json
- Add the following block:
{
"mcpServers": {
"Text2Sim MCP Server": {
"command": "uv",
"args": [
"--directory",
"PATH_TO_TEXT2SIM_MCP_SERVER",
"run",
"mcp_server.py"
],
"env": {}
}
}
}
Note: If the
uvcommand is not found, runwhich uv(Unix) orGet-Command uv(PowerShell) and use the full path in the"command"field.
📚 API Reference
Overview
The MCP server provides tools for both Discrete-Event Simulation and System Dynamics modeling:
- Discrete-Event Simulation: Process-oriented modeling with SimPy
- System Dynamics: Stock-and-flow modeling with PySD
When using a Large Language Model (e.g. Claude) client, natural language prompts are translated into appropriate configurations via the Model Context Protocol (MCP).
🏗️ Architecture
Text2Sim is structured into modular components:
- MCP Server – Handles natural language requests via MCP.
- Discrete-Event Simulation (DES) Module
- Simulation Model – Core SimPy engine that executes process flows.
- Entity Class – Represents units flowing through the system.
- Process Steps – Encapsulate logic for each process stage.
- Metrics Collector – Gathers statistics like wait times and throughput.
- Secure Distribution Parser – Parses probability distributions safely.
- System Dynamics (SD) Module
- Model Registry – Manages available SD models.
- PySD Integration – Runs stock-and-flow models using PySD.
- Simulation Controls – Time steps, durations, and parameter adjustments.
- Results Formatter – Structures time series data for output.
For detailed documentation of each module, see:
🔐 Security Considerations
-
No
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.
🤝 Contributing
Pull requests are welcome! Please fork the repo and submit a PR. Suggestions, bug reports, and feature ideas are always appreciated.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
Recommended Servers
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.
Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
MATLAB MCP Server
Integrates MATLAB with AI to execute code, generate scripts from natural language, and access MATLAB documentation seamlessly.
Macrostrat MCP Server
Enables Claude to query comprehensive geologic data from the Macrostrat API, including geologic units, columns, minerals, and timescales through natural language.
MCP Word Counter
A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.
