detect_matlab_toolboxesLABSCO SUMMARY
MathWorks' own server, so the code runs in real MATLAB rather than an approximation of it.
The useful pairing is the linter and the runner: check_matlab_code reads a script for style, deprecated calls and likely errors without executing it, which is the cheap check to make before run_matlab_file starts a session. It can also attach to a MATLAB you already have open, so the variables in your workspace stay where they are.
What it is
MathWorks' own MCP server for MATLAB. It starts MATLAB, or attaches to a session you already have open, runs the code you give it and returns the output. Five tools and two coding-standard resources.
What you get
evaluate_matlab_code— run a string of MATLAB with your project directory as the working folder, and read the real outputrun_matlab_file— execute a.mscript by absolute pathrun_matlab_test_file— run a unit-test file written to MATLAB's testing framework and get the full resultscheck_matlab_code— static analysis on a script: style, likely errors, deprecated functions, performance and best-practice violations. Read-only, and the file is not modifieddetect_matlab_toolboxes— which MATLAB and which toolboxes are installed, with version numbers- Two resources an assistant can read before it writes anything:
matlab_coding_guidelinesfor naming, formatting, commenting and error handling, andplain_text_live_code_guidelinesfor version-controllable live scripts
Requirements
MATLAB R2021a or later, installed and on the system PATH — the server supports releases from the past five years. No account or key beyond your own MATLAB licence. Download the release binary for Windows, Linux or macOS (or build it with go install), then register it over stdio; Claude Desktop takes the matlab-mcp-server.mcpb bundle instead. --matlab-root picks which MATLAB to start, --matlab-session-mode=existing attaches to a session already shared with shareMATLABSession(), and --matlab-display-mode=nodesktop keeps the desktop closed. Every flag also works as an environment variable prefixed MW_MCP_SERVER_. Anonymised usage data is collected by default and --disable-telemetry=true turns it off.
Setup effort
Follow the published steps — go install github.com/matlab/matlab-mcp-server/cmd/matlab-mcp-server@latest
USE CASES
Trying an idea against real data
Evaluate the snippet with your project as the working folder and read the actual output, not a predicted one.
Reviewing a script before running it
Static analysis first — style, deprecated functions and likely errors — with the file left untouched.
Checking whether a change broke the tests
Run the unit-test file and read the full results back in the conversation.
Finding out whether a toolbox is even installed
Ask which MATLAB and which toolboxes are present, with versions, before planning around a function.
Running an analysis end to end
Execute the script by absolute path and read its output.
5 tools
Listed in project docs. Your client may show a different list.
check_matlab_codeevaluate_matlab_coderun_matlab_filerun_matlab_test_fileBEFORE YOU INSTALL
What to know first
Tools you get
5 tools named in the project's documentation. --extension-file registers your own tool definitions alongside the built-in five.
Requires
MATLAB R2021a or later, on the system PATH
INSTALLATION
Connect your client
Server setup
Install MATLAB R2021a or later and add it to the system PATH.
On Windows or Linux, download matlab-mcp-server-windows-x64.exe or matlab-mcp-server-linux-x64 from the latest release at https://github.com/matlab/matlab-mcp-server/releases/latest — or build it from source with Go:
go install github.com/matlab/matlab-mcp-server/cmd/matlab-mcp-server@latestOn macOS with Apple silicon, run:
curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-arm64On macOS with an Intel processor, run:
curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-x64On macOS, then make the download executable:
chmod +x ~/Downloads/matlab-mcp-serverMCP Clients
Claude Code
claude mcp add --transport stdio matlab -- <YOUR_PATH_TO_MATLAB_MCP_SERVER_BINARY><YOUR_PATH_TO_MATLAB_MCP_SERVER_BINARY> is the full path of the binary you downloaded or built (for example ~/Downloads/matlab-mcp-server written out in full on macOS).
Claude Desktop
Install the Filesystem extension first: Settings > Extensions > Browse extensions, search for Filesystem (by Anthropic), Install, choose the folders it may access and enable it.
Download the bundle matlab-mcp-server.mcpb from https://github.com/matlab/matlab-mcp-server/releases/latest.
Double-click matlab-mcp-server.mcpb and click Install in Claude Desktop (or File > Settings > Extensions > Advanced Settings > Install Extension and pick the file).
Server arguments are set later under Settings > Extensions > Configure.
VS Code
{
"servers": {
"matlab": {
"type": "stdio",
"command": "<YOUR_PATH_TO_MATLAB_MCP_SERVER_WINDOWS>",
"args": []
}
}
}Save as .vscode/mcp.json in your workspace and point command at the binary you downloaded — the Windows .exe with doubled backslashes as shown, or the full path of matlab-mcp-server on Linux or macOS.
Codex
codex mcp add matlab -- <YOUR_PATH_TO_MATLAB_MCP_SERVER_BINARY><YOUR_PATH_TO_MATLAB_MCP_SERVER_BINARY> is the full path of the binary you downloaded or built (for example ~/Downloads/matlab-mcp-server written out in full on macOS). On Windows, Codex does not forward WINDIR, which MATLAB needs: add env_vars = ["WINDIR"] to the [mcp_servers.matlab] section of C:\Users\<username>\.codex\config.toml.