Model Context Protocol server to let LLMs write and execute matlab scripts
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"matlab-mcp": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
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.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools / analytics
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Workspace template + MCP server for Claude Code, Codex CLI, Cursor & Windsurf. Multi-agent knowledge engine (ag-refresh / ag-ask) that turns any codebase into a queryable AI assistant.
MCP server for accessing Figma plugin console logs and screenshots via Cloudflare Workers or local mode
MCP server for using the GitLab API
MCP Security Weekly
Get CVE alerts and security updates for Matlab Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
# 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]"
MATLAB_PATH environment variable.matlab_server.py: The main MCP server implementationmatlab_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"
}
}
}
}
Make sure to:
/absolute/path/to/matlab-mcp with the actual path to your project directoryMATLAB_PATH points to your MATLAB installationThe server provides several tools:
create_matlab_script: Create a new MATLAB script file
matlab_scripts directorycreate_matlab_function: Create a new MATLAB function file
matlab_scripts directoryexecute_matlab_script: Run a MATLAB script and get results
call_matlab_function: Call a MATLAB function with arguments
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
Example test script:
t = 0:0.01:2*pi;
y = sin(t);
plot(t, y);
title('Test Plot');
xlabel('Time');
ylabel('Amplitude');
matlab_scripts directory<script_name>.m or <function_name>.mmatlab_server.pyMATLAB_PATH: Path to your MATLAB installation
/Applications/MATLAB_R2024a.appMATLAB Engine Installation Fails
cd $MATLAB_PATH/extern/engines/python
python setup.py install
Python Version Issues
python --versionuv python pin 3.11 if neededScript Execution Errors
matlab_scripts directory exists