simulink-mcp
Give AI agents structured access to Simulink models via the MATLAB Engine for Python, enabling model lifecycle management, parameter queries, diagnostics, and more.
README
simulink-mcp
Simulink MCP tools + Claude/Codex skill — give AI agents structured access to Simulink models via the MATLAB Engine for Python.
What's inside
| Component | Path | What it does |
|---|---|---|
| MCP Server | server/ |
30 FastMCP tools: model lifecycle, parameters, diagnostics, runtime, capture |
| MATLAB Helpers | matlab/ |
32 .m scripts that implement each tool on the MATLAB side |
| Claude/Codex Skill | skill/ |
Routing guide (SKILL.md, map.md, patterns) + hooks that steer AI toward MCP tools |
Quick install (Windows, one command)
git clone https://github.com/wlin4480/simulink-mcp
cd simulink-mcp
.\install.ps1
The installer:
- Copies the skill to
~\.shared-skills\simulink-toolbox - Creates junction links for Claude Code (
~\.claude\skills\) and Codex (~\.codex\skills\) - Wires the hooks in
~\.claude\settings.jsonand~\.codex\hooks.json - Prints the MCP server config snippet to paste into Claude Desktop
MCP server setup
Prerequisites
- MATLAB R2022b or later with the Simulink toolbox
- Python 3.10+
Install
install.ps1 handles this automatically. To install manually:
# 1. Install the server as a global CLI command (no path dependency)
pip install -e C:\path\to\simulink-mcp
# 2. Install matlabengine — version must match your MATLAB release
pip install matlabengine==25.2 # R2025b
pip install matlabengine==24.2 # R2024b
After pip install -e, the simulink-mcp command is available system-wide.
You can clone the repo anywhere and move it later without breaking Claude Desktop.
Claude Desktop config
Add to %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"simulink-tools": {
"command": "simulink-mcp",
"env": {
"SLX_WORKSPACE": "C:\\path\\to\\your\\models"
}
}
}
}
Restart Claude Desktop. The server cold-starts in ~20 s on first tool call.
Environment variables
| Variable | Default | Description |
|---|---|---|
SLX_WORKSPACE |
Current directory | Directory to search for .slx model files |
SLX_HELPERS_PATH |
Bundled matlab/ |
Override path to the MATLAB helper scripts |
33 MCP tools
Model lifecycle
simulink_load_model · simulink_create_model · simulink_close_model · simulink_loaded_models · simulink_model_status · simulink_save_model
Structure & discovery
simulink_get_block_tree · simulink_explore_block · simulink_describe_block_ports · simulink_trace_port_connections · simulink_library_lookup
Parameters
simulink_query_params · simulink_set_block_params · simulink_patch_and_verify
Build & wiring
simulink_add_block · simulink_add_subsystem · simulink_connect_ports · simulink_delete_block
Diagnostics
simulink_compile_diagnostics · simulink_step_diagnostics · simulink_solver_audit
Advanced
simulink_block_workspace_dependency · simulink_powerlib_net_query
Script execution
simulink_run_script · simulink_run_script_async · simulink_poll_script
Visual capture
simulink_screenshot · simulink_capture_figure
Runtime
simulink_workspace_set · simulink_run_window · simulink_runtime_reset · simulink_signal_snapshot
Health check
simulink_ping
Skill: Claude Code + Codex
The skill/ directory is the simulink-toolbox skill — loaded by Claude Code and Codex to route Simulink-related tasks to MCP tools instead of shell MATLAB calls.
After install.ps1, invoke with /simulink-toolbox in Claude Code, or any Simulink-related prompt triggers it automatically via hooks.
Hooks
| Platform | File | Effect |
|---|---|---|
| Claude Code | hooks/claude/user-prompt-submit.sh |
Injects routing reminder on Simulink keywords |
| Claude Code | hooks/claude/pre-tool-use.sh |
Blocks Bash calls that invoke MATLAB directly |
| Codex | hooks/codex/codex_simulink_hook.py |
Same + warns on find_system inside run_script |
Patterns
| Pattern | When to use |
|---|---|
patterns/build-and-verify.md |
Building a new model from scratch |
patterns/debug-existing-model.md |
Diagnosing errors in an existing model |
patterns/trace-connectivity.md |
Tracing signal paths and port connections |
patterns/param-sweep.md |
Long-running parameter sweeps |
Project structure
simulink-mcp/
├── install.ps1 # One-click installer (Windows)
├── requirements.txt
├── server/
│ ├── server.py # FastMCP entry point
│ ├── simulink_tools.py # All 30 tool implementations
│ ├── matlab_session.py # MATLAB Engine session manager
│ └── exceptions.py
├── matlab/
│ └── slx_*.m # 32 MATLAB helper scripts
└── skill/
├── SKILL.md # Skill entry point
├── map.md # Intent → tool routing table
├── INVARIANTS.md # Design constraints
├── index.json # Tool inventory
├── patterns/ # Step-by-step task patterns
└── hooks/ # Claude + Codex hooks
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。