Skip to content
MATLAB MCP Server

MATLAB MCP Server

Released
Proprietary (MathWorks)

Summary

MathWorks' official MCP server: let Claude Code, Copilot or Codex run MATLAB code, lint it and execute unit tests on your local install.

Features

  • Runs MATLAB code, .m script files and MATLAB unit tests from an AI agent
  • Static code analysis for style, likely errors and performance issues
  • Reports the installed MATLAB release and available toolboxes
  • Official prebuilt binaries for Windows, Linux and macOS including Apple silicon
  • One-click .mcpb bundle install for Claude Desktop
  • Custom tool definitions via --extension-file; telemetry opt-out supported

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "MATLAB MCP Server" tools will be available.
{
  "mcpServers": {
    "matlab-mcp-server": {
      "command": "/fullpath/to/matlab-mcp-server-binary",
      "args": []
    }
  }
}

Description

The MATLAB MCP Server is MathWorks' own Model Context Protocol integration, and it connects an AI coding agent to a real MATLAB installation on your machine rather than to a sandbox that merely imitates one. The agent starts and stops MATLAB, writes code into it, runs it, and reads back whatever MATLAB actually prints — errors, figures and all.

Five tools make up the surface. detect_matlab_toolboxes reports which MATLAB release and which toolboxes are installed, so an agent can check that the Signal Processing or Optimization toolbox a script needs is actually present before writing code against it. check_matlab_code runs MATLAB's static analyser for style problems, likely errors and performance warnings. evaluate_matlab_code executes a code string, run_matlab_file executes a .m script, and run_matlab_test_file runs a MATLAB unit-test file and returns the full result breakdown — which is what turns the server into a usable test-and-fix loop for engineering code.

It needs MATLAB R2021a or newer on your PATH and runs on Windows, Linux and macOS, Apple silicon included. MathWorks ships prebuilt binaries: Claude Desktop users can install the .mcpb bundle from the releases page with a double-click, while Claude Code, VS Code and Codex point at the binary directly. Behaviour is tunable through flags or MW_MCP_SERVER_-prefixed environment variables — --matlab-root to select an installation, --matlab-display-mode to choose desktop or nodesktop, --initial-working-folder to set the starting directory, and --extension-file to register your own tool definitions. Telemetry is opt-out via --disable-telemetry=true.

This is proprietary MathWorks software and it does not bundle MATLAB — you need your own licensed install for it to do anything.

Related MCP Servers

MCP: Engram

by Gentleman Programming

New

Persistent memory for coding agents as a single Go binary — SQLite and FTS5 behind MCP, an HTTP API, a CLI and a TUI, with no Node, Python or Docker required.

MCP: agent-device

by Callstack

New

Give a coding agent a live feedback loop on real mobile, TV and desktop apps — inspect, tap, type and capture evidence on iOS, Android and HarmonyOS over MCP or a CLI.

New

The official W&B MCP server: query experiment runs, Weave LLM traces, artifacts and registries in natural language, and write findings back as a W&B report.

Featured

Replicate's official MCP server: search thousands of hosted models, read their schemas, and run predictions on image, video, audio and language models from inside an agent.

Browse all MCP servers →