Matlab MCP Server

This Model Context Protocol (MCP) server provides integration with MATLAB, allowing you to create and execute MATLAB scripts and functions through

Local serverstdioPython

What is the Matlab MCP MCP server?

Matlab mcp mcp server lets Claude, Cursor and other MCP clients work with Matlab MCP directly. This Model Context Protocol (MCP) server provides integration with MATLAB, allowing you to create and execute MATLAB scripts and functions through Claude or other MCP clients.

What Matlab MCP does

This Model Context Protocol (MCP) server provides integration with MATLAB, allowing you to create and execute MATLAB scripts and functions through Claude or other MCP clients.

Key capabilities

  • Scripts are saved in the matlab_scripts directory
  • File names must be valid MATLAB identifiers
  • Functions are saved in the matlab_scripts directory
  • Must include valid function definition
  • Returns output text, generated figures, and workspace variables
  • Can pass arguments to scripts
  • Returns function output and any generated figures

Tools it exposes

Once connected, the assistant can call these 4 tools directly:

  • matlab_server.py — The main MCP server implementation
  • pyproject.toml — Python project configuration
  • MATLAB_PATH — Path to your MATLAB installation
  • Default — /Applications/MATLAB_R2024a.app

Installing the matlab mcp mcp server

Setup follows the standard MCP pattern: clone or install the server, then register it in your client's configuration file and restart the client. The configuration snippets on this page cover Claude Desktop, Claude Code and Cursor.

Configuration

The server reads one environment variable: MATLAB_PATH. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

File and storage servers are what separate an assistant that talks about your documents from one that actually works with them. Matlab MCP sits in that group, and the shape of its toolset — matlab_server.py, pyproject.toml, MATLAB_PATH among others — tells you what it is really for. Worth comparing against the other file systems servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • Maintained by Tsuchijo, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the matlab mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
matlab_server.pyThe main MCP server implementation
pyproject.tomlPython project configuration
MATLAB_PATHPath to your MATLAB installation
Default/Applications/MATLAB_R2024a.app

Configuration

VariableDescriptionRequired
MATLAB_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Matlab MCP to matlab server.py.
  • Use Matlab MCP to pyproject.toml.
  • Use Matlab MCP to MATLAB PATH.

Frequently asked questions

It connects Matlab MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (matlab_server.py, pyproject.toml, MATLAB_PATH, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Matlab MCP directly.