MCP Catalogs
Home

matlab-mcp-tools

by neuromechanist·18·Score 43

MCP server for MATLAB development with script execution, workspace management and figure analysis tools.

developer-toolsai-llmproductivity
6
Forks
3
Open issues
3 mo ago
Last commit
2d ago
Indexed

Overview

This MCP server enables interaction with MATLAB through a comprehensive set of tools. It allows executing MATLAB scripts or sections, managing workspace variables, and analyzing figures. The server supports various execution modes (complete scripts, sections by index/title/line range) and provides workspace introspection capabilities. It can extract plot data, generate analysis prompts, and prepare figures for LLM-based analysis. The implementation includes automatic installation and configuration support for Claude Code and Cursor.

Try asking AI

After installing, here are 7 things you can ask your AI assistant:

you:Interactive MATLAB development using LLM assistants with context preservation between script executions
you:Analysis of MATLAB-generated figures and plots by extracting metadata and raw data
you:Remote MATLAB execution without direct interface access through MCP-compatible clients
you:Code quality checking with integrated MATLAB linting
you:What MATLAB versions are supported?
you:How can I execute specific sections of a MATLAB script?
you:Can I retrieve plot data programmatically?

When to choose this

Choose this MCP server if you work with MATLAB regularly and want to integrate it into AI coding assistants like Claude Code or Cursor, particularly if you need to execute scripts section by section or analyze MATLAB figures programmatically.

When NOT to choose this

Avoid this if you don't have a licensed MATLAB installation or need to execute code in a restricted environment (MATLAB Python engine has specific requirements and dependencies).

Tools this server exposes

12 tools extracted from the README
  • execute_script

    Run MATLAB code or script file

  • execute_section

    Execute MATLAB script by line range

  • execute_section_by_index

    Execute MATLAB script by section index (0-based)

  • execute_section_by_title

    Execute MATLAB script by section title (partial match)

  • get_script_sections

    List MATLAB script sections with titles and previews

  • create_matlab_script

    Create a new MATLAB .m file

  • get_workspace

    Get all MATLAB workspace variables

  • get_variable

    Get specific MATLAB variable with field/depth/size control

  • get_figure_metadata

    Extract axes, labels, legends, subplot info from figure

  • get_plot_data

    Get raw x/y/z data from MATLAB plot lines

  • analyze_figure

    Prepare MATLAB figure image + metadata for LLM analysis

  • matlab_lint

    Run checkcode on MATLAB code or files

Comparable tools

octave-mcppython-shell-mcpmatlab-online-api

Installation

Installation

Quick Start (Recommended)

./install-matlab-mcp.sh

Manual Installation

  1. Clone the repository:
git clone [repository-url]
cd matlab-mcp-tools
  1. Set MATLAB path if needed:
export MATLAB_PATH=/path/to/matlab/installation
  1. Install dependencies:
./scripts/setup-matlab-mcp.sh

Configuration for Claude Desktop

Add to .mcp.json:

{
  "mcpServers": {
    "matlab": {
      "command": "/path/to/matlab-mcp-tools/.venv/bin/matlab-mcp-server",
      "env": {
        "MATLAB_PATH": "/Applications/MATLAB_R2024b.app"
      }
    }
  }
}

FAQ

What MATLAB versions are supported?
The server supports MATLAB R2023x and later versions. Python version is automatically matched to your MATLAB version (e.g., MATLAB R2024b uses Python 3.11).
How can I execute specific sections of a MATLAB script?
Use the `execute_section_by_index` tool to execute sections by their 0-based index, or `execute_section_by_title` with partial title matching. You can also use `execute_section` to specify a line range.
Can I retrieve plot data programmatically?
Yes, use the `get_plot_data` tool to extract raw x/y/z data from plot lines, or `get_figure_metadata` to get axes information, labels, and legends.

Compare matlab-mcp-tools with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.