matlab/matlab-mcp-server

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 it solves

This project provides a bridge between AI applications and MATLAB, allowing AI agents to interact with the MATLAB environment directly. It solves the problem of AI models being unable to execute code, manage sessions, or verify the correctness of MATLAB scripts without a standardized interface.

How it works

It implements the Model Context Protocol (MCP), which allows AI applications (like Claude Desktop, Claude Code, or GitHub Copilot in VS Code) to call specific tools and access resources. The server manages the MATLAB session—either by starting a new one or connecting to an existing one—and translates AI requests into MATLAB commands.

Who it’s for

Engineers, researchers, and developers who use MATLAB and want to leverage AI agents to automate code generation, execution, and testing within their MATLAB workspace.

Highlights

  • Direct Execution: AI agents can write and run MATLAB code or execute existing .m files.
  • Static Analysis: Includes a tool to assess MATLAB code for style and correctness without executing it.
  • Session Management: Supports starting new MATLAB sessions or connecting to existing ones (R2023a+).
  • Integrated Guidelines: Provides AI agents with built-in coding standards and live script guidelines to improve generated code quality.
  • Broad Compatibility: Works with various MCP-compliant AI clients including Claude and VS Code.

Related

  • Project
  • Project
  • Project
  • Project
  • Project