MATLAB MCP Server

Connect MCP-compatible AI applications to MATLAB for code execution, script analysis, and testing.

Stars
★ 1.9k
Last updated
8d ago v0.16.2
FARS reviewed
Nov 07, 2026 +2 new
License
NOASSERTION
Primary language
Go

At a glance

How it runs
MCP serverCLI
Works with
Universal · cross-platformClaude Code · Claude.aiCodex (Partial support)
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
MATLAB R2021a or laterAn MCP-compatible AI applicationGo when building from sourceShell / CLINetwork accessLocal filesystemMCP Server
Typical use
A MATLAB developer using Claude Code or Codex who wants an assistant to execute code inside a specific local project and inspect the output.
Not a fit if
  • Users without a local MATLAB R2021a-or-later installation
  • Teams needing shared or centralized multi-user server use
  • Teams that require fully offline operation with no anonymized telemetry
Website
mathworks.com ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-24latest release v0.16.2 (2026-11-26)+5.0 ★/day over 7 days

What does this agent do, and when should you use it?

MATLAB MCP Server is the official MathWorks MCP server for connecting compatible AI applications to a local MATLAB installation. It runs as a standalone binary over stdio and includes documented setup paths for Claude Code, Claude Desktop, GitHub Copilot in Visual Studio Code, and Codex. Its tools can start or quit MATLAB, evaluate code strings, execute .m files, run MATLAB unit tests, and perform read-only static analysis. The server also exposes MCP resources for MATLAB coding standards and plain-text Live Code, while JSON extension files can add custom tools. Execution remains within the user's machine and MATLAB environment, so adoption requires a supported MATLAB installation and careful review of calls that run code.

An AI application launches matlab-mcp-server over stdio, after which the server either starts MATLAB or, with MATLAB R2023a and later, connects to an existing session shared through shareMATLABSession(). detect_matlab_toolboxes reports installed MATLAB and toolbox versions. check_matlab_code reads an absolute .m script_path and returns style, potential-error, deprecated-function, performance, and best-practice findings without executing or modifying the file. evaluate_matlab_code runs a code string with project_path as MATLAB's working folder, run_matlab_file executes a script, and run_matlab_test_file executes a MATLAB unit-test file and returns comprehensive results. The server publishes guidelines://coding and guidelines://plain-text-live-code resources and can load custom MCP tools from one or more JSON files supplied with --extension-file. CLI flags or MW_MCP_SERVER_* environment variables control the MATLAB location, session and display modes, initial folder, logging, startup initialization, and telemetry.

  1. A MATLAB developer using Claude Code or Codex who wants an assistant to execute code inside a specific local project and inspect the output.
  2. A team maintaining .m files that needs read-only checks for style problems, potential errors, deprecated functions, performance issues, and best-practice violations.
  3. A developer using the MATLAB testing framework who wants an AI client to run a test file through run_matlab_test_file and receive comprehensive results.
  4. A MATLAB R2023a-or-newer user who wants the server to reuse an already running session shared with shareMATLABSession().
  5. A team that wants its AI client to consume MATLAB coding standards or guidance for version-controlled plain-text Live Code files.
  6. An organization with specialized MATLAB workflows that can express additional MCP tools in one or more extension-file JSON definitions.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • go install github.com/matlab/matlab-mcp-server/cmd/matlab-mcp-server@latest
Config files
.vscode/mcp.json
Install notes cover
Windows · macOS · Linux

How do you install or deploy this agent?

Prerequisites: install MATLAB R2021a or later and add it to the system PATH. The server supports MATLAB releases from the past five years. On Windows or Linux, download the binary from the repository's Latest Release. Alternatively, install Go and build it with:

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

For Apple silicon macOS:

curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-arm64
chmod +x ~/Downloads/matlab-mcp-server

For Intel macOS:

curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-x64
chmod +x ~/Downloads/matlab-mcp-server

Claude Code:

claude mcp add --transport stdio matlab -- /fullpath/to/matlab-mcp-server-binary

Codex:

codex mcp add matlab -- /fullpath/to/matlab-mcp-server-binary

For Claude Desktop, first install and enable Anthropic's Filesystem extension and authorize the required folders. Then download matlab-mcp-server.mcpb from Latest Release, open it, and install the extension in Claude Desktop. For GitHub Copilot in VS Code, create .vscode/mcp.json with a matlab server whose type is stdio and whose command is the full path to the downloaded binary.

How do you use this agent?

After registering the server, call detect_matlab_toolboxes to confirm that MATLAB and its toolboxes are visible. For static analysis, call check_matlab_code with the absolute script_path of a valid .m file. To evaluate a code string, call evaluate_matlab_code with code and an absolute project_path; use run_matlab_file or run_matlab_test_file with an absolute script_path to execute a script or test file. MATLAB starts on the first tool call by default; add --initialize-matlab-on-startup=true to start it with the server. To reuse a running MATLAB session, first run ./matlab-mcp-server --setup-matlab to install MATLAB MCP Server Toolbox, execute shareMATLABSession() in MATLAB, and launch the server with --matlab-session-mode=existing or auto. Options such as --initial-working-folder, --matlab-display-mode, --matlab-root, --log-level, and --disable-telemetry=true customize operation; CLI flags override corresponding MW_MCP_SERVER_* environment variables.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

FARS trust-control audit

Not found in source — apply before daily use
  • rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.

What are this agent's strengths and limitations?

Pros
  • It is provided by MathWorks and directly covers MATLAB lifecycle control, execution, static analysis, and unit testing.
  • Its local stdio MCP interface has explicit setup instructions for Claude Code, Claude Desktop, GitHub Copilot in VS Code, and Codex.
  • The new, auto, and existing session modes offer a choice between isolated MATLAB startup and reuse of a shared R2023a-or-later session.
  • check_matlab_code is explicitly read-only and identifies several classes of code-quality issue without running the script.
  • Multiple extension-file JSON definitions can add custom tools, and two built-in resources supply MATLAB-specific coding guidance.
Limitations
  • Core operation requires a local MATLAB R2021a-or-later installation and remains subject to the MathWorks Software License Agreement.
  • The server may not be shared by multiple users; shared or centralized use requires contacting MathWorks.
  • Execution tools can run code in the local MATLAB environment, so important calls require human review and validation.
  • Anonymized telemetry is enabled by default and must be explicitly disabled with --disable-telemetry=true.
  • Codex on Windows does not forward the WINDIR variable required by MATLAB and Simulink, requiring an env_vars = ["WINDIR"] config.toml workaround.
  • The repository metadata reports NOASSERTION for the license, while the supplied material only points to LICENSE.md and does not name its license.

How does this agent compare with similar options?

Compared with using the MATLAB Agentic Toolkit or Simulink Agentic Toolkit to assist an agent with MATLAB or Simulink, this repository supplies the underlying official MCP server; those toolkits can also install it and contribute skills. Within the server itself, new mode always starts MATLAB, while existing mode connects to a prepared shared session and auto mode tries the shared session before starting a new one.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
MATLAB MCP Server This agent 51 · Major gaps MCP serverFree ★ 1.9k 8d ago Go Claude Code · Claude.ai
Jev Review 62 · Some gaps Agent plugin / skillFree + model costs ★ 260 2mo ago TypeScript Codex · Claude Code
gptme Terminal Agent 67 · Some gaps CLIFree + model costs ★ 4.5k today Python OpenAI API · Claude API
Pi MCP Context Adapter 69 · Some gaps Agent plugin / skillFree ★ 1.7k 12d ago TypeScript —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
51/ 100 5-point scale 2.6 / 5
This review covers the source as of Nov 07, 2026. The project has shipped 2 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 11/29
Reliability 6/14
Adaptability 12/18
Convention 11/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

The README describes starting and quitting MATLAB, executing arbitrary code and scripts, and inspecting installed toolboxes, so the server has broad capabilities. It advises human review but does not show per-call confirmation; least privilege and confirmation are only partially supported. Data collection is explicitly described as anonymized telemetry enabled by default with an opt-out, and working-directory settings are documented, but sensitive-data safeguards are thin. go.mod pins dependency versions, while the packet shows no vulnerability review or supply-chain controls. MATLAB execution can have external effects, and the README advises review; no rollback or recovery mechanism is shown. The README, license, and security contact provide attribution and a reporting path.

Reliability6 / 14 · 2.1/5

The README gives reasonably consistent descriptions of tools, arguments, and session modes for ordinary use. The packet does not establish dependency availability or explain failure cases in depth, so those scores are limited. Lack of executed runs or tests was not treated as a deduction.

Adaptability12 / 18 · 3.3/5

The README targets users connecting MATLAB to AI applications and names Claude Code, Claude Desktop, VS Code, and Codex. It documents MCP clients, MATLAB version requirements, session modes, and GUI-related limits. The MATLAB coding and analysis scope is clear, but broader audience or scenario guidance is limited.

Convention11 / 18 · 3.1/5

The README organizes setup, arguments, tools, resources, security, licensing, and support, with multi-client installation steps and configuration examples. It documents operating constraints and support channels. The license text is present and restricts use to MathWorks products and services. Tool and argument names are presented consistently. The packet does not show detailed release history, limiting versioning and changelog evidence.

Effectiveness7 / 13 · 2.7/5

The tools offer direct coding value by executing and checking MATLAB code and reporting installed toolboxes. The packet gives limited evidence about result formats or realized time savings, and using the server requires MATLAB and MCP client configuration, so cost-benefit is only partly established.

Verifiability4 / 8 · 2.5/5

The README makes specific claims about functions, configuration, telemetry, and limitations; the license, security contact, and go.mod provide some corroboration. The sample contains mostly documentation and a few build entry points, so source-level corroboration of product behavior is limited. Documentation generally separates usage facts from recommendations. This review is based only on static material and makes no claim of execution or independent testing.

Risks and how to mitigate them
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • Arbitrary MATLAB code and script execution may modify files or cause other side effects; review AI tool calls before use. Telemetry is enabled by default and can be disabled with disable-telemetry.
  • The packet does not show runtime implementation, recovery mechanisms, or dependency security review, so their behavior cannot be confirmed from this evidence.
Evidence confidence: Low Reviewed Nov 07, 2026 Reviewed revision 3c06d3ec0d69 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/matlab-mcp-server.svg)](https://followagents.com/en/agents/matlab-mcp-server)
<a href="https://followagents.com/en/agents/matlab-mcp-server"><img src="https://followagents.com/badge/matlab-mcp-server.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.16.2
    Release notes excerpt
    Bug Fixes - Update dependencies to address known security vulnerabilities (CVEs). We encourage you to try this repository and provide feedback. If you encounter a technical issue or have an enhancement request, create an [issue (GitHub)](https://github.com/matlab/matlab-mcp-server/issues) or contact [technical support (MathWorks)](https://www.mathworks.com/support/contact_us.html)
    View on GitHub ↗
  2. v0.16.1
    Release notes excerpt
    Enhancements - Updated localized documentation (Chinese, Japanese, Korean, Spanish) for the v0.16.0 README changes. Bug Fixes - Update dependencies to address known security vulnerabilities (CVEs). We encourage you to try this repository and provide feedback. If you encounter a technical issue or have an enhancement request, create an [issue (GitHub)](https://github.com/matlab/matlab-mcp-server/issues) or contact [technical support (MathWorks)](https://www.mathworks.com/support/contact_us.html)
    View on GitHub ↗
  3. v0.16.0
    Release notes excerpt
    Enhancements - Improved support for input prompts and the MATLAB debugger in desktop mode. - In nodesktop mode, MATLAB errors from evaluate_matlab_code, run_matlab_file and run_matlab_test_file are now returned as tool errors (isError), with the error identifier. - Updated README to recommend the [Agentic Toolkit Installer (GitHub)](https://github.com/matlab/agentic-toolkit-installer) for installing the MATLAB MCP Server in Claude Code, GitHub Copilot CLI, and OpenAI Codex. …
    View on GitHub ↗

FAQ

Do I need MATLAB installed?
Yes. MATLAB R2021a or later must be installed and normally available on PATH, although --matlab-root can select a specific installation. The server supports releases from the past five years.
Will code analysis modify or execute my script?
No. check_matlab_code is documented as a non-destructive, read-only operation. The evaluate_matlab_code, run_matlab_file, and run_matlab_test_file tools do execute code.
Can it connect to MATLAB that is already running?
Yes, with MATLAB R2023a or later. Install MATLAB MCP Server Toolbox using --setup-matlab, call shareMATLABSession() in the desired session, and select existing or auto mode.
Does the server collect telemetry?
Anonymized usage collection is enabled by default. Set --disable-telemetry=true, or its corresponding environment variable, to opt out.
Can one centralized server be shared by a team?
Not under the stated usage restriction. MCP servers may only be used with MATLAB under the MathWorks Software License Agreement and must not be shared by multiple users; MathWorks asks customers to contact it about shared or centralized use.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts