matlab/simulink-agentic-toolkit

The Simulink Agentic Toolkit gives your AI agent both the tools and the expertise to work effectively with Simulink and Model-Based Design.

Simulink Agentic Toolkit – What It Is

The Simulink Agentic Toolkit is a MATLAB‑based add‑on that lets large‑language‑model (LLM) coding agents (Claude Code, GitHub Copilot, OpenAI Codex, Gemini CLI, Sourcegraph Amp, etc.) interact directly with Simulink models. It does this by:

  1. Running a MATLAB MCP (Model‑Context‑Protocol) server – a small bridge that exposes MATLAB/Simulink functions as “tools” the agent can call.
  2. Providing a catalog of “skills” – reusable, domain‑specific prompts that encode Model‑Based Design best practices (building, testing, requirements, code generation, etc.).
  3. Packaging an installer that automatically sets up the MCP server, registers the skills with the chosen agent, and configures MATLAB paths.

In short, the toolkit gives an LLM the knowledge (skills) and ability (MCP tools) to read, edit, query, test, and validate Simulink models just like a human engineer would.


Key Features

Feature What It Gives the Agent Why It Matters
MCP Tools model_read, model_edit, model_test, model_check, model_query_params, etc. Enables the agent to perform concrete actions inside a live Simulink session without manual scripting.
Skill Catalog Over a dozen skill groups covering core MBD, system engineering, verification, simulation, control, code generation, real‑time testing, and more. Encodes industry‑standard workflows (e.g., MISRA checks, Gherkin‑style tests) so the agent follows best practices rather than hallucinating.
Automated Installer (agenticToolkitInstaller.mltbx) One‑click setup of the MCP server, toolbox paths, and skill registration; also supports uninstall/update. Lowers the barrier for engineers to try agent‑assisted modeling.
Cross‑Agent Support Works with Claude Code, Copilot, Codex, Gemini CLI, Sourcegraph Amp (all verified). Gives teams flexibility to use their preferred LLM coding assistant.
Custom Library Indexing satk.Configuration.setCustomLibraries builds a knowledge base from user‑defined Simulink block libraries. Allows the agent to understand proprietary blocks and reuse them in generated models.
Security‑First Design Requires human review of tool calls; MCP spec includes user‑interaction and security guidelines. Prevents accidental destructive changes to critical models.

Typical Workflow

  1. Install the toolkit via the provided .mltbx installer (or manually set up the MCP server).
  2. Run setupAgenticToolkit("install") which:
    • Installs the MCP server binary.
    • Adds the toolkit to MATLAB’s path.
    • Registers the skill catalog with your chosen LLM agent.
  3. Start a MATLAB session with Simulink loaded and call satk_initialize (once per session). This shares the session with the MCP server.
  4. Ask the LLM to perform a task, e.g.,
    "Add a PID controller to the plant model and tune Kp, Ki, Kd."
    
    The agent reads the appropriate skill, then calls model_edit (add block, set parameters) and model_test (run a Gherkin test) via MCP.
  5. Validate the result – the toolkit surfaces diagnostics, model hierarchy, or simulation output for the human to review.

Who Should Use It?

Audience Benefit
Control/Mechatronics Engineers Faster prototype iteration; LLM can generate or modify controller blocks based on high‑level specs.
Systems Engineers Automated System Composer architecture updates and requirement traceability via skills.
Verification Teams Generate Gherkin‑style test harnesses, run Model Advisor checks, and produce compliance reports automatically.
Tool Developers / Researchers A concrete example of LLM‑driven Model‑Based Design; can extend the skill catalog or experiment with new agents.

Limitations & Considerations

  • MATLAB R2023a+ with Simulink is required; the toolkit does not run on the open‑source Octave ecosystem.
  • Some tools (e.g., model_test) need additional MathWorks products like Simulink Test.
  • The MCP server is licensed for single‑user use; sharing a server across multiple users violates the MathWorks license.
  • While the toolkit strives to prevent hallucinations, human oversight is still essential, especially for safety‑critical models.

Getting Started (Quick‑Start)

% 1. Install the add‑on (download .mltbx first)
matlab.addons.toolbox.installToolbox('agenticToolkitInstaller.mltbx')

% 2. Run the automated setup
setupAgenticToolkit('install')

% 3. Initialise for the current MATLAB session
satk_initialize

% 4. Open a demo model and ask the agent
openExample('simulink_general/sldemo_househeatExample')
% In your LLM chat window:
%   "Describe the structure of the currently open model."

Where to Find More Info

  • Full documentation – Configuration_and_Troubleshooting.md, skills-catalog/README.md.
  • License – see LICENSE.md (MathWorks proprietary license).
  • Bug reporting – use the built‑in filing-bug-reports skill or open an issue on GitHub.
  • Research preview – slAgenticTaskExplorer showcases multi‑step tasks the agent can perform.

TL;DR

The Simulink Agentic Toolkit bridges LLM coding agents with MATLAB/Simulink via a secure MCP server, supplying a rich set of tools and best‑practice skills so the agent can safely read, edit, test, and verify Simulink models. It’s a genuine, production‑grade add‑on aimed at engineers who want AI‑assisted Model‑Based Design.

Related

  • Project
  • Project
  • Project
  • Project
  • Project