MATLAB Agentic Toolkit
The MATLAB® Agentic Toolkit allows you to use AI agents with MATLAB by giving your AI agent the knowledge and context to work efficiently with MATLAB and its toolboxes. Use this toolkit to provide trusted MATLAB capabilities to your agent. This toolkit can prevent your AI coding agent from hallucinating toolbox functions, missing new features, and wasting time with extra steps that experienced MATLAB users would skip.
Use this toolkit to:
-
Connect your AI agent to MATLAB. This toolkit does this by automatically installing the MATLAB MCP Core Server. You can then use your agent to write idiomatic code, generate and run tests, diagnose errors, build apps, and more.
-
Provide curated expertise, called skills, to your agent. These skills equip your agent with knowledge of MATLAB workflows, conventions, and best practices while minimizing token burn.
[!Note]
To use AI agents with Simulink®, install the Simulink Agentic Toolkit. To install both the toolkits in one step, see the alternative installer.
Requirements
- MATLAB R2020b or later
- Git™
- AI coding agent. Supported agents include:
- Claude Code
- GitHub® Copilot
- OpenAI® Codex
- Gemini™ CLI
- Sourcegraph Amp
Get Started with the MATLAB Agentic Toolkit
These steps show you how to use the MATLAB Agentic Toolkit to install and configure the MATLAB MCP Core Server.
Note: For detailed instructions on configuration options for this toolkit, platform-specific notes, verification steps, and troubleshooting, see Configuration and Troubleshooting.
Clone the repository using this command.
git clone https://github.com/matlab/matlab-agentic-toolkit.git
cd matlab-agentic-toolkit
Deploy your agent (claude, codex, gemini, etc.) and ask the agent to set up the MATLAB Agentic Toolkit.
Set up the MATLAB Agentic Toolkit
The setup looks for your MATLAB installation(s), downloads the MCP server, writes your agent's global configuration, and registers skills. After your setup is complete, start a new session in any project directory to use the MATLAB tools and skills.
Already Have the MCP Server?
If you installed the MATLAB MCP Core Server yourself, you just need skills.
Claude Code: If you have Claude Code, you can add skills directly using these commands.
claude plugin marketplace add "https://github.com/matlab/matlab-agentic-toolkit"
claude plugin install matlab-core@matlab-agentic-toolkit
These commands install skills only. Your existing MCP configuration is not modified.
For other AI coding agents, see Adding Skills Only.
Alternative Installer (experimental)
The Simulink Agentic Toolkit provides a MATLAB-based installer that can install and configure both toolkits. This installer offers several benefits over the current matlab-agentic-toolkit-setup skill:
- It can install both the MATLAB and Simulink Agentic Toolkits. It is recommended for users who would like to use both
- It supports the MATLAB MCP Core Server option to connect to an existing MATLAB session (
--matlab-session-mode=existing)
- It provides the option to configure your agent to use the toolkits for individual projects, not just globally
- This installer does not consume agent tokens
The tradeoff is that it is newer and less thoroughly tested than the agent-driven setup above.
- Download
agenticToolkitInstaller.mltbx from the Simulink Agentic Toolkit releases page.
- Open the downloaded file to install the installer add-on.
- In MATLAB, run:
setupAgenticToolkit
Verify
Ask your agent:
What version of MATLAB is running? List the installed toolboxes.
Run and Test MATLAB Code Using MCP Tools
After you install the MATLAB Agentic Toolkit, your agent can use these tools provided by the MATLAB MCP Core Server.
| Tasks you can ask your agent to do | Tool used by agent |
|---|
| Run MATLAB code and return command window output | evaluate_matlab_code |
| Run a MATLAB program | run_matlab_file |
Run tests via runtests with structured results | run_matlab_test_file |
| Static analysis with the Code Analyzer | check_matlab_code |
| List installed MATLAB version and toolboxes | detect_matlab_toolboxes |
The server also provides two MCP resources: matlab_coding_guidelines (coding standards) and plain_text_live_code_guidelines (Live Script format rules).