
Simulink Agentic Toolkit
PluginMathWorks 官方工具包:通过 MATLAB MCP 服务器让 agent 读取、搭建、修改和测试 Simulink 模型,附带控制系统、Simscape 物理建模、代码生成与合规检查等技能,支持 Claude Code、Codex 等。需要已授权的 MATLAB R2023a 及以上与 Simulink,先在 MATLAB 中运行官方安装器。
Simulink Agentic Toolkit
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.
How the Simulink Agentic Toolkit Works
┌───────────┐ ┌───────────┐ ┌──────────┐
│ 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.
Requirements
- MATLAB R2023a or later with Simulink
- An AI coding agent that supports MCP servers and skills. The installer configures supported agents automatically. To manually configure the MCP server and install skills, see the documentation for your agent. Supported agents include:
- 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.
Get Started with Simulink Agentic Toolkit
These steps show you how to install the Simulink Agentic Toolkit and the MATLAB MCP Server and how to add skills to your agent.
Install the Simulink Agentic Toolkit
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.
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.
Verify the Installation
To check your installation, run this in MATLAB:
satk_doctor
satk_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.
Library Configuration
Toolbox Libraries
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 toolbox
By default (Mode="replace"), the toolboxes you list become the only active ones.
Custom Libraries
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 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"])
Each call replaces the full set of registered custom libraries instead of adding to it, so list every library that you want in a single call.
Options
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.
Knowledge Base
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.
Maintaining the Knowledge Base
Maintain the Knowledge Base with satk.Configuration. All methods act on the effective KB; pass Location="global", "project", or a folder to target a specific one.
| Task | Method | Description |
|---|---|---|
| Read | listPages | Table of pages with ID, type, title, description, tags, and status. Filter by folder (Under=), page type (Type=), or tag (Tag=). |
getPage | Return one page: its ID, path, frontmatter, and markdown body. | |
getBacklinks | Return the IDs of the pages that link to a page. | |
listBlocks | Table of blocks with each block's library, category, and description, and whether you set that description yourself. Filter by library (Library=) or category (Category=). | |
getBlock | Look up a block by its display name or ReferenceBlock. | |
| Curate blocks | setBlockDescription | Set a block's description and regenerate its page. |
setBlockCategory | Move blocks to a category, creating the category if it is new, and regenerate. | |
| Edit pages | addPage | Add a page, such as a guide or a new category page. OnExist= sets what happens if the page already exists: "error" (default), "skip", "update" (merge the fields you pass), or "replace" (overwrite the page). |
addPages | Add several pages from a JSON manifest and report a result for each entry. Accepts the same OnExist= option. | |
updatePage | Change a page's frontmatter (status, title, description, tags) or its body. | |
removePage | Remove a page and return the pages that still link to it. A removed generated page stays removed when you regenerate. | |
renamePage | Rename a page and rewrite the links to it. Renaming a generated category page also renames the category. A generated page cannot move to another library folder. | |
| Maintain | regeneratePages | Regenerate the generated pages from your libraries. Reset=true drops all page edits and brings back removed pages, but keeps the block descriptions and categories you set. Discard="<page id>" resolves a page marked conflict: it backs up your hand edit under .satk/backup/hand-edits/ and takes the generated version. |
lint | Report broken links, unknown ReferenceBlock values, wrong block counts, blocked blocks that are listed, and edits that conflict with the generated pages. Fix a conflict with regeneratePages(Discard="<page id>"). | |
reindex | Rebuild every index.md, for example after you copy pages into the KB by hand. | |
removeCustomLibrary | Unregister a library and remove its pages. The block descriptions and categories you set, and your block policy, are kept. | |
| Export | pack | Zip the KB so you can share it. Relative links keep working. |
viz | Write an interactive HTML graph of the links between pages. Opening it needs network access. |
- Descriptions and categories you set are saved in
.satk/library-curation.jsonand survive regeneration. - KB write methods accept
By=to record who made a change inlog.md, for exampleBy="human:alice". The default isprocess:satk-configuration. - A KB created by an earlier release is migrated on the first write call, and the old folder is kept under
.satk/backup/.
Checking the Knowledge Base Status
satk.Configuration.getStatus().kg % page, block, and lint counts
Clearing Configuration
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.
MCP Tools
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 |
Agent Skills
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 |
| 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 |
| 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 |
Security Considerations
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).
Licensing and Usage
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.
Research Preview: Agentic Task Explorer
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.
slAgenticTaskExplorer
Select 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.
Report Bugs
If you encounter a bug, use the filing-bug-reports 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.
Support and Contributions
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.
相关资源

MATLAB MCP Server
MCPMathWorks 官方出品,让 agent 启动本机 MATLAB,编写并运行脚本和单元测试、检查代码风格与潜在错误,适合用 MATLAB 做数值计算、仿真和数据分析的工程师、科研人员与学生。需本机安装已授权的 MATLAB R2021a 以上,并下载服务器程序。
matlab/matlab-mcp-server1.9k
MATLAB Agentic Toolkit
PluginMathWorks 官方工具包:通过 MATLAB 安装器配置 MCP 服务器,让 agent 运行代码、跑测试、做静态检查;信号处理、控制、统计与机器学习等领域技能组可作为 Claude Code 插件安装。需要 MATLAB R2021a 及以上。
matlab/matlab-agentic-toolkit1.4k
COMSOL MCP Server
MCP用 100 多个工具让 agent 驱动 COMSOL Multiphysics:建模,设置几何与传热、流体、静电、固体力学等物理场,划网格、求解并导出结果,配套论文发表于 Neurocomputing。需要已授权的 COMSOL 5.x/6.x、Python 与 Java,需克隆仓库安装。
wjc9011/COMSOL_Multiphysics_MCP1k
NVIDIA Agent Skills
PluginNVIDIA 官方插件:按任务从 NVIDIA 技能目录中找出并安装合适的技能,覆盖 CUDA 加速、NIM 推理、NeMo 训练、RAG 蓝图、Omniverse 仿真与机器人等领域。Claude 与 Codex 官方市场均已收录。
NVIDIA/skills4.2k
Math Modeling Skill
Skill面向国赛、美赛等数学建模竞赛与建模项目的三阶段工作流:建模分析、Python / MATLAB 求解与出图、生成 Word(可选 LaTeX)论文,内置阶段质检子代理与 OpenAlex + AnySearch 双引擎文献检索;生成的论文仅供参考。
XiaoMaColtAI/math-modeling-skill2k
Math Modeling Skills
Skill国赛 CUMCM 与美赛 MCM/ICM 备赛两件套:solver 拆题、按 95+ 场景决策矩阵选模型并给出 Python/MATLAB 代码模板;paper 按获奖论文规律指导摘要、模型检验与排版自查。适合备赛学生和指导老师,运行代码需本地 Python 或 MATLAB。
Lupynow/math-modeling-skills461