matlab-mcp-core-server

Execute MATLAB code, analyze scripts, and manage MATLAB sessions from AI applications.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill matlab-mcp-core-server-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: matlab-mcp-core-server
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/matlab-mcp-core-server
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill matlab-mcp-core-server-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running MATLAB code from an AI assistant normally requires manual copy-pasting between the chat and the MATLAB environment. This Skill connects AI applications to the official MathWorks MCP server so code execution, static analysis, and session management happen directly in the conversation. ## Core Features & Use Cases - Code Execution: Run MATLAB code strings or entire .m script files and return output to the AI assistant. - Static Code Analysis: Check MATLAB scripts for style issues, unused variables, and deprecated functions without executing them. - Session & Environment Management: Detect installed toolboxes and versions, connect to existing MATLAB sessions, or start new ones in desktop or headless mode. - Use Case: Ask your AI assistant to load sensor data from a CSV, fit a polynomial model, compute R-squared, and save the resulting plot as a PNG, all executed in MATLAB without leaving the chat. ## Quick Start Install the server binary, register it with your AI client using the stdio transport, then ask the assistant to run a MATLAB command such as computing the mean of a vector.

Frequently Asked Questions about matlab-mcp-core-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run MATLAB code from an AI assistant?▼

Install the matlab-mcp-core-server binary and register it with your AI client via stdio transport, for example with claude mcp add. The evaluate_matlab_code tool then executes MATLAB code strings and returns the output to the conversation.

How to check MATLAB code for errors without running it?▼

Use the check_matlab_code tool with the absolute path to a .m file. It performs static analysis and reports issues such as unused variables, deprecated functions, missing semicolons, and performance suggestions like array preallocation.

What MATLAB version is required for the MCP server?▼

The server requires MATLAB R2021a or later installed and available on the system PATH. Connecting to an existing shared MATLAB session requires R2023a or later, plus running shareMATLABSession() inside that session.

Can I connect the MCP server to an already running MATLAB session?▼

Yes. Run the server once with --setup-matlab, call shareMATLABSession() in the running MATLAB instance, then start the server with --matlab-session-mode=existing. Only one session can be shared at a time.

Why do MATLAB plots not appear in nodesktop mode?▼

Headless nodesktop mode has no display, so figures are not rendered on screen. Save plots to files with saveas(gcf, 'output.png') or switch to desktop display mode using --matlab-display-mode=desktop.

Why does the MATLAB MCP server fail to find my MATLAB installation?▼

The server fails when MATLAB is not on the system PATH. Fix it by passing --matlab-root pointing to your installation directory, or by adding the MATLAB bin folder to PATH before starting the server.