MATLAB MCP Server
Connect MCP-compatible AI applications to MATLAB for code execution, script analysis, and testing.
- Source repo
- matlab/matlab-mcp-server
- Stars
- ★ 1.9k
- Last updated
- 8d ago v0.16.2
- FARS reviewed
- Nov 07, 2026 +2 new
- License
- NOASSERTION
- Primary language
- Go
- FA score
- 51/100 · Major gaps
At a glance
- How it runs
- 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
- 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
- Source review
- 51/100 · Major gaps 1 safety controls not found
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.
- A MATLAB developer using Claude Code or Codex who wants an assistant to execute code inside a specific local project and inspect the output.
- A team maintaining .m files that needs read-only checks for style problems, potential errors, deprecated functions, performance issues, and best-practice violations.
- 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.
- A MATLAB R2023a-or-newer user who wants the server to reuse an already running session shared with shareMATLABSession().
- A team that wants its AI client to consume MATLAB coding standards or guidance for version-controlled plain-text Live Code files.
- 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@latestFor 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-serverFor 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-serverClaude Code:
claude mcp add --transport stdio matlab -- /fullpath/to/matlab-mcp-server-binaryCodex:
codex mcp add matlab -- /fullpath/to/matlab-mcp-server-binaryFor 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)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
FARS trust-control audit
- 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?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
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 ↗ -
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 ↗ -
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?
Will code analysis modify or execute my script?
Can it connect to MATLAB that is already running?
Does the server collect telemetry?
Can one centralized server be shared by a team?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.