anylogicPLE-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@anylogicPLE-mcp Create a queueing model for a coffee shop with 2 baristas."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
anylogicPLE-mcp
MCP server that generates AnyLogic simulation models from natural-language prompts in Claude Code.
Describe a queueing system, factory, or ER in plain language → get a .alp file that opens and runs in AnyLogic PLE (the free edition). Models are validated automatically against PLE limits.
The goal of this project is to shorten the AnyLogic learning curve by giving you a working simulation model as a starting point. Run the simulation, observe the results, study how the model is built, and use it as a reference when building your next model from scratch.
Unlike most tools that focus on a single modeling approach, AnyLogic supports three paradigms in one environment — discrete event, agent-based, and system dynamics — covering virtually any industrial engineering problem you can think of, from factory floors to hospital ERs to supply chains. On top of that, the free PLE edition makes it accessible to anyone learning simulation, and the block-based Process Modeling Library maps naturally to code generation.
Disclaimer: This project is not affiliated with or endorsed by AnyLogic. AnyLogic is a trademark of The AnyLogic Company. Generated models are subject to AnyLogic PLE's terms of use.
Who is this for
If you are an industrial engineer, this tool lets you prototype a queuing or process model in natural language and have something running within minutes — skipping the initial friction of block wiring and XML quirks, and getting straight to the questions that matter: utilization rates, bottlenecks, throughput.
The current version handles discrete event / queueing models well. Resource-constrained models (shift schedules, breakdowns, Seize/Release blocks) are not yet supported — that is where contributions are most welcome. Whether you want to add new block types, new templates, or improve the XML generation, your input is genuinely valuable and very much encouraged.
Related MCP server: FlexSim MCP Server
What it looks like
You type this in Claude Code:
Create a 3-stage CNC job shop model "CNCJobShop":
- Jobs arrive every 15 minutes (exponential)
- Roughing: 2 machines, triangular(8,12,18) min
- Semi-finish: 1 machine, triangular(8,12,16) min
- Finishing: 1 machine, triangular(5,8,12) min
Give me the .alp file.Claude calls the MCP tools, builds the .alp XML, saves the file to your output folder, and tells you which stage is the bottleneck. Open the file in AnyLogic PLE and click Run.
Requirements
Python 3.10+
Claude Code (VS Code extension or CLI)
AnyLogic PLE 8.9.8 — free, to open and run generated models
Install
1. Install the package
pip install -e .Find the entry point path — you need it in the next step:
where anylogic-mcp # Windows
which anylogic-mcp # macOS / Linux2. Create .mcp.json in your working directory
Create a file named .mcp.json in the folder you open in VS Code:
{
"mcpServers": {
"anylogic": {
"command": "/path/to/anylogic-mcp",
"args": [],
"env": {
"ALP_OUTPUT_DIR": "/path/where/alp/files/are/saved"
}
}
}
}Windows: use double backslashes in JSON paths:
"C:\\Users\\YourName\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\anylogic-mcp.exe"See WINDOWS_SETUP.md for a full step-by-step walkthrough.
3. Reload VS Code
Ctrl+Shift+P → Developer: Reload Window → click Allow when prompted to approve the anylogic server.
Verify the connection:
What are the AnyLogic PLE limits?MCP tools
Tool | What it does |
| Build and validate a model; returns a model ID |
| Write the |
| Re-check a stored model against PLE limits |
| Return all PLE restrictions |
| Upload to AnyLogic Cloud (requires API key) |
Built-in templates
Template | Entity | Default config | Traffic intensity ρ |
| Truck | 3 loading docks | 0.75 |
| Customer | 1 server | 0.60 |
| Part | 2 machines in series (A→B) | 0.83 |
| Patient | triage + 3-doctor treatment | 0.88 |
Custom models (any entity name, any block chain, any parameters) are fully supported. See EXAMPLES.md for prompts covering manufacturing, service systems, and healthcare.
Supported blocks
Block |
| Notes |
|
| Always use |
|
| Time unit: minutes; |
| — | Auto-inserted before every |
| — |
Critical gotcha:
exponential(10)means 10 arrivals per minute, not one per 10 minutes. A warehouse with trucks arriving every 20 minutes needsexponential(1.0/20.0).
PLE limits (auto-enforced)
Limit | Value |
Agent types | 10 |
Blocks per agent | 200 |
Dynamic agents | 50,000 |
Simulation time | 5 h (unlimited when using Process Modeling Library — all generated models use it) |
Opening generated models
Launch AnyLogic PLE 8.9.8
File → Open → select the
.alpfile fromALP_OUTPUT_DIRClick the green Run button
How the XML generation works
model_builder.py produces AnyLogic 8.9.8-compatible .alp XML. The block ItemNames
(e.g. Source = 1412336242928, Queue = 1412336242932) were extracted from a
ground-truth AnyLogic file — they must be exact or the model tree crashes on load.
Key invariants baked into the generator:
A
Queueis auto-inserted before everyDelayto buffer when server capacity is fullQueue capacity is set to 100,000 (default in AnyLogic is 100, which causes OOM on long runs)
interarrivalTimeis always emitted in rate form:exponential(1.0/mean)notexponential(mean)Parameter name is
delayTime(notdelay); time unit isMINUTETimePlotchart lives insideMain/Presentation/Level/Presentation, not inSimulationExperiment
Project structure
├── src/anylogic_mcp/
│ ├── server.py # MCP server and tool handlers
│ ├── model_builder.py # .alp XML generator (core logic)
│ ├── ple_validator.py # PLE limit checker
│ └── cloud_client.py # AnyLogic Cloud upload (optional)
├── tests/
│ ├── test_model_builder.py # XML structure, parameters, chart correctness
│ └── test_ple_validator.py # PLE limit enforcement
└── pyproject.tomlRun the tests:
# Windows
set PYTHONPATH=src && python -m pytest tests/ -v
# macOS / Linux
PYTHONPATH=src pytest tests/ -vContributing
Pull requests are welcome. The most useful additions:
New block types —
Service,Seize/Release/ResourcePoolfor resource-constrained models. The ItemNames are already in_ITEM_NAMESinmodel_builder.py; what's needed is the parameter XML and connector wiring.New templates — supply chain, logistics, pedestrian flow.
Fluid Library support — bulk/continuous flow (tanks, pipes) requires a different XML structure; the block ItemNames would need to be extracted from a ground-truth Fluid model.
Test coverage — every new block type needs XML invariant tests matching the pattern in
test_model_builder.py.
Optional: AnyLogic Cloud upload
Set ANYLOGIC_API_KEY in the env block of .mcp.json:
"env": {
"ALP_OUTPUT_DIR": "...",
"ANYLOGIC_API_KEY": "your_key_here"
}Get a key at: https://cloud.anylogic.com/settings/api-keys
License
MIT — see LICENSE.
Disclaimer
This project is not affiliated with or endorsed by AnyLogic. AnyLogic is a trademark of The AnyLogic Company. Generated models are subject to AnyLogic PLE's terms of use.
Available Tools
5 toolsanylogic_create_model_pleA
Create an AnyLogic simulation model that complies with PLE (Personal Learning Edition) limits. The model will be validated against PLE restrictions: max 10 agent types, max 200 blocks per agent, max 50,000 dynamic agents. Use this to create models that can be downloaded and run in free AnyLogic PLE.
Inputs: name (required), description (required), model_type, template_params, +2 more.
anylogic_download_for_pleB
Get download information for running model in AnyLogic PLE locally. Returns the model file and instructions for opening in free AnyLogic PLE software.
Inputs: model_id (required).
anylogic_get_ple_limitsB
Get information about AnyLogic PLE (Personal Learning Edition) limitations. Useful for understanding what restrictions apply when creating models.
Inputs: no named parameters.
anylogic_upload_to_cloudA
Upload a PLE-compliant model to AnyLogic Cloud. Requires ANYLOGIC_API_KEY to be set. The model will be available for running simulations in the cloud, and source files can be downloaded for use in local AnyLogic PLE.
Inputs: model_id (required), enable_source_download, make_public.
anylogic_validate_pleA
Check if a model definition complies with AnyLogic PLE (Personal Learning Edition) limits. Returns detailed information about limit usage and any violations.
Inputs: model_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: create, validate, get limits, download, and upload. No overlap in functionality.
All tools follow a consistent `anylogic_verb_noun` snake_case pattern, e.g., `anylogic_create_model_ple`, `anylogic_validate_ple`.
With 5 tools, the server is well-scoped for managing PLE-compliant AnyLogic models without being overwhelming or too sparse.
Covers creation, validation, limits, download, and upload. Missing update/delete functionality, but core lifecycle is present for the PLE context.
Related MCP Connectors
Design AI agent teams for a business problem and generate ready-to-paste Claude Code prompts.
People and AI agents build software together in persistent cloud sessions for Claude Code.
Deploy apps built with Claude Code or Codex, get releases approved, share them in an App Portal.
Build and manage AI-native customer support agents from Claude or any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceControl and automate FlexSim simulations through AI assistants like Claude, enabling manufacturing and warehouse digital twin analysis, parameter studies, and real-time model manipulation via tools for opening models, running simulations, evaluating FlexScript, and exporting results.1512MIT
- FlicenseNot gradedqualityDmaintenanceControls FlexSim simulation engine via Model Context Protocol, enabling natural language-driven simulation modeling and automation.2-
- AlicenseBqualityBmaintenanceEnables natural language conversion of production and queueing systems into Petri net models, with simulation and PNML export via MCP tools.66MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude LLM to run HotSpot atmospheric dispersion simulations via natural language requests, supporting multiple release models and returning parsed results.-