matlab-mcp-server
Run MATLAB® using AI applications with the official MATLAB MCP Server from MathWorks®. This MCP server for MATLAB supports a wide range of coding agents like Claude Code® and Visual Studio® Code.
Install / Use
claude mcp add matlab -- npx -y github:matlab/matlab-mcp-serverIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Customer SupportSupported Platforms
Tags
Our assessment of matlab-mcp-server
matlab-mcp-server scores 94/100 on our quality scale, 68th of 326 Customer Support skills we index (top 21%).
Its MCP Server is 17 KB long, well organised into 14 sections with 6 code examples: a thorough specification that gives an agent plenty to work with.
With 1,782 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 7 days ago, so matlab-mcp-server is actively maintained.
- Our last check on 2026-10-21 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
matlab-mcp-server compared with similar skills
All 4 of these similar skills score higher than matlab-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| matlab-mcp-server (this skill)by matlab | 94 | 1.8k | 7d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 109.5k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.0k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 98.7k | today | MCP Server |
Frequently asked questions
- How do I install matlab-mcp-server?
- Run
claude mcp add matlab -- npx -y github:matlab/matlab-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does matlab-mcp-server work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is matlab-mcp-server safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is matlab-mcp-server still maintained?
- The repository was last updated 7 days ago, so matlab-mcp-server is actively maintained.
Skill content
View source on GitHubMATLAB MCP Server
<p align="center"> English • <a href="l10n/README.es.md">Español</a> • <a href="l10n/README.ja.md">日本語</a> • <a href="l10n/README.ko.md">한국어</a> • <a href="l10n/README.zh-cn.md">简体中文</a> </p>Run MATLAB® using AI applications with the official MATLAB MCP Server from MathWorks®. The MATLAB MCP Server allows your AI applications to:
- Start and quit MATLAB.
- Write and run MATLAB code.
- Assess your MATLAB code for style and correctness.
To assist your agent in using MATLAB and Simulink, you can use skills from MATLAB Agentic Toolkit (GitHub) and Simulink Agentic Toolkit (GitHub), which can also install this MCP server for you.
Table of Contents
- Setup
- Arguments
- Tools
- Resources
- Data Collection
- Security Considerations
- Licensing and Usage
- Contact Support
Setup
-
Install MATLAB (MathWorks) R2021a or later and add it to the system PATH.
-
The server supports any AI application that uses Model Context Protocol. To set up the MATLAB MCP Server for Claude Desktop, skip to the instructions for Claude Desktop. To set up the server for other applications, follow these instructions:
-
For Windows or Linux, Download the Latest Release. (Alternatively, you can build from source: install Go and build the binary using
go install github.com/matlab/matlab-mcp-server/cmd/matlab-mcp-server@latest). -
For macOS, first download the latest release by running the following command in your terminal:
- For Apple silicon processors, run:
curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-arm64 - For Intel processors, run:
curl -L -o ~/Downloads/matlab-mcp-server https://github.com/matlab/matlab-mcp-server/releases/latest/download/matlab-mcp-server-macos-x64
Then grant executable permissions to the downloaded binary so you can run the MATLAB MCP Server:
chmod +x ~/Downloads/matlab-mcp-server - For Apple silicon processors, run:
-
-
Add the MATLAB MCP Server to your AI application. You can find instructions for adding MCP servers in the documentation of your AI application. For example instructions on using Claude Code®, Claude Desktop®, and GitHub Copilot in Visual Studio® Code, see below. Note that you can customize the server by specifying optional Arguments.
Claude Code
In your terminal, run the following, remembering to insert the full path to the server binary you acquired in the setup:
claude mcp add --transport stdio matlab -- /fullpath/to/matlab-mcp-server-binary
You can customize the server by specifying optional Arguments. Note the -- separator between Claude Code's options and the server arguments:
claude mcp add --transport stdio matlab -- /fullpath/to/matlab-mcp-server-binary --initial-working-folder=/home/username/myproject
For details on adding MCP servers in Claude Code, see Add a local stdio server (Claude Code). To remove the server later, run:
claude mcp remove matlab
Claude Desktop
You install the MATLAB MCP Server in Claude Desktop using the MATLAB MCP Server bundle.
-
Install the Filesystem extension in Claude Desktop to allow Claude to read and write files on your system. In Claude Desktop, click Settings > Extensions > Browse extensions. Search for the Filesystem extension developed by Anthropic and click Install. Specify the folders you want to allow the MCP server to access, then toggle the Disabled button to Enable the Filesystem extension.
-
Download the MATLAB MCP Server bundle
matlab-mcp-server.mcpbfrom the Latest Release page. -
To install the MATLAB MCP Server bundle as a desktop extension, double click the downloaded
matlab-mcp-server.mcpbfile and click Install in Claude Desktop. (Alternatively, navigate in Claude to File menu > Settings > Extensions > Advanced Settings > Install Extension and select thematlab-mcp-server.mcpbfile. Click Install).
To customize the behaviour of the MATLAB MCP Server, navigate to Settings > Extensions > Configure, where you can modify the server's Arguments.
GitHub Copilot in Visual Studio Code
In your VS Code workspace, create a file named .vscode/mcp.json. Insert the following JSON, remembering to specify the full path to the server binary you acquired in the setup, as well as any Arguments. Then save the file. (Note that on Windows, your paths require extra slashes as escape characters).
{
"servers": {
"matlab": {
"type": "stdio",
"command": "C:\\fullpath\\to\\matlab-mcp-server-windows-x64.exe",
"args": []
}
}
}
For more information about using MCP servers in VS Code, see Add and Manage MCP servers in VS Code (VS Code).
Codex
In your terminal, run the following, remembering to insert the full path to the server binary you acquired in the setup:
codex mcp add matlab -- /fullpath/to/matlab-mcp-server-binary
You can customize the server by specifying optional Arguments. For example:
codex mcp add matlab -- /fullpath/to/matlab-mcp-server-binary --initial-working-folder=/home/username/myproject
[!NOTE] Windows users: Codex does not forward the
WINDIRenvironment variable, which you need to run MATLAB and Simulink (see #32).To add the variable, open your Codex config file at
C:\Users\<username>\.codex\config.toml, and addenv_vars = ["WINDIR"]to the[mcp_servers.matlab]section:[mcp_servers.matlab] command = 'C:\fullpath\to\matlab-mcp-server-windows-x64.exe' args = [] env_vars = ["WINDIR"]
Arguments
Customize the behavior of the server by specifying arguments in one of these ways:
- Insert the arguments in the configuration settings of your AI application (usually a
.jsonfile). - Enter the arguments as command-line interface (CLI) flags when you start the server.
- Use environment variables, specified either in your CLI or application's configuration settings. To derive the environment variable name from a CLI flag, add the prefix
MW_MCP_SERVER_, convert to uppercase, and replace hyphens (-) with underscores (_). For example, the argument--matlab-rootbecomes the environment variableMW_MCP_SERVER_MATLAB_ROOT. CLI flags take precedence over environment variables, if you use both.
| Argument | Description | Example |
| ------------- | ------------- | ------------- |
| help | Displays help information for all arguments. | --help |
| version | Displays the version of the MATLAB MCP Server. | --version |
| matlab-root | Full path specifying which MATLAB to start. Do not include /bin in the path. By default, the server tries to find the first MATLAB on the system PATH. | Windows: --matlab-root=C:\\Program Files\\MATLAB\\R2026a <br><br> Linux/macOS: --matlab-root=/home/usr/MATLAB/R2026a<br><br>As an environment variable: MW_MCP_SERVER_MATLAB_ROOT=/home/usr/MATLAB/R2026a |
| initialize-matlab-on-startup | To initialize MATLAB as soon as you start the server, set this argument to true. By default, MATLAB only starts when the first tool is called. | --initialize-matlab-on-startup=true |
| initial-working-folder | Specify the folder where MATLAB starts. If you do not specify a value, MATLAB starts at the path of your AI application's first Root (MCP). If you have not defined a root, MATLAB starts in these locations: <br> <ul><li>Linux: /home/username </li><li> Windows: C:\Users\username\Documents</li><li>Mac: /Users/username/Documents</li></ul> | Windows: --initial-working-folder=C:\\Users\\username\\MyProject <br><br> Linux/macOS: --initial-working-folder=/Users/username/MyProject |
| matlab-display-mode | Specify whether to show the MATLAB desktop. Use desktop mode (default) to show the MATLAB desktop. Use nodesktop mode to use MATLAB only from your AI application, without the MATLAB desktop. Note that in nodesktop mode, commands requiring a graphical interface (such as edit, open, open_system, uifigure, and appdesigner) will still open MATLAB windows on your desktop. | --matlab-display-mode=nodesktop |
| matlab-session-mode | Specify whether the MCP server starts a new MATLAB or connects to an existing MATLAB session (supported for MATLAB R2023a onwards). The default is auto mode.<br><br> new mode: The MCP server starts a new MATLAB session. <br><br>auto mode (default): The server tries to connect to an existing MATLAB session, which you must have configured for existing mode using the instructions below. If the server is unable to find an existing MATLAB session, it starts a new one. <br><br>existing mode: The server tries to connect to an existing MATLAB session. Do not use this mode in conjunction with the arguments matlab-root, initial-working-folder, or matlab-display-mode. You must have configured your MATLAB session beforehand to use this mode, with these steps:<br><br><ol><li>If you are using existing mode for the first time, run ./matlab-mcp-server --setup-matlab.<br><br>This command installs an add-on named MATLAB MCP Server Toolbox in MATLAB. You can customize the command with other arguments from this table. For example, to specify which MATLAB to use to install the toolbox, you can use ./matlab-mcp-server --setup-matlab --matlab-root=/home/usr/MATLAB/R2026a.<br><br>For Claude Desktop, you must download the MATLAB MCP Server binary using the instructions in Setup before you run ./matlab-mcp-server --setup-matlab.<br><br></li><li>In the command window of a running MATLAB session, run shareMATLABSession(). The MCP server will connect to this MATLAB when you start the server with --matlab-session-mode=existing or --matlab-session-mode=auto. If you are running multiple MATLAB sessions, the server connects to the MATLAB session where you most recently ran the command shareMATLABSession().<br><br>As an alternative to running shareMATLABSession() manually, you can add the command to your MATLAB Startup Script (MathWorks).</li></ol> | --matlab-session-mode=existing |
| extension-file | To use custom MCP tools, provide a path to a JSON file that defines your tools. You can also use multiple extension files. For details on using custom tools, see Use Custom Tools with the MATLAB MCP Server. | <br><br>Windows: --extension-file=C:\\Users\\name\\my-tools.json <br><br> Linux/macOS: --extension-file=/path/to/my-tools.json <br><br> Using multiple extension files:<br><br>Windows:--extension-file=C:\\path\\to\\tools-1.json --extension-file=C:\\path\\to\\tools-2.json<br><br>Linux/macOS:--extension-file=/path/to/tools1.json --extension-file=/path/to/tools2.json <br><br> Using environment variables: <br><br> Windows: `MW_MCP_SER
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
109.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
79.0kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.8kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
98.7k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
