MATLAB MCP Server

The official MathWorks MCP server: the agent starts and quits MATLAB, writes and runs code, and checks it for errors and style

  • 1,815 ★ on the repository
  • Last commit
MCP serverOfficialEditors’ pick

Broad access

Why this level

  • Runs arbitrary MATLAB code on the user's machine
  • Starts and quits MATLAB processes and works with project files
All reasons and checks

matlab/matlab-mcp-server

Install

Manual install

go install github.com/matlab/matlab-mcp-server/cmd/matlab-mcp-server@latest

Build from source, needs Go. Prebuilt binaries for Windows, Linux and macOS are on the releases page.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Runs arbitrary MATLAB code on the user's machine
  • Starts and quits MATLAB processes and works with project files

This is third-party code. Review the repository files before installing.

What it does

The server connects an MCP client to a MATLAB installation on the machine. The agent can start and quit MATLAB, evaluate a line of code or run a full .m script and get the output, run tests under the MATLAB test framework, and perform static analysis of a script without executing it. A separate tool returns the installed toolboxes and their versions. The server can start a new MATLAB session or connect to an existing one via shareMATLABSession, with or without the desktop. It offers configuration through flags and MW_MCP_SERVER_ environment variables, custom tools through extension files, and resources with MATLAB coding rules the agent reads before generating code.

Who it is for. For engineers, researchers and analysts who write and run MATLAB code and want to connect an agent to it.

Good fit when

  • You want the agent to write and run MATLAB code in your installation
  • You want to run MATLAB tests and get the results parsed
  • You want to lint a script for errors, deprecated functions and style without running it
  • You need the installed toolboxes and their versions

Not a fit when

  • There is no MATLAB R2021a or newer installed on the machine
  • You need a shared or centralized multi-user install without arranging it with MathWorks

Example request

Run my analysis.m script and explain what the plot shows

MCP

Transport
stdio
Authentication
not required

Environment variables

MW_MCP_SERVER_MATLAB_ROOT
Path to the MATLAB installation to use, without /bin. By default the first MATLAB on PATH is used.

Limitations

Requires MATLAB R2021a or newer on the system PATH; the MATLAB license is bought separately from MathWorks. The server ships as a Go binary for Windows, Linux and macOS on the releases page, or builds from source via go install. Under the MathWorks license agreement the server must not be shared by multiple users. It collects anonymized telemetry by default, disabled with the disable-telemetry flag. Connecting to an existing session requires installing a toolbox first and calling shareMATLABSession.

How to disable. In Claude Code run claude mcp remove matlab. In other clients delete the matlab entry from the MCP configuration, or remove the extension in Claude Desktop.

FAQ

Is this the official MathWorks server?

Yes, the repository belongs to the MathWorks organization and is presented as the official MATLAB MCP Server.

Do I need a MATLAB license?

Yes. The server runs on top of an installed MATLAB R2021a or newer, licensed separately from MathWorks.

Discussion

No questions or reviews yet.

Editors’ pick

The official MathWorks kit that connects an AI agent to MATLAB through an MCP server and curated skills

SkillExtended access1.3KRepository stars

An MCP server that lets an agent run local Stata: regressions, econometrics, replicating computations from papers

MCP serverExtended access276Repository stars
Editors’ pick

The official MathWorks kit that gives an agent MCP tools and knowledge to work with Simulink models

SkillExtended access1.3KRepository stars

MCP server and CLI to drive real Microsoft Excel: Power Query, DAX, VBA, PivotTables and charts

MCP serverBroad access887Repository stars
Official

Official Tableau MCP server: the agent finds data sources, sends queries to them and opens dashboards and Pulse metrics

MCP serverBroad access372Repository stars

MCP server that gives an agent access to MySQL: schema inspection and queries, read-only by default, writes behind flags

MCP serverExtended access2.2KRepository stars

README in short

The README presents the official MathWorks MCP server for running MATLAB from an agent. It documents the tools: detecting installed toolboxes, static code checks, evaluating code, running a script and running a test file, plus resources with MATLAB coding rules. It gives setup for Claude Code, Claude Desktop, GitHub Copilot in VS Code and Codex, installing via a release binary or a go install build. Arguments are set through flags or MW_MCP_SERVER_ environment variables, with session modes new, auto and existing. It notes telemetry on by default and the MathWorks license terms.

README badge

Report a problem