matlab-mcp

matlab-mcp

3.4

If you are the rightful owner of matlab-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

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.

The MATLAB MCP Server is designed to facilitate seamless integration between MATLAB and various MCP clients, such as Claude. It allows users to create, execute, and manage MATLAB scripts and functions directly from the MCP environment. The server requires Python 3.11 and MATLAB R2024a, and it uses the uv package manager for setup and installation. The server's main implementation is in `matlab_server.py`, and it automatically manages MATLAB scripts and functions in a designated directory. Users can configure the server to work with Claude Desktop by specifying the MATLAB path and server command in the configuration file. The server supports creating and executing MATLAB scripts and functions, returning outputs, figures, and workspace variables. It also provides troubleshooting tips for common issues like MATLAB Engine installation failures and Python version mismatches.

Features

  • create_matlab_script: Create a new MATLAB script file, saved in the `matlab_scripts` directory with valid MATLAB identifiers.
  • create_matlab_function: Create a new MATLAB function file, saved in the `matlab_scripts` directory with a valid function definition.
  • execute_matlab_script: Run a MATLAB script and get results, including output text, generated figures, and workspace variables.
  • call_matlab_function: Call a MATLAB function with arguments, returning function output and any generated figures.