MATLAB

by tsuchijo

Not rated
GitHub

About

Execute MATLAB scripts and functions via MCP clients. Requires a local MATLAB installation.

Details

Author
tsuchijo
Categories
Developer Tools, Other

Setup

Install MATLAB in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/tsuchijo/matlab-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

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.

- Python 3.11 (Python 3.13 and 3.12 are not currently supported by MATLAB Engine)
- MATLAB R2024a (or compatible version)
- uv package manager
- Create and set up the Python environment:

# Pin Python version uv python pin 3.11 # Create virtual environment uv venv # Activate virtual environment source .venv/bin/activate # Install MCP uv add "mcp[cli]"

- Install MATLAB Engine The MATLAB Engine will be installed automatically when the server first runs, using the MATLAB installation specified in theMATLAB_PATHenvironment variable.

- matlab_server.py: The main MCP server implementation
- matlab_scripts/: Directory where all MATLAB scripts and functions are saved (created automatically)
- pyproject.toml: Python project configuration
- .python-version: Specifies Python version for uv

# On macOS code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{ "mcpServers": { "matlab": { "command": "uv", "args": [ "--directory", "/absolute/path/to/matlab-mcp", "run", "matlab_server.py" ], "env": { "MATLAB_PATH": "/Applications/MATLAB_R2024a.app" } } } }

- Replace/absolute/path/to/matlab-mcpwith the actual path to your project directory
- Verify theMATLAB_PATHpoints to your MATLAB installation
- Use absolute paths (not relative)
-

create_matlab_script: Create a new MATLAB script file

- Scripts are saved in thematlab_scriptsdirectory
- File names must be valid MATLAB identifiers

create_matlab_function: Create a new MATLAB function file

- Functions are saved in thematlab_scriptsdirectory
- Must include valid function definition

execute_matlab_script: Run a MATLAB script and get results

- Returns output text, generated figures, and workspace variables
- Can pass arguments to scripts

call_matlab_function: Call a MATLAB function with arguments

- Returns function output and any generated figures

You can test the server using the MCP Inspector:

# Make sure you're in your virtual environment source .venv/bin/activate # Run the inspector MATLAB_PATH=/Applications/MATLAB_R2024a.app mcp dev matlab_server.py
t = 0:0.01:2*pi; y = sin(t); plot(t, y); title('Test Plot'); xlabel('Time'); ylabel('Amplitude');

- All MATLAB scripts and functions are saved in thematlab_scriptsdirectory
- This directory is created automatically when the server starts
- Files are named<script_name>.mor<function_name>.m
- The directory is in the same location asmatlab_server.py

- MATLAB_PATH: Path to your MATLAB installation

- Default:/Applications/MATLAB_R2024a.app
- Set in Claude Desktop config or when running directly

- Verify MATLAB_PATH is correct
- Try installing engine manually:

cd $MATLAB_PATH/extern/engines/python python setup.py install

- Make sure you're using Python 3.11
- Check with:python --version
- Useuv python pin 3.11if needed

- Check thematlab_scriptsdirectory exists
- Verify script syntax is valid
- Look for error messages in MATLAB output

- Keep your MATLAB installation updated
- Update Python packages as needed:uv pip install --upgrade mcp[cli]
- Check MATLAB engine compatibility when updating Python

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

MCP server that gives coding agents program-analysis primitives — data flow, call graphs, taint analysis — so they reason from ground truth instead of grep-and-guess. (same as the GitHub About — keeps your messaging consistent across the web).

Access LeetCode problems, user information, and contest data.

A collection of MCP servers for Electronic Design Automation (EDA) workflows, including tools for die yield calculation and Verilog/SystemVerilog analysis.

A .NET server for generating and validating vehicle serial numbers.

Neo is the first autonomous AI engineering agent that plans, researches and executes multi-step work for tasks such as building AI agents, AI model fine-tuning and evals, and ML pipelines; using your codebase, data, and experiments to ship faster with inspectable artifacts. It can reason over your repository, wire tools and retrieval, debug training runs, and help you develop production-ready AI workflows

17 developer tools for AI agents — JSON, JWT, regex with code gen, cron from English, secrets scanner, batch ops. 7 free, 10 Pro ($7).

Run Stata commands and execute .do files directly from VS Code and Cursor, with AI assistant integration.

An MCP server for accessing tidymodels GitHub information and generating code.

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.