Introduction¶
DeepSeek Harness (DSH) is an agent development framework that supports plugin-based extensions. After deploying tools such as MATLAB in a local environment, connecting their capabilities to DSH through the MCP (Model Context Protocol) is a key step to enable local computation and model dialogue.
dsh-mcp-matlab is a DSH bridge plugin. It connects the local matlab-mcp-server-windows-x64.exe to the DSH environment, registers the mcp__matlab__* tool suite, and allows AI agents to directly execute MATLAB code, run scripts, or detect toolboxes within a DSH session.
What This Is¶
This is a pure configuration-file plugin. It does not include MATLAB itself or the MCP Server executable. It only provides a cordis.patch.yml configuration template to connect DSH with the local MATLAB MCP Server.
Core Features¶
After installation and configuration, DSH will gain the following 5 tools:
mcp__matlab__evaluate_matlab_code: Execute code snippets in a MATLAB session and return command-line output.mcp__matlab__run_matlab_file: Run a specified.mscript file.mcp__matlab__run_matlab_test_file: Run test files using MATLAB’sruntestscommand.mcp__matlab__check_matlab_code: Perform static code checks on.mscripts.mcp__matlab__detect_matlab_toolboxes: List the versions of currently installed MATLAB toolboxes.
Installation and Activation¶
Use the following command to install the plugin:
dsh plugin --profile desktop add github:yh01010/dsh-mcp-matlab
After installation, restart DSH to apply the changes. Note that after installation, the mcp__matlab__* tools do not appear directly in the tool list. Configuration of external dependencies is still required.
Prerequisites and Configuration¶
This plugin contains only configuration files and does not include dependencies. Before using it, you must prepare the following external dependencies:
- MATLAB MCP Server executable: You must download
matlab-mcp-server-windows-x64.exeyourself (it is recommended to place it in a fixed directory such as%USERPROFILE%\.local\bin\). - MATLAB environment: MATLAB R2021a or a newer version must be installed, and you must have a valid license.
After installation, you must modify the $DSH_HOME/cordis.patch.yml file. Do not use insert in the home patch to write configuration. If the plugin package is already installed, use the id override method to modify the configuration.
Add or modify the following content in $DSH_HOME/cordis.patch.yml:
# $DSH_HOME/cordis.patch.yml
- id: mcp-matlab
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: matlab
transport: stdio
command: 'C:\Users\<你的用户名>\.local\bin\matlab-mcp-server-windows-x64.exe'
args:
- '--matlab-root=D:\path\to\your\matlab'
- '--matlab-display-mode=nodesktop'
- '--disable-telemetry'
toolCallTimeoutMs: 120000
failOnStartupError: false
Key configuration notes:
command: Fill in the full path tomatlab-mcp-server-windows-x64.exe.args: Specify the MATLAB installation root directory using--matlab-root.failOnStartupError: The default isfalse. If set totrueand the path is misconfigured, DSH startup will fail.
Troubleshooting¶
- The
mcp__matlab__*tools are not visible: The most common cause is that the paths in the configuration file are still placeholders. Check whether thecommandandargsvalues in$DSH_HOME/cordis.patch.ymlhave been filled with real paths. - DSH fails to start: The error message
serverName "matlab" is already in useis usually caused by usinginsertin the home patch to insert an entry that duplicates the plugin package configuration. Remove the duplicateinsertlines and use theidoverride instead. - Tool invocation reports a JSON Schema error: Some model providers (such as Alibaba Cloud DashScope) may reject tool definitions with empty parameter schemas. This issue usually occurs in the model adaptation layer, not in the plugin itself.
- Tool invocation times out: MATLAB cold start or toolbox loading can take a long time and may cause the call to time out. You can appropriately increase the
toolCallTimeoutMsvalue.
Removal¶
To remove the plugin:
dsh plugin --profile desktop remove dsh-mcp-matlab
License¶
MIT