matlab -core
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.
claude mcp add --transport stdio matlab-matlab-mcp-core-server ./matlab-mcp-core-server-binary
How to use
The MATLAB MCP Core Server exposes MATLAB as a controllable service for AI-assisted workflows. It allows you to start and stop MATLAB, submit MATLAB code for execution, and perform lightweight analysis of code quality and style. Through the provided Tools, you can query installed MATLAB versions and toolboxes, analyze MATLAB scripts for style and potential issues, evaluate dynamic code snippets, and run MATLAB scripts to obtain outputs. This enables AI applications to interact with MATLAB programmatically, enabling tasks such as automated code evaluation, batch script execution, and integration with copilots or IDEs.
To use it, configure your MCP client (for example Claude Code, Claude Desktop, or VS Code) to point at the MATLAB MCP Core Server binary. You can customize behavior via arguments such as which MATLAB to start (matlab-root), whether to initialize MATLAB on startup, the initial working folder, display mode, and telemetry settings. Once configured, use the Tools commands to detect toolboxes, analyze scripts, or run code by providing the appropriate inputs (e.g., script paths or code strings) to the server.
How to install
Prerequisites:
- MATLAB installed (MathWorks) version 2020b or later and accessible on your system PATH
- A compatible operating system (Windows, macOS, or Linux)
- If you’re building from source, Go is required and you’ll build the binary using: go install github.com/matlab/matlab-mcp-core-server/cmd/matlab-mcp-core-server@latest
Installation steps:
- Download the MATLAB MCP Core Server binary or build from source.
- Prebuilt binaries are available from the latest release page of the repository.
- To build from source (as an alternative):
go install github.com/matlab/matlab-mcp-core-server/cmd/matlab-mcp-core-server@latest - For macOS, download the appropriate macOS binary from the releases page and make it executable:
chmod +x ~/Downloads/matlab-mcp-core-server
- Ensure the binary is reachable in your PATH or use an explicit path in your MCP configuration.
- Add MATLAB to PATH if not already present, or use the matlab-root argument to point to the desired MATLAB installation.
- Verify the server by starting the MCP Core Server and connecting a client (e.g., VS Code MCP integration or Claude Code) using the configuration example below.
Example server setup (VS Code MCP config):
{
"servers": {
"matlab": {
"type": "stdio",
"command": "/full/path/to/matlab-mcp-core-server-binary",
"args": []
}
}
}
Optional: configure arguments to tailor MATLAB startup (see Arguments section in the README).
Additional notes
Notes and tips:
- MATLAB must be installed and accessible on the system PATH, or you can explicitly set the MATLAB root using the matlab-root argument (e.g., --matlab-root=/home/user/MATLAB/R2025a).
- The server supports optional arguments such as --initialize-matlab-on-startup to preload MATLAB on startup, --initial-working-folder to set the startup directory, --matlab-display-mode to choose between desktop or no-desktop modes, and --disable-telemetry to opt out of data collection.
- When using Claude Code or Claude Desktop, you can add the MCP server with a path to the binary and optional arguments to customize behavior. In VS Code, add an mcp.json entry with the MATLAB server following the provided example.
- If you encounter permission issues on macOS or Linux, ensure the binary is executable (chmod +x) and that the executing user has the necessary rights to start MATLAB.
- Data collection (telemetry) can be disabled via the --disable-telemetry=true argument if you prefer not to send usage data.
Related MCP Servers
mcp-log-proxy
a web logging proxy for MCP client-server communication
mcp-time
MCP (Model Context Protocol) server which provides utilities to work with time and dates, with natural language, multiple formats and timezone convertion capabilities
mcp
Teamwork.com MCP server
muster
MCP tool management and workflow proxy
mcp-local-context
An MCP server that helps AI assistants work with GoLang third-party packages using your local Go module cache.
cursor-buddy
🤖 MCP server that gives AI agents deep context about your project - coding standards, knowledge base, todos, database schema & history. Keep your AI assistant consistent and context-aware.