MATLAB MCP Server logo

MATLAB MCP Server

Connect AI coding agents to MATLAB to run code, tests, and analysis through MCP.

Install MATLAB MCP Server

Run the project’s own setup commands, in order.

Setup steps from the project

MATLAB MCP Server installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Install
    go install github.com/matlab/matlab-mcp-server/cmd/matlab-mcp-server@latest
    
  2. 2. Install
    curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-arm64
    
  3. 3. Install
    curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-x64
    
  4. 4. Run
    chmod +x ~/Downloads/matlab-mcp-server
    
  5. 5. Add to Claude Code
    claude mcp add --transport stdio matlab -- /fullpath/to/matlab-mcp-server-binary
    
  6. 6. Add to Claude Code
    claude mcp add --transport stdio matlab -- /fullpath/to/matlab-mcp-server-binary --initial-working-folder=/home/username/myproject
    

Overview

MATLAB MCP Server MCP server connects MCP-compatible AI applications with a local MATLAB installation. It can start and quit MATLAB, submit MATLAB code, run scripts, and assess code for style and correctness through the `script_path`, `code`, and `project_path` tools. Install MATLAB R2021a or later, place MATLAB on the system PATH, then configure the server as a local stdio process. Reach for it when an agent needs to work with MATLAB projects, execute analysis, or validate MATLAB code.

Use cases

  • Run MATLAB code from an AI coding workflow
  • Execute MATLAB scripts in a project folder
  • Assess MATLAB code for style and correctness
  • Start and stop a local MATLAB session
  • Configure MATLAB and Simulink agentic workflows

Key features

  • Run MATLAB code through MCP
  • Start and quit MATLAB
  • Assess code style and correctness
  • Set MATLAB installation and working folder
  • Support desktop and nodesktop display modes
  • Expose script_path, code, and project_path tools

Tools3

What MATLAB MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~7 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

43/43 checks healthy over the last 44d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1.8kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Tools exposed3Callable tools this server registers over MCP.
Directory activity8 viewsConfig copies, upvotes, and views on AllMCPs.

How MATLAB MCP Server works

What MATLAB MCP Server does

MATLAB MCP Server MCP server lets an MCP-compatible AI application control a local MATLAB installation. It supports starting and quitting MATLAB, writing and executing MATLAB code, and assessing MATLAB code for style and correctness. The exposed tools are script_path, code, and project_path, which provide the agent with entry points for working with scripts, code, and project locations.

This server is intended for development and analysis workflows where an AI agent needs MATLAB rather than a general-purpose shell or programming runtime. It can also assist with MATLAB and Simulink work when paired with the MATLAB Agentic Toolkit or Simulink Agentic Toolkit. Those toolkits are separate projects and are not required by the server description itself.

How it works

The MATLAB MCP Server MCP server runs as a local process using the stdio transport. The AI application starts the server binary and communicates with it through MCP. MATLAB normally starts when the first tool is called, although startup can be changed so MATLAB initializes when the server launches.

The server selects MATLAB from the system PATH by default. A command-line argument or corresponding environment variable can identify a specific MATLAB installation. The initial MATLAB working folder can also be configured; without that setting, the server uses the AI application's first MCP root when available, or a platform-specific default folder.

Setup and configuration

Install MATLAB R2021a or a later release and add it to the system PATH. For Windows and Linux, download the latest server release or build it from source with Go. On macOS, download the binary matching Apple silicon or Intel hardware and make it executable.

Register the binary with an MCP client. Claude Desktop uses the provided .mcpb bundle and requires its Filesystem extension to allow access to selected folders.

Supported configuration includes --matlab-root, --initialize-matlab-on-startup, --initial-working-folder, and --matlab-display-mode. Flags can be supplied in the client configuration or on the command line. Environment variable names use the MW_MCP_SERVER_ prefix, with hyphens converted to underscores; command-line flags take precedence when both forms are supplied.

Tools and capabilities

The MATLAB MCP Server MCP server exposes three MCP tools:

  • script_path for workflows involving MATLAB script paths.
  • code for sending MATLAB code to the connected environment.
  • project_path for identifying the MATLAB project path used by the workflow.

Together with the server's MATLAB lifecycle and code-assessment functions, these tools let an agent execute MATLAB work and inspect code quality or correctness.

Limitations and notes

A MATLAB installation is required; the server is not a standalone MATLAB runtime. The documented minimum version is R2021a. MATLAB desktop visibility is configurable, with desktop as the default display mode and nodesktop available for non-desktop use.

On Windows, Codex does not forward WINDIR by default. The README instructs Windows users to add WINDIR to the relevant Codex MCP server configuration so MATLAB and Simulink can run.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MATLAB MCP Server

MATLAB MCP Server is an MCP server that connects AI applications to a local MATLAB installation. Its main tools are `script_path`, `code`, and `project_path`, supporting MATLAB script workflows, code execution, and project paths. It also lets agents start or quit MATLAB and assess MATLAB code for style and correctness.

Install MATLAB R2021a or later, add it to your system PATH, download the appropriate server release, and register its binary with your MCP client.

Yes, MATLAB MCP works with Claude Desktop through the downloadable `.mcpb` bundle. Install Claude Desktop's Filesystem extension first, select the folders it may access, then install the bundle from the Extensions settings or by opening the downloaded file.

Set the `--matlab-root` argument to the full MATLAB installation path without `/bin`. If you prefer an environment variable, use `MW_MCP_SERVER_MATLAB_ROOT`. Without either setting, the server tries to find the first MATLAB installation on the system PATH.

Yes, Codex can register the server with `codex mcp add`. On Windows, add `WINDIR` to the Codex MCP server's `env_vars` configuration because Codex does not forward it by default, and MATLAB and Simulink require it.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMATLAB MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/matlab-mcp-server?style=directory)](https://allmcps.com/mcp/matlab-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/matlab-mcp-server"><img src="https://allmcps.com/api/badge/matlab-mcp-server?style=directory" alt="MATLAB MCP Server on AllMCPs" /></a>