MATLAB
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.
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
Maintainer
Works with
Installation
Manual Installation
npx matlab-mcp-coreConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-serverAdd 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-serverSpecify 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"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=nodesktopConfigure 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"
}
}
}
}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.
MATLAB Alternatives — Similar Developer Tools Servers
Looking for alternatives to MATLAB? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up MATLAB in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.