MATLAB

v1.0.0Developer Toolsstable

Run MATLAB® using AI applications with the official MATLAB MCP Server from MathWorks®. This MCP server for MATLAB supports a wide range of coding agents like Claude Code® and Visual Studio® Code.

engineering-toolsmatlabmatlab-mcp-servermcp-servermcp-tools
Share:
732
Stars
0
Downloads
0
Weekly
0/5

What is MATLAB?

MATLAB is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to run matlab® using ai applications with the official matlab mcp server from mathworks®. this mcp server for matlab supports a wide range of coding agents like claude code® and visual studio® code.

Run MATLAB® using AI applications with the official MATLAB MCP Server from MathWorks®. This MCP server for MATLAB supports a wide range of coding agents like Claude Code® and Visual Studio® Code.

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

Features

  • Run MATLAB® using AI applications with the official MATLAB M

Use Cases

Run MATLAB code and algorithms directly from AI coding agents. Execute engineering and scientific computing tasks through Claude. Integrate MATLAB with AI workflows for numerical analysis.
matlab

Maintainer

LicenseNOASSERTION
Languagego
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx matlab-mcp-core

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

The official MATLAB MCP Core Server from MathWorks lets AI coding agents like Claude Code and GitHub Copilot execute MATLAB code, run test files, perform static code analysis, and detect installed toolboxes — all without leaving the AI interface. It ships as a native binary (Go-based) and connects to a local or existing MATLAB installation, bridging the gap between conversational AI and MATLAB's numerical computing and engineering toolboxes. Engineers and data scientists use it to run simulations, validate algorithms, and execute test suites directly from AI-driven workflows.

Prerequisites

  • A licensed MATLAB installation (R2021b or later recommended; R2025a for Live Script features)
  • The matlab-mcp-core-server binary downloaded from the GitHub releases page
  • An MCP client such as Claude Code (claude mcp add) or VS Code with GitHub Copilot
  • Execute permission set on the downloaded binary (chmod +x on macOS/Linux)
1

Download the server binary for your platform

Download the pre-built binary from the latest GitHub release. The example below is for macOS Apple Silicon (maca64); substitute maci64, glnxa64, or win64 for your platform.

curl -L -o ~/Downloads/matlab-mcp-core-server \
  https://github.com/matlab/matlab-mcp-core-server/releases/latest/download/matlab-mcp-core-server-maca64
chmod +x ~/Downloads/matlab-mcp-core-server
2

Add the server to Claude Code

Register the binary as an MCP server using the Claude Code CLI. Use the full path to the downloaded binary.

claude mcp add --transport stdio matlab -- ~/Downloads/matlab-mcp-core-server
3

Specify your MATLAB installation path (if not auto-detected)

If MATLAB is not on your PATH, pass the --matlab-root flag or set the MW_MCP_SERVER_MATLAB_ROOT environment variable pointing to your MATLAB root directory.

# macOS example
export MW_MCP_SERVER_MATLAB_ROOT="/Applications/MATLAB_R2024b.app"
4

Choose a MATLAB session mode

The server supports three session modes: 'new' always launches a fresh MATLAB process, 'existing' connects to an already-running MATLAB session, and 'auto' tries existing first then falls back to new.

export MW_MCP_SERVER_MATLAB_SESSION_MODE=auto
export MW_MCP_SERVER_MATLAB_DISPLAY_MODE=nodesktop
5

Configure Claude Desktop (alternative client)

Add the server entry to your Claude Desktop configuration file with the binary path and any required environment variables.

{
  "mcpServers": {
    "matlab": {
      "command": "/Users/you/Downloads/matlab-mcp-core-server",
      "args": ["--matlab-session-mode", "auto", "--matlab-display-mode", "nodesktop"],
      "env": {
        "MW_MCP_SERVER_MATLAB_ROOT": "/Applications/MATLAB_R2024b.app"
      }
    }
  }
}
6

Verify connectivity

Ask Claude to detect your MATLAB installation and list toolboxes. This confirms the server binary can launch and communicate with MATLAB.

MATLAB Examples

Client configuration

Claude Desktop configuration using the MATLAB MCP Core Server binary on macOS.

{
  "mcpServers": {
    "matlab": {
      "command": "/Users/you/Downloads/matlab-mcp-core-server",
      "args": [
        "--matlab-session-mode", "auto",
        "--matlab-display-mode", "nodesktop"
      ],
      "env": {
        "MW_MCP_SERVER_MATLAB_ROOT": "/Applications/MATLAB_R2024b.app",
        "MW_MCP_SERVER_INITIALIZE_MATLAB_ON_STARTUP": "true"
      }
    }
  }
}

Prompts to try

Example prompts that exercise MATLAB code execution, analysis, and test running.

- "Run this MATLAB snippet and show me the output: x = 0:0.1:2*pi; plot(sin(x))"
- "Check my script signal_processing.m for code quality issues"
- "What MATLAB toolboxes do I have installed?"
- "Run the unit tests in my_test.m and summarize the results"
- "Execute my simulation script run_sim.m and return all printed output"

Troubleshooting MATLAB

Server starts but MATLAB fails to launch

Verify MW_MCP_SERVER_MATLAB_ROOT points to a valid MATLAB installation root (the directory containing 'bin/matlab'). On macOS this is typically '/Applications/MATLAB_R202Xb.app'.

Permission denied when running the binary

Run 'chmod +x /path/to/matlab-mcp-core-server' to make the binary executable. On macOS you may also need to allow it in System Settings > Privacy & Security after the first blocked run.

evaluate_matlab_code times out on long computations

Long-running MATLAB computations may exceed the MCP request timeout. Break the computation into smaller steps or use run_matlab_file with an intermediate results file to persist state between calls.

Frequently Asked Questions about MATLAB

What is MATLAB?

MATLAB is a Model Context Protocol (MCP) server that run matlab® using ai applications with the official matlab mcp server from mathworks®. this mcp server for matlab supports a wide range of coding agents like claude code® and visual studio® code. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MATLAB?

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

Which AI clients work with MATLAB?

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

Is MATLAB free to use?

Yes, MATLAB is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

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

Read the full setup guide →

Ready to use MATLAB?

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