{"id":30869277,"url":"https://github.com/IamCatoBot/text2sim-MCP-server","last_synced_at":"2025-09-07T22:16:46.192Z","repository":{"id":284588415,"uuid":"954617042","full_name":"IamCatoBot/text2sim-MCP-server","owner":"IamCatoBot","description":"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.","archived":false,"fork":false,"pushed_at":"2025-06-30T10:53:18.000Z","size":934,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T11:47:38.058Z","etag":null,"topics":["llm-agent","llm-tools","mcp-server","pysd","simpy","simulation"],"latest_commit_sha":null,"homepage":"https://text2sim.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IamCatoBot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-25T11:03:23.000Z","updated_at":"2025-06-30T10:53:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"1fcd731e-eff6-4d31-a7ec-d6d0f8eafd18","html_url":"https://github.com/IamCatoBot/text2sim-MCP-server","commit_stats":null,"previous_names":["iamcatobot/text2sim-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IamCatoBot/text2sim-MCP-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamCatoBot%2Ftext2sim-MCP-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamCatoBot%2Ftext2sim-MCP-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamCatoBot%2Ftext2sim-MCP-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamCatoBot%2Ftext2sim-MCP-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IamCatoBot","download_url":"https://codeload.github.com/IamCatoBot/text2sim-MCP-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamCatoBot%2Ftext2sim-MCP-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274102854,"owners_count":25222683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["llm-agent","llm-tools","mcp-server","pysd","simpy","simulation"],"created_at":"2025-09-07T22:04:05.427Z","updated_at":"2025-09-07T22:16:46.164Z","avatar_url":"https://github.com/IamCatoBot.png","language":"Python","funding_links":[],"categories":["🤖 AI/ML"],"sub_categories":[],"readme":"![Header Image](assets/text2sim_mcp_github.png)\n\n# **Text2Sim MCP Server**  \n### *Multi-paradigm Simulation Engine for LLM Integration*\n\n**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.\n\n[![Text2Sim MCP Server (demo)](assets/youtube_screen.png)](https://www.youtube.com/watch?v=qkdV-HtTtLs \"Text2Sim MCP Server (demo)\")\n\n---\n## 🚀 Features\n\n- **Large Language Model (LLM) Integration**  \n  Create simulation models using plain English descriptions to LLMs.\n\n- **Multi-Paradigm Support**  \n  - **Discrete-Event Simulation (DES)** using SimPy for process-oriented models\n  - **System Dynamics (SD)** using PySD for feedback-driven continuous models\n\n- **Multi-Domain Support**  \n  Build simulations for domains such as airport operations, healthcare, manufacturing, supply chains, and more.\n\n- **Flexible Model Configuration**\n  - **DES**: Configurable entities with stochastic process logic\n  - **SD**: Stock-and-flow models with feedback loops and time-based equations\n\n- **Real-Time Metrics**  \n  - **DES**: Performance indicators such as wait times and throughput\n  - **SD**: Time series data for stocks, flows, and auxiliaries\n\n- **Secure Implementation**  \n  Uses regex-based parsing (not `eval()`) for processing distribution inputs and safe model execution.\n\n---\n\n## 🔧 Installation\n\n### **Prerequisites**\n- Python **3.12** or higher\n- [`uv` package manager](https://github.com/astral-sh/uv)\n\n### **Install `uv`**\n\n#### On macOS and Linux:\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n#### On Windows (PowerShell):\n```powershell\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n```\n\nLearn more: [astral-sh/uv](https://github.com/astral-sh/uv)\n\n---\n\n## 🛠️ Usage\n\n### **Clone the repository**\n```bash\ngit clone https://github.com/IamCatoBot/text2sim-MCP-server.git\n```\n\n### **Integration with Claude Desktop**\n\n1. Open:\n \n`Claude \u003e Settings \u003e Developer \u003e Edit Config \u003e claude_desktop_config.json`\n\n2. Add the following block:\n```json\n{\n  \"mcpServers\": {\n    \"Text2Sim MCP Server\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"--directory\",\n        \"PATH_TO_TEXT2SIM_MCP_SERVER\", \n        \"run\",\n        \"mcp_server.py\"\n      ],\n      \"env\": {}\n    }\n  }\n}\n```\n\n\u003e **Note:** If the `uv` command is not found, run `which uv` (Unix) or `Get-Command uv` (PowerShell) and use the full path in the `\"command\"` field.\n\n---\n\n## 📚 API Reference\n\n### Overview\n\nThe MCP server provides tools for both Discrete-Event Simulation and System Dynamics modeling:\n\n- **Discrete-Event Simulation**: Process-oriented modeling with SimPy\n- **System Dynamics**: Stock-and-flow modeling with PySD\n\nWhen using a Large Language Model (e.g. Claude) client, natural language prompts are translated into appropriate configurations via the **Model Context Protocol (MCP)**.\n\n---\n\n## 🏗️ Architecture\n\nText2Sim is structured into modular components:\n\n- **MCP Server** – Handles natural language requests via MCP.\n- **Discrete-Event Simulation (DES) Module**\n  - **Simulation Model** – Core [SimPy](https://simpy.readthedocs.io/en/latest/) engine that executes process flows.\n  - **Entity Class** – Represents units flowing through the system.\n  - **Process Steps** – Encapsulate logic for each process stage.\n  - **Metrics Collector** – Gathers statistics like wait times and throughput.\n  - **Secure Distribution Parser** – Parses probability distributions safely.\n- **System Dynamics (SD) Module**\n  - **Model Registry** – Manages available SD models.\n  - **PySD Integration** – Runs stock-and-flow models using PySD.\n  - **Simulation Controls** – Time steps, durations, and parameter adjustments.\n  - **Results Formatter** – Structures time series data for output.\n\nFor detailed documentation of each module, see:\n- [DES Module Documentation](DES/README.md)\n- [SD Module Documentation](SD/README.md)\n\n---\n\n## 🔐 Security Considerations\n\n- **No `eval()` usage**  \n  Regex-based parsing prevents arbitrary code execution.\n  \n- **Input Validation**  \n  Distribution types, parameters, and model configurations are validated before execution.\n\n- **Robust Error Handling**  \n  Errors are reported cleanly without leaking internal state.\n\n---\n\n## 🤝 Contributing\n\nPull requests are welcome! Please fork the repo and submit a PR. Suggestions, bug reports, and feature ideas are always appreciated.\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIamCatoBot%2Ftext2sim-MCP-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIamCatoBot%2Ftext2sim-MCP-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIamCatoBot%2Ftext2sim-MCP-server/lists"}