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 – A MATLAB‑based add‑on that lets large‑language‑model (LLM) coding agents (Claude Code, Copilot, Codex, Gemini CLI, Sourcegraph Amp, etc.) read, edit, query, test and validate Simulink® models. It does this by wiring the agent to a MATLAB MCP Server (the Model‑Context‑Protocol bridge) and supplying a catalog of skills that encode Model‑Based Design best practices.

Key components

  • MCP tools – ready‑made commands (model_overview, model_edit, model_test, …) that the agent can invoke to manipulate a Simulink model.
  • Skills catalog – dozens of self‑contained skill definitions (e.g., model‑building, system‑composer architecture, verification, code‑generation) each with a manifest.yaml describing required toolboxes.
  • Automated installer – a MATLAB toolbox (agenticToolkitInstaller.mltbx) that installs the MCP server, registers the tools, and adds the skills to the chosen agent in one command (setupAgenticToolkit("install")).
  • Library configuration – helpers (satk.Configuration.setLibrary) to expose installed MathWorks block libraries or custom block libraries to the agent’s knowledge base.

How it works

  1. The installer launches the MATLAB MCP Server and connects it to a running MATLAB/Simulink session (shareMATLABSession).
  2. The agent loads the skill files (either globally or per‑project) and learns the domain knowledge they contain.
  3. When the agent needs to act on a model, it calls an MCP tool; the server forwards the request to MATLAB, which executes the corresponding Simulink API call and returns the result.

Supported platforms – Any LLM‑based coding agent that can consume MCP tools and skills. The repository lists verified automated‑setup support for Claude Code, GitHub Copilot, OpenAI Codex, Google Gemini CLI, and Sourcegraph Amp.

Installation (quick start)

% 1. Download the toolbox from the latest release
matlab.addons.toolbox.installToolbox('agenticToolkitInstaller.mltbx')
% 2. Run the installer (installs MCP server, registers tools & skills)
setupAgenticToolkit('install')

For headless or proxy‑restricted environments you can install the toolbox programmatically as shown above.

Manual setup (if you prefer full control)

  • Download the appropriate matlab-mcp-server binary for your OS and place it in ~/.matlab/agentic-toolkits/bin/.
  • Start the server with ./matlab-mcp-server --setup-matlab and run shareMATLABSession() in the MATLAB console.
  • Clone this repository and add the tools/tools.json extension to the server’s command line.
  • Symlink the skill directories into ~/.agents/skills/ (script provided in the README).

Typical workflow

% Initialise the toolkit for the current MATLAB session
addpath('~/.matlab/agentic-toolkits/simulink')
satk_initialize

% Open a model (example shipped with Simulink)
openExample('simulink_general/sldemo_househeatExample')

% In your LLM agent, ask:
%   "Describe the structure of the currently open model."
% The agent will call `model_overview` via MCP and return a hierarchy description.

What the agent can do (selected MCP tools)

Tool Capability
model_overview List subsystem hierarchy and major connections
model_read Inspect block parameters, expressions, and signal flow
model_edit Add/remove blocks, wire signals, configure parameters
model_check Run edit‑time checks (unconnected ports, state issues)
model_test Execute Gherkin‑style verification tests (needs Simulink Test)
model_query_params / model_resolve_params Retrieve raw or resolved parameter values
model_read_diagnostics Pull errors/warnings from the Diagnostic Viewer

Security note – All tool calls should be reviewed before execution; keep a human in the loop for any operation that modifies a model or generates code.

License – See LICENSE.md. Use of the MCP server is bound by the MathWorks Software License Agreement and is limited to a single MATLAB/Simulink user.

Support – Open issues on the repository, or contact MathWorks technical support. Pull requests are disabled; contributions are accepted via the usual GitHub issue‑driven process.

Related

  • Project
  • Project
  • Project
  • Project
  • Project