The Simulink® Agentic Toolkit enables you to use AI agents with Simulink. It gives your AI agent the knowledge and context to read, build, edit, and test Simulink models by using Model-Based Design best practices. It connects agents to Simulink through the MATLAB MCP Server, giving them the ability (tools) and the knowledge (skills) to work with Simulink models effectively. Use this toolkit to provide trusted Simulink capabilities to your agent. This toolkit helps prevent your AI coding agent from hallucinating, missing new features, and wasting time with extra steps that experienced Simulink users skip.
The toolkit provides:
- MCP tools for reading, editing, querying, testing, and checking Simulink models
- Agent skills encoding Model-Based Design best practices for model building, simulation, plant specification, testing, requirements, project management, and architecture modeling
- Support for Claude Code, GitHub Copilot in Visual Studio Code, GitHub Copilot CLI, and OpenAI Codex
To use AI agents with MATLAB, install the MATLAB Agentic Toolkit. The Agentic Toolkit Installer can install both toolkits in one step.
┌───────────┐ ┌───────────┐ ┌──────────┐
│ AI Agent │◄─MCP─►│MCP Server │◄─────►│ MATLAB / │
│ (Claude, │ │ (MATLAB │ │ Simulink │
│ Codex, │ │ MCP) │ └──────────┘
│ Copilot) │ └───────────┘
└───────────┘
▲
│ reads
┌─────┴─────┐
│ Skills │
│ (MBD best │
│ practices)│
└───────────┘
Your agent reads skills for domain knowledge, then calls MCP tools to interact with MATLAB and Simulink. The MATLAB MCP Server bridges the connection.
-
MATLAB R2023a or later with Simulink
-
An AI coding agent that supports MCP servers and skills. The installer configures supported agents automatically. Supported agents include:
If you use an agent that the installer does not support, follow the instructions in Manual Coding Agent Setup.
-
Simulink Test (optional) — required only for the
model_testtool -
Some skills require additional toolboxes (e.g., System Composer, Simscape, Stateflow). Check the
requires-productsfield in each skill'smanifest.yamlunderskills-catalog/for additional requirements.
These steps show you how to install the Simulink Agentic Toolkit and the MATLAB MCP Server and how to add skills to your agent.
To install, update, or uninstall the Simulink Agentic Toolkit and MATLAB MCP Server together, use the Agentic Toolkit Installer. Follow the installation instructions in the repository. The installer downloads the toolkit and MATLAB MCP Server, installs the required MATLAB toolboxes, and configures the MCP server and skills for your agent.
If the installer does not support your agent, use the installer to install the toolkit, and then configure your agent manually. For instructions, see Manual Coding Agent Setup.
When you use the installer, you do not need to set up the toolkit for each MATLAB session. The toolkit is automatically available on the MATLAB path, and agents can connect to MATLAB automatically. To use an existing MATLAB session and retain its workspace and loaded models, run shareMATLABSession in that session.
Existing users: If you previously set up the toolkit by using
setupAgenticToolkitor the earlier agent-driven workflow, the installer detects the previous installation and prompts you to remove it. You no longer need to runsatk_initialize. Removesatk_initializefrom yourstartup.mfile. For more information, see Migrate from a Previous Installation.
To check your installation, run this in MATLAB:
satk_doctorsatk_doctor checks the toolkit's MATLAB tools, the MATLAB path, and MATLAB session sharing. To check installed versions, configured agents, and the MCP server, run agentic-toolkit-installer status in a terminal. Confirm that your agent lists the Simulink Agentic Toolkit skills. For example, in Claude Code, use the /skills command.
Then, open a Simulink model. You can use your own model or open an example model.
openExample('simulink_general/sldemo_househeatExample')This command opens the shipped example model sldemo_househeat. Ask your agent:
Describe the structure of the currently open model.
For troubleshooting, see Configuration and Troubleshooting.
Use satk.Configuration.setToolboxes to activate pre-built knowledge bases for installed MathWorks toolboxes:
satk.Configuration.setToolboxes('all') % Activate all installed toolbox KBs
satk.Configuration.setToolboxes({'Aerospace Blockset', 'Simscape'}) % Activate specific toolboxes by name
satk.Configuration.setToolboxes('none') % Deactivate all toolbox KBs
satk.Configuration.setToolboxes('Simscape', Mode="add") % Keep the active toolbox KBs and add one
satk.Configuration.setToolboxes('Simscape', Mode="remove") % Deactivate just this toolboxBy default (Mode="replace"), the toolboxes you list become the only active ones.
To use your own custom Simulink block libraries with the toolkit, register them in MATLAB once:
satk.Configuration.setCustomLibraries("C:\path\to\customLibs")This declares your custom libraries. By default (GenerateKB=false), the toolkit does not build the knowledge base immediately. Instead, the agent indexes the libraries into a knowledge base on the next model-building task or when you invoke the simulink-setup-custom-libraries skill. Indexing takes about 3–5 minutes and enables the agent to use custom blocks alongside built-in ones.
Each entry is either a folder, which registers every .slx and .mdl file in
it, or the path to a single library file. To register more than one entry, pass
a string array or a cell array:
% Multiple folders
satk.Configuration.setCustomLibraries(["C:\path\to\motorLibs", "C:\path\to\sensorLibs"])
% Individual library files
satk.Configuration.setCustomLibraries(["C:\libs\motorLib.slx", "C:\libs\sensorLib.slx"])By default, each call replaces the full set of registered custom libraries.
To keep the registered libraries and add more, use Mode="add":
satk.Configuration.setCustomLibraries("C:\libs\valveLib.slx", Mode="add")To unregister one library, use satk.Configuration.removeCustomLibrary.
setCustomLibraries accepts the following options:
% Build the knowledge base deterministically from block metadata present in the libraries.
satk.Configuration.setCustomLibraries("C:\path\to\customLibs", GenerateKB=true)
% Choose where the KB and configuration folder is written.
% Omitted -> MATLAB prefdir (default): per-user, global, paths stored absolute.
% <dir> -> an existing directory: library paths on the same drive are
% stored relative to this root (so the .satk folder can be
% committed and shared); paths on a different drive are stored
% absolute.
satk.Configuration.setCustomLibraries("libs", Location="C:\repo\myProject")When you register custom libraries with a Location, activating toolbox
knowledge bases with setToolboxes writes them into that same .satk folder.
If you activate toolbox KBs globally first and later register custom
libraries with a Location, the toolkit automatically moves the toolbox KBs
alongside the custom libraries.
The agent finds blocks through the knowledge base (KB), markdown pages in the OKF format at .satk/library-kg/. The toolkit generates the pages: setToolboxes adds toolbox pages, and setCustomLibraries registers your custom libraries.
Use satk.Configuration to review and correct how the agent sees your custom library blocks. All methods act on the effective KB; pass Location="global", "project", or a folder to target a specific one.
| Method | Description |
|---|---|
listBlocks |
Table of blocks with each block's library, category, and description. Filter by library (Library=) or category (Category=). |
setBlockDescription |
Set a block's description. The block's pages are regenerated in the same call. |
setBlockCategory |
Move blocks to a category, creating the category if it is new. The affected pages are regenerated in the same call. |
pack |
Zip the KB so you can share it. Relative links keep working. |
% See the blocks of one library, with their categories and descriptions
t = satk.Configuration.listBlocks(Library="MotorLib")
% Improve a block's description so the agent picks it for the right task
satk.Configuration.setBlockDescription("SpeedController", "PI speed loop with anti-windup")
% Move a block to an existing category
satk.Configuration.setBlockCategory("CurrentObserver", "Estimators")
% Move several blocks to a new category (it is created automatically)
satk.Configuration.setBlockCategory(["LegacyPI", "OldPID"], "Deprecated Controllers")
% Check the result
satk.Configuration.listBlocks(Category="Deprecated Controllers")- Descriptions and categories you set are saved in
.satk/library-curation.jsonand survive regeneration. - You can also edit the KB pages directly in an editor. Your edits are never lost or silently overwritten: they are picked up on the next write call or
model_edit. Editing a block's description in a page table, or moving a block's row to another category page, is saved the same way assetBlockDescriptionandsetBlockCategory. Changes to a page's title, description, tags, status, or notes are kept as page edits. - The KB regenerates automatically when your libraries, curation, or block policy change, so you do not need to rebuild it by hand.
- A KB created by an earlier release is migrated on the first write call, and the old folder is kept under
.satk/backup/.
To remove the global (prefdir) library configuration:
satk.Configuration.clearConfig()To remove a project-local configuration, including its .satk/ folder and any
satk-libraries.json file at the project root, run this command. For example,
remove the project configuration if it shadows the global configuration and
you want the global configuration to take precedence.
satk.Configuration.clearConfig("C:\repo\myProject")Both forms are destructive and not reversible.
After you install the Simulink Agentic Toolkit, your agent can use the following tools.
| Tool | What your agent can do |
|---|---|
model_overview |
Explore model architecture. Review subsystem hierarchy, interfaces, and how major components connect |
model_read |
Understand model behavior. Inspect blocks, algorithmic expressions, signal flow, and parameter values |
model_edit |
Build and modify models. Add blocks, wire signals, create subsystems, and configure parameters as needed |
model_check |
Validate model structure. Detect unconnected ports, dangling lines, and edit-time check issues in states and subcharts |
model_read_diagnostics |
Read diagnostics. Retrieve errors, warnings, and info messages from the Diagnostic Viewer after compilation, simulation, or code generation |
model_test |
Verify requirements. Run human-readable Gherkin tests with automatic harness generation (requires Simulink Test) |
model_query_params |
Inspect any parameter. Query block settings, signal properties, solver config, and logging flags |
model_resolve_params |
Get actual values. Resolve workspace variables such as Kp to their numeric values across all scopes |
model_scan |
Find something specific, fast. Regex-search the saved .slx file on disk for a block name, parameter value, or string without loading the model |
After you install the Simulink Agentic Toolkit, your agent can use the skills in the following groups. To see lists of available skills, see the skills catalog.
| Skill Group | Description |
|---|---|
| Model-Based Design Core | Core Model-Based Design (MBD) skills for building, testing, and specifying Simulink models |
| Model-Based System Engineering | Model-Based System Engineering skills for System Composer architecture models |
| Verification, Validation, and Test | Author custom Model Advisor checks, run compliance reviews against industry standards (MISRA, MAB, ISO 26262, DO-178C, etc.), fix SLDV incompatibilities, and explain missing coverage |
| Simulink Simulation | Skills for constructing simulation input datasets and configuring simulation workflows |
| Simulink Modeling | Configure and integrate C/C++ and Python code into Simulink models via C Function and Python Code blocks, and import external data into Simulink Data Dictionaries |
| Control Systems | Control system design and analysis skills for Simulink models |
| Simulink Environment Fundamentals | Core Simulink environment capabilities, including discovering shipped example models |
| Signal Processing | Build frame-based streaming DSP models in Simulink by using DSP System Toolbox |
| Physical Modeling | Model, simulate, and analyze multidomain physical systems with the Simscape product family |
| Code Generation | Prepare Simulink models for production code generation, including single-precision conversion, optimizing generated embedded code, configuring Embedded Coder deployment settings, and customizing A2L calibration files |
| Code Verification | Check the code generated from Simulink models with Polyspace Bug Finder and Polyspace Code Prover, and trace each finding to its block |
| Real-Time Simulation and Testing | Configure, deploy, and run Simulink models on real-time target computers with Simulink Real-Time |
| Simulink Block and Blockset Authoring | Author the appearance of custom Simulink blocks, such as dynamic SVG block icons |
| Aerospace | Aerospace skills for Simulink models using Aerospace Blockset |
| RF and Mixed-Signal | Physics-based RF system modeling and simulation in Simulink with RF Blockset Circuit Envelope and Idealized Baseband |
When you use the Simulink Agentic Toolkit and MATLAB MCP Server, review and validate all tool calls before you run them. Always keep a human in the loop for important actions, and proceed only when you are confident that the call does what you expect. For more information, see User Interaction Model (MCP) and Security Considerations (MCP).
The license is available in the LICENSE.md file in this GitHub repository.
MCP servers are only permitted to be used with MATLAB and Simulink in accordance with the MathWorks Software License Agreement, and must not be shared by multiple users. Contact MathWorks if you need to support shared or centralized server use.
The Agentic Task Explorer provides curated, multi-step tasks that show what agents can do with Simulink — model understanding, creation, editing, testing, bug fixing, and verification. Each task includes Simulink models and supporting files, ready to go.
slAgenticTaskExplorerSelect a task from the interactive UI. The explorer stages it into an isolated workspace with all required files, then opens your coding agent. Each task presents step-by-step prompts — copy each prompt into your coding agent and watch it work.
This is a research preview. Behavior and interfaces might change.
If you encounter a bug, use the simulink-file-toolkit-bug-report skill to generate a report before opening a GitHub issue. Ask your agent:
File a bug report for this issue
The skill automatically captures environment details, reproduction steps, and error output. Run the skill in the same session where the bug occurred, because it uses conversation context to reconstruct what happened. Then open a bug report and paste the generated report.
MathWorks encourages you to use this repository and provide feedback. To request technical support or submit an enhancement request, create a GitHub issue or contact technical support. For installation issues, see the Agentic Toolkit Installer repository. For MATLAB MCP Server issues, see the MATLAB MCP Server repository.
This repository does not accept pull requests. See CONTRIBUTING.md for details.
Copyright 2025-2026 The MathWorks, Inc.