James-web11/dsh-matlab-mcp
Project Overview项目介绍
This is a profile bundle for DeepSeek Harness that registers the MathWorks MATLAB/Simulink MCP server, providing AI agents with tools to run MATLAB code, read, edit and test Simulink models. Use it when you need agents to automate MATLAB/Simulink workflows. It requires pre-installed MATLAB R2021a+, and MATLAB must be running before use.
这是DeepSeek Harness的配置包,用于注册MathWorks MATLAB/Simulink MCP服务器,为AI会话提供运行MATLAB代码、读写编辑测试Simulink模型的工具。需要AI代理控制MATLAB/Simulink时使用。注意:需预先安装MATLAB R2021a及以上版本和MATLAB Agentic Toolkit,使用前必须启动MATLAB。
请帮我了解并安装插件:【dsh-matlab-mcp】【https://github.com/James-web11/dsh-matlab-mcp】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:James-web11/dsh-matlab-mcp
把 James-web11/dsh-matlab-mcp 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-matlab-mcp
DeepSeek Harness (dsh) profile bundle that registers the MathWorks
MATLAB/Simulink MCP server into the dsh GUI, so agent sessions get native
mcp__matlab__* tools for controlling MATLAB and reading/building/testing
Simulink models.
| Kind | Tool name (in agent sessions) | What it does |
|---|---|---|
| MATLAB | mcp__matlab__evaluate_matlab_code |
Run any MATLAB code in the shared session |
| MATLAB | mcp__matlab__run_matlab_file / run_matlab_test_file |
Run a script / run unit tests |
| MATLAB | mcp__matlab__check_matlab_code |
Static Code Analyzer warnings for a .m file |
| MATLAB | mcp__matlab__detect_matlab_toolboxes |
MATLAB version + installed toolboxes |
| Simulink | mcp__matlab__model_overview |
Hierarchical model view |
| Simulink | mcp__matlab__model_read |
Block topology + expression notation |
| Simulink | mcp__matlab__model_edit |
Structural edits / parameter changes |
| Simulink | mcp__matlab__model_check |
Structural validation (unconnected ports, …) |
| Simulink | mcp__matlab__model_query_params |
Random access to any block/config parameter |
| Simulink | mcp__matlab__model_resolve_params |
Resolve workspace variables to values |
| Simulink | mcp__matlab__model_test |
Gherkin-based behavioral tests (needs Simulink Test) |
Prerequisites
- MATLAB R2021a or later (R2023a+ for the Simulink
model_*tools), with Simulink installed. - MATLAB Agentic Toolkit installed — it provides the MCP server binary
and the Simulink extension tools. In MATLAB:
(select MATLAB + Simulink toolkits). Manual download is documented in the Simulink Agentic Toolkit getting-started guide.setupAgenticToolkit("install") - pnpm (used by
dsh plugin):npm install -g pnpm - The dsh launcher on PATH (
dsh), ornpx(the installer falls back tonpx -y @deepseek-ai/dsh).
Install
From this repo (recommended)
git clone https://github.com/<your-account>/dsh-matlab-mcp.git
cd dsh-matlab-mcp
# Windows:
.\install.ps1
# macOS / Linux:
./install.sh
Directly from the git URL (no clone)
dsh plugin --profile web add github:<your-account>/dsh-matlab-mcp
Manually (no pnpm)
Append this to ~/.dsh/profiles/web/cordis.patch.yml (create the file with
content [] if missing), then restart the GUI:
- insert:
- id: mcp-matlab
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: matlab
transport: stdio
command: !!js "(process.env.USERPROFILE || process.env.HOME) + '/.matlab/agentic-toolkits/bin/matlab-mcp-server' + (process.platform === 'win32' ? '.exe' : '')"
args: !!js "['--matlab-session-mode=existing', '--extension-file=' + (process.env.USERPROFILE || process.env.HOME) + '/.matlab/agentic-toolkits/simulink/tools/tools.json']"
env:
WINDIR: 'C:\Windows'
toolCallTimeoutMs: 600000
failOnStartupError: true
New rows in a patch file must be added with an
insertlist without anid. A bareidtargets an existing entry and fails withentry "xxx" not found.
After install (required every MATLAB session)
- Restart the dsh GUI.
- Make sure MATLAB is running — the server attaches to a running session
(
--matlab-session-mode=existing), it does not start MATLAB. - In that MATLAB session, share it with the server once per session:
addpath('~/.matlab/agentic-toolkits/simulink') % Windows: use C:\Users\<you>\.matlab\... satk_initialize
Verify
After a GUI restart, ask the agent:
What version of MATLAB is running? List the installed toolboxes.
It should answer via mcp__matlab__detect_matlab_toolboxes. For Simulink:
Show me an overview of model MyModel.
Troubleshooting
| Symptom | Fix |
|---|---|
No mcp__matlab__* tools in the session |
GUI wasn't restarted after install; or failOnStartupError would have logged a loud error — check the GUI host console |
| Tools exist but calls fail / "not shared" | Run addpath('~/.matlab/agentic-toolkits/simulink'); satk_initialize in the running MATLAB session |
matlab-mcp-server binary missing |
Install the MATLAB Agentic Toolkit (setupAgenticToolkit("install")) |
| MATLAB version mismatch | The server attaches to whatever MATLAB is running; use the MATLAB you want to control |
| Tool calls time out on long simulations | Increase toolCallTimeoutMs (default 600000 = 10 min) in cordis.patch.yml |
| Simulink fails on Windows | WINDIR env var is injected by this bundle (required on Windows) |
Uninstall
dsh plugin --profile web remove dsh-matlab-mcp
Notes
- This repo contains only configuration — the MCP server itself is the
open-source MATLAB MCP Server
(Apache-2.0, © The MathWorks, Inc.), and the client plugin is
@deepseek-ai/dsh-mcp-clientshipped with DeepSeek Harness. - The bundle's paths are resolved at config time via
!!jsexpressions, so no per-machine editing is needed (Windows, macOS, Linux).
License
MIT
liangmianya/dsh-synapse
alaliqing/claude-paper
omdsh-dev/dsh-annotation
Anionex/dsh-turn-rewind
hanshenmesen/dsh-turn-delete
qkycir-123/dsh-run2skill
Tyan66666/billion-context-dsh
PKUfudawei/dsh-capability-menu