Connect RunMat to any MCP client

Add the RunMat MCP server to an AI tool that supports MCP and it can run MATLAB code and physics simulations, read and edit Project files, inspect variables and return figures. RunMat Desktop serves the tools on your computer while it's open.

Plot the Bode response of a second-order low-pass filter with a natural frequency of 10 rad/s and mark its -3 dB bandwidth.

Running code in RunMat

The gain falls 3 dB at 9.99 rad/s, right at the natural frequency, as expected with damping of 1/√2.

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

    The client can run scripts and Project files as written, with more than 2,100 builtins and the full core language and no MATLAB install, then read the errors, fix the code and run 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

    The client can set up a study on a CAD file (STEP, IGES or BREP), with material, loads, supports and mesh, and RunMat solves it and returns stress, temperature or mode shapes.

The client works in the Projects open in RunMat Desktop on the same computer, and runs appear in the app. Sign-in, permissions and usage limits are handled by RunMat.

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 a client

RunMat Desktop

  1. 1Install RunMat Desktop, sign in and open your Project.
  2. 2Add a server named runmat with transport Streamable HTTP and URL http://127.0.0.1:47862/mcp.
  3. 3Send the header Authorization: Bearer <token>, reading the token from ~/.runmat/mcp-headers.json when the client starts.
  4. 4Restart the client and confirm the runmat tools are listed.

The first time a tool works in a Project, RunMat asks in Connected agents: Allow while this project is open, or Always allow.

RunMat Desktop (Streamable HTTP)
{
  "mcpServers": {
    "runmat": {
      "type": "http",
      "url": "http://127.0.0.1:47862/mcp",
      "headers": { "Authorization": "Bearer <token from ~/.runmat/mcp-headers.json>" }
    }
  }
}

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
Streamable HTTP, RunMat Desktop on your computer
Made by
RunMat
Price
Included with RunMat Free

Setup guideHow RunMat Agent worksTroubleshooting

Connect RunMat to any MCP client