
sohumsuthar/simulink-mcp
Deployment & DevOpsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
MCP server for MATLAB Simulink — let LLMs take control of and understand Simulink.
Обзор
14 structured MCP tools for loading models, inspecting blocks, tweaking parameters, running simulations, and capturing figures as images. Every operation is a typed tool call with validated inputs — no arbitrary code execution. General-purpose MATLAB servers pass arbitrary code strings to eval(). That works until the AI hallucinates a function name, forgets a semicolon, or writes a plot() call that blocks forever. This server exposes Simulink operations as discrete, validated tools — the AI picks the right tool and fills in typed parameters instead of generating free-text MATLAB code. The MATLAB Engine ships with every MATLAB installation: is typically: - /Applications/MATLAB_R2024b.app - /usr/local/MATLAB/R2024b - C:\Program Files\MATLAB\R2024b Then ask Claude to load a model and it'll take it from there. - — MATLAB starts on first tool call, not server launch. MCP handshake finishes in ~0.5s; MATLAB boots in the background (~15-20s).
README
Показан фрагмент оригинального README. Открыть оригинал.
14 structured MCP tools for loading models, inspecting blocks, tweaking parameters, running simulations, and capturing figures as images. Every operation is a typed tool call with validated inputs — no arbitrary code execution.
Why this over a general MATLAB MCP server?
General-purpose MATLAB servers pass arbitrary code strings to eval(). That works until the AI hallucinates a function name, forgets a semicolon, or writes a plot() call that blocks forever. This server exposes Simulink operations as discrete, validated tools — the AI picks the right tool and fills in typed parameters instead of generating free-text MATLAB code.
Install
1. MATLAB Engine for Python
The MATLAB Engine ships with every MATLAB installation:
cd /extern/engines/python
pip install .
`` is typically:
- macOS:
/Applications/MATLAB_R2024b.app - Linux:
/usr/local/MATLAB/R2024b - Windows:
C:\Program Files\MATLAB\R2024b
2. simulink-mcp
pip install simulink-mcp
Or from source:
git clone https://github.com/sohumsuthar/simulink-mcp.git
cd simulink-mcp
pip install .
3. Verify
python -c "import matlab.engine; print('OK')"
Configuration
Claude Code
claude mcp add simulink -- python -m simulink_mcp
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"simulink": {
"command": "python",
"args": ["-m", "simulink_mcp"],
"env": {
"SIMULINK_MCP_WORKDIR": "/path/to/your/models"
}
}
}
}
Then ask Claude to load a model and it’ll take it from there.
Environment Variables
| Variable | Default | Description |
|---|---|---|
SIMULINK_MCP_WORKDIR |
~ |
MATLAB working directory on startup |
Tools
| Tool | What it does |
|---|---|
load_model |
Load a .slx model and list top-level blocks |
close_model |
Close a model (with optional save) |
create_model |
Create a new blank Simulink model |
save_model |
Save a model to disk |
list_blocks |
List blocks with configurable depth and type filtering |
get_block_params |
Read all dialog parameters of any block |
get_model_config |
Read solver, timing, and logging configuration |
set_block_param |
Set any block parameter via set_param() |
set_model_config |
Set model-level config (solver, stop time, etc.) |
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"simulink": {
"command": "python",
"args": ["-m", "simulink_mcp"],
"env": {
"SIMULINK_MCP_WORKDIR": "/path/to/your/models"
}
}
}
}