Run MATLAB code and simulations from Claude Code

Connect Claude Code to RunMat Desktop and it runs MATLAB code and physics simulations in the Project you have open. Each run appears in the app.

Find the first natural frequency of this tuning fork and show the mode shape.

Running a modal study in RunMat

The first natural frequency is 366 Hz, with the steel fork fixed at the end of its stem. In this mode both tines sway to the same side, moving most at the tips. Want me to solve more modes to find the one where they move in opposition?

When to use it

Use it when the answer has to come from running something: your team's MATLAB code, a large calculation, or a simulation of a part.

  1. 01

    Your MATLAB code

    Point Claude Code at a script or a Project, and it runs the code as written, with more than 2,100 builtins and the full core language and no MATLAB install. When it fails, Claude Code reads the error, fixes the code and runs it again.

  2. 02

    Math at GPU speed

    Array math runs on the GPU and sweeps run in parallel, so one answer can cover 10 million samples or 10,000 design cases.

  3. 03

    Simulations of your parts

    Give it your CAD file (STEP, IGES or BREP) and Claude Code sets up the study: material, loads, supports and mesh. RunMat solves it and shows stress, temperature or mode shapes on the part.

Claude Code works on the files in the Project open in RunMat Desktop, and each run is saved there, so the next session picks up the same files.

What you can ask for

“Find the first natural frequency of this tuning fork and show the mode shape.”

A modal study on the part, with the mode shape in 3D.

“Here's my steel wall hook. Hang 2 kN from the hook seat with the three mounting holes fixed. What's the maximum deflection, and the mean von Mises stress in the two hook corner fillets?”

Steel wall hook under a 2 kN hanging load, colored by displacement magnitude from 0 to 0.0159 mm
A structural study on the hook's CAD geometry. Maximum deflection is 0.0159 mm, the mounting holes react the full 2,000 N, and the mean von Mises stress in the corner fillets is 10.2 MPa.

“Price this option with 10 million Monte Carlo paths on my GPU and check it against Black-Scholes.”

price_option.m
% 10 million price paths; RunMat runs the array math on the GPU
S0 = 100; K = 105; r = 0.03; sigma = 0.2; T = 1;
Z = randn(1e7, 1);
ST = S0 * exp((r - sigma^2/2)*T + sigma*sqrt(T)*Z);
price = exp(-r*T) * mean(max(ST - K, 0));
fprintf("Call price: %.2f\n", price);
output
Call price: 7.13
RunMat runs the array math on the GPU, on NVIDIA, AMD, Intel or Apple hardware, with no GPU code. The result matches the closed-form price of 7.13.

“Sweep 10,000 combinations of damping and stiffness across all my cores and find the worst case.”

sweep_damping.m
[Z, K] = ndgrid(linspace(0.05, 0.5, 200), ...
linspace(10, 500, 50));
t = linspace(0, 20, 4001);
peak = zeros(size(Z));
parfor n = 1:numel(Z)
wn = sqrt(K(n)); wd = wn*sqrt(1 - Z(n)^2);
peak(n) = max(abs(exp(-Z(n)*wn*t) .* sin(wd*t) / wd));
end
[pmax, i] = max(peak(:));
fprintf("Worst case: %.3f m (zeta %.2f, k %.0f N/m)\n", ...
pmax, Z(i), K(i));
output
Worst case: 0.293 m (zeta 0.05, k 10 N/m)
RunMat's parfor spreads the cases across every core on the machine, or across a cluster, from the same code.

Connecting Claude Code

Claude Code

  1. 1Install RunMat Desktop, sign in and open your Project.
  2. 2In Settings › Connections, under On this computer, choose Connect next to Claude Code. This installs the RunMat plugin.
  3. 3Restart Claude Code, enter /mcp and confirm the runmat server is connected.
  4. 4The first time Claude Code works in the Project, choose Allow while this project is open or Always allow in Connected agents.

Claude Code reaches RunMat while RunMat Desktop is open, and runs appear in the app.

Full setup guide

Plans and usage

Running code with RunMat is included in the Free plan, with no monthly cap. You can start up to 120 runs an hour, 5 at a time. Installing, signing in, reading files and reopening a plot don't count as runs.

Usage and limitsPricing

Works in
Claude Code, RunMat Desktop
Made by
RunMat
Price
Included with RunMat Free

Setup guideHow RunMat Agent worksTroubleshooting

Run MATLAB code and simulations from Claude Code