The MATLAB MCP Server lets Model Context Protocol clients start MATLAB, run and test code, and analyze scripts when MATLAB is installed locally. MathWorks distributes binaries for manual or bundled setup with coding agents.
Overview
MATLAB MCP Server is official MathWorks middleware that connects AI applications using the Model Context Protocol to an installed MATLAB release. Supported clients include Claude Code, Claude Desktop, GitHub Copilot in Visual Studio Code, Codex, and other MCP hosts.
Through MCP tools, agents can detect installed toolboxes, run static analysis on scripts without executing them, evaluate code strings, execute .m or .p files, and run MATLAB unit test files. Resources expose coding guidelines for standard MATLAB and plain-text live scripts. Optional arguments control which MATLAB install to launch, desktop visibility, session attachment to an already running MATLAB, logging, telemetry, and custom tool definitions via JSON extension files.
Setup requires MATLAB on the system path or an explicit root, downloadable server binaries on macOS with execute permission, workspace or application JSON configuration, or a desktop bundle installed as a Claude extension alongside Anthropic's filesystem extension. Windows setups note environment variables needed for MATLAB when certain agents omit them.
The server is intended for engineering workflows where conversational or agentic coding tools need governed access to MATLAB execution and style checking on the user's machine rather than a remote-only SaaS runtime.
Key features
- Model Context Protocol integration
- Start and quit MATLAB sessions
- Run and evaluate MATLAB code
- Static script analysis tool
- MATLAB unit test execution
- Configurable session and display modes
- Custom MCP tool extensions
- Coding guideline resources
Use cases
- AI-assisted MATLAB development
- Agent-driven script execution
- Automated code quality checks
- MATLAB tooling inside VS Code