ifx-matlab-mcp-wrapper
v0.1.2
Published
NPM wrapper for the MATLAB MCP Core Server binary
Readme
ifx-matlab-mcp-wrapper
Lightweight wrapper that exposes the MathWorks MATLAB MCP Core Server as an npm package.
Infineon IT policy requires MCP servers to be distributed through a recognised package manager (npm, pip, or Docker). This package satisfies that requirement without modifying MathWorks tooling: the MathWorks one-click installer places the real binary under ~/.matlab/agentic-toolkits/bin/; this wrapper simply locates and delegates to it.
Prerequisites
- A licensed MATLAB installation (R2024b or later recommended).
- The MathWorks Simulink Agentic Toolkit installed on your machine:
https://github.com/matlab/simulink-agentic-toolkit
Run the MathWorks one-click installer first — it places the MCP Core Server binary and the
tools.jsonextension file that this wrapper relies on.
Installation
Node.js / npx
No explicit install step is needed. VS Code and most MCP clients can run the server directly via npx:
npx -y ifx-matlab-mcp-wrapper [options]Requires Node.js ≥ 18 on your PATH.
Installing Node.js
Windows:
winget install OpenJS.NodeJS.LTSIf winget is not available, download the LTS installer from https://nodejs.org and run it. After installation, open a new terminal and verify:
node --version # should print v18.x.x or higher
npm --versionLinux / WSL:
Use nvm (recommended — no root required):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
# Restart your shell, then:
nvm install --lts
node --versionOr install via your package manager:
# Ubuntu / Debian
sudo apt-get update && sudo apt-get install -y nodejs npmmacOS:
brew install nodeSetup
Step 1 — One-time MATLAB integration
Add the following lines to your startup.m file to register the MCP toolkit with MATLAB on every startup:
addpath("..\\..\\.matlab\\agentic-toolkits\\simulink")
satk_initializestartup.m is typically located in your MATLAB user folder (e.g. C:\Users\<you>\Documents\MATLAB\startup.m). Create the file if it does not exist.
Step 2 — Install the VS Code extension
Open the Extensions view in VS Code, search for @mcp matlab in the Infineon internal registry, and install it. The extension automatically adds the server entry to your mcp.json.
The resulting entry looks like this (for reference, or to fix the path manually if needed):
{
"servers": {
"matlab": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ifx-matlab-mcp-wrapper",
"--matlab-session-mode=existing",
"--extension-file=C:\\Users\\<you>\\.matlab\\agentic-toolkits\\simulink\\tools\\tools.json",
"--disable-telemetry=true"
]
}
}
}On Linux/macOS the default --extension-file path is ~/.matlab/agentic-toolkits/simulink/tools/tools.json.
Step 3 — Open MATLAB before using the server
Start MATLAB and wait for it to be ready. The server attaches to the running session (when --matlab-session-mode=existing).
Step 4 — Enable and verify in your agent settings
In your LLM client or VS Code agent settings, enable the MATLAB MCP server. Confirm the server status shows as active before issuing prompts that invoke MATLAB tools.
CLI options
| Option | Values | Default | Description |
| --- | --- | --- | --- |
| --disable-telemetry | true / false | false | Opt out of anonymous MathWorks telemetry |
| --extension-file | path | (see above) | Path to the tools.json extension file |
| --initial-working-folder | path | — | MATLAB startup working folder |
| --initialize-matlab-on-startup | true / false | false | Pre-initialize MATLAB when server starts |
| --log-folder | path | — | Folder for server log files |
| --log-level | debug info warn error | info | Server log verbosity |
| --matlab-display-mode | desktop / nodesktop | desktop | Show or hide the MATLAB desktop |
| --matlab-root | path | (auto-detect) | Specific MATLAB installation root |
| --matlab-session-mode | new / auto / existing | auto | Launch a new MATLAB session, attach to a running one, or try existing first then fall back to new |
| --version | — | — | Print server version |
| --help | — | — | Show usage help |
