LabscoMCP early access ↗
matlabMCP SERVER · OFFICIAL PROJECT

MATLAB MCP Core Server

Run MATLAB from a conversation — evaluate a snippet, execute a script, run its tests, and lint it before any of that.

by matlab ↗Physical Sciences & Scientific Computing✓ Official

LABSCO 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 output
  • run_matlab_file — execute a .m script by absolute path
  • run_matlab_test_file — run a unit-test file written to MATLAB's testing framework and get the full results
  • check_matlab_code — static analysis on a script: style, likely errors, deprecated functions, performance and best-practice violations. Read-only, and the file is not modified
  • detect_matlab_toolboxes — which MATLAB and which toolboxes are installed, with version numbers
  • Two resources an assistant can read before it writes anything: matlab_coding_guidelines for naming, formatting, commenting and error handling, and plain_text_live_code_guidelines for 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