Matlab

Matlab

matlab
GitHub

About

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.

Features

  • Start and quit MATLAB
  • Write and run MATLAB code
  • Assess your MATLAB code for style and correctness
  • Execute MATLAB scripts and test files
  • Static code analysis for MATLAB scripts
  • Access to MATLAB coding guidelines and live code format documentation

Tools

  • detect_matlab_toolboxes: Returns information about installed MATLAB and toolboxes, including version numbers
  • check_matlab_code: Performs static code analysis on a MATLAB script without executing it
  • evaluate_matlab_code: Evaluates a string of MATLAB code and returns the output
  • run_matlab_file: Executes a MATLAB script and returns the output
  • run_matlab_test_file: Executes a MATLAB test script and returns comprehensive test results

Resources

  • matlab_coding_guidelines: Comprehensive MATLAB coding standards for improving code readability, maintainability, and collaboration
  • plain_text_live_code_guidelines: Rules and guidelines for generating live scripts using the plain text Live Code .m file format (requires MATLAB R2025a or newer)

Setup

  1. Install MATLAB 2020b or later and add it to the system PATH
  2. Download the latest release binary for your platform from the releases page
  3. For macOS, grant executable permissions: chmod +x ~/Downloads/matlab-mcp-core-server
  4. Add the MATLAB MCP Core Server to your AI application

Usage Notes

The server supports multiple modes:

  • Desktop mode (default): Shows the MATLAB desktop
  • No-desktop mode: Uses MATLAB only from your AI application
  • New session mode (default): Starts a new MATLAB instance
  • Existing session mode: Connects to a running MATLAB session (R2023a+)

Data Collection

The MATLAB MCP Core Server may collect fully anonymized usage information. To opt out, use the --disable-telemetry=true argument.

Important

Always thoroughly review and validate all tool calls before running them. Keep a human in the loop for important actions. The MATLAB MCP Core server may only be used with MATLAB installations used as a Personal Automation Server.

This server runs through your single 1Server connection. No extra config required.

0Installs
752Stars

Categories

DevelopmentAI ToolsAnalytics

Tags

Official