MATLAB MCP Tools

v1.0.0Data Science & MLstable

An MCP to develop MATLAB pipelines section by section and read figures one dimension at a time

agentic-workflowmatlabmodel-context-protocolscientific-visualization
Share:
18
Stars
0
Downloads
0
Weekly
0/5

What is MATLAB MCP Tools?

MATLAB MCP Tools is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp to develop matlab pipelines section by section and read figures one dimension at a time

An MCP to develop MATLAB pipelines section by section and read figures one dimension at a time

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP to develop MATLAB pipelines section by section and re

Use Cases

Develop MATLAB pipelines section by section with MCP integration. Read and analyze figures and visualizations. Build scientific workflows with AI assistance.
neuromechanist

Maintainer

LicenseBSD-3-Clause
Languagepython
Versionv1.0.0
UpdatedApr 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx matlab-mcp-tools

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MATLAB MCP Tools

MATLAB MCP Tools bridges MATLAB and AI coding assistants by exposing 15 tools that let agents execute scripts section-by-section, inspect workspace variables, extract plot data, and lint MATLAB code — all without leaving the AI chat interface. It leverages the official MATLAB Python Engine so that each call runs inside a live MATLAB session, preserving workspace state across tool calls. Researchers and engineers who need AI assistance writing and debugging MATLAB pipelines can use this server to iterate on individual code sections and read figure data one dimension at a time.

Prerequisites

  • Python 3.10 or newer
  • MATLAB R2023b or later with the MATLAB Engine for Python installed
  • uv package manager (https://github.com/astral-sh/uv)
  • An MCP-compatible AI client such as Claude Desktop or Claude Code
1

Clone the repository

Download the source code from GitHub so the installer script is available locally.

git clone https://github.com/neuromechanist/matlab-mcp-tools.git
cd matlab-mcp-tools
2

Run the automated installer

The install script detects your MATLAB installation, creates a Python virtual environment with uv, installs the MATLAB Python Engine and all dependencies, and generates an mcp-pip.json config file ready for your client.

./install-matlab-mcp.sh
3

(Optional) Set MATLAB_PATH manually

If the installer does not auto-detect your MATLAB installation, set the MATLAB_PATH environment variable to the MATLAB application bundle or executable directory before re-running the installer.

export MATLAB_PATH="/Applications/MATLAB_R2024b.app"
./install-matlab-mcp.sh
4

Verify the server starts correctly

Run the test script to confirm that MATLAB launches, the MCP server initialises, and all 15 tools are registered.

./scripts/test-matlab-mcp.sh
5

Add the server to your MCP client

Copy the generated configuration into your client's MCP settings. The command points to the virtual-environment binary created by the installer.

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

MATLAB MCP Tools Examples

Client configuration

Example .mcp.json entry for Claude Code pointing to the installed virtual-environment binary.

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

Prompts to try

Example prompts once the MATLAB MCP server is connected to your AI client.

- "Run the first section of my script analysis.m and show me the workspace variables"
- "Execute the section titled 'Preprocessing' in pipeline.m and return any figures generated"
- "Get the plot data from figure 1 and describe the trend you see"
- "Lint my script signal_filter.m and list all warnings with severity level 2 or higher"
- "Show me all variables in the MATLAB workspace and their sizes"

Troubleshooting MATLAB MCP Tools

Installer fails with 'MATLAB not found'

Set the MATLAB_PATH environment variable to the full path of your MATLAB application directory (e.g., /Applications/MATLAB_R2024b.app on macOS or C:\Program Files\MATLAB\R2024b on Windows) before running install-matlab-mcp.sh.

MATLAB Engine import error when starting the server

The MATLAB Python Engine must be installed inside the same virtual environment used by the server. Inside your MATLAB installation run 'cd (fullfile(matlabroot,"extern","engines","python")); system("python setup.py install")' or follow MathWorks documentation for your MATLAB version.

Tools return stale results after modifying a script

The workspace persists across calls within a single server session. Use the get_workspace tool to inspect current state, or call execute_script to re-run the full script and reset variables before querying individual sections.

Frequently Asked Questions about MATLAB MCP Tools

What is MATLAB MCP Tools?

MATLAB MCP Tools is a Model Context Protocol (MCP) server that mcp to develop matlab pipelines section by section and read figures one dimension at a time It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MATLAB MCP Tools?

Follow the installation instructions on the MATLAB MCP Tools GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MATLAB MCP Tools?

MATLAB MCP Tools works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MATLAB MCP Tools free to use?

Yes, MATLAB MCP Tools is open source and available under the BSD-3-Clause license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "matlab-mcp-tools": { "command": "npx", "args": ["-y", "matlab-mcp-tools"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MATLAB MCP Tools?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides