MATLAB MCP Integration MCP Server

MCP server to run MATLAB code from LLM via the Matlab Engine API.

Local serverstdioPython

What is the MATLAB MCP Integration MCP server?

MATLAB MCP Integration MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP server to run MATLAB code from LLM via the Matlab Engine API.

What you get

This is an implementation of a Model Context Protocol (MCP) server for MATLAB. It allows MCP clients (like LLM agents or Claude Desktop) to interact with a shared MATLAB session using the MATLAB Engine API for Python.

  • Execute MATLAB Code: — Run arbitrary MATLAB code snippets via the runMatlabCode tool
  • Retrieve Variables: — Get the value of variables from the MATLAB workspace using the getVariable tool
  • Structured Communication: — Tools return results and errors as structured JSON for easier programmatic use by clients
  • Non-Blocking Execution: — MATLAB engine calls are run asynchronously using asyncio.to_thread to prevent blocking the server
  • Standard Logging: — Uses Python's standard logging module, outputting to stderr for visibility in client logs
  • Shared Session: — Connects to an existing shared MATLAB session

What the assistant can call

Once MATLAB MCP Integration is connected, these are the calls the assistant has available:

  • Non — Blocking Execution:** MATLAB engine calls are run asynchronously using asyncio.to_thread to prevent blocking the server

Configuration and credentials

You will need one environment variable: MY_VAR. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.12 or higher * MATLAB (R2023a or higher recommended - check MATLAB Engine API for Python compatibility) with the MATLAB Engine API for Python installed. * numpy Python package.

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MATLAB MCP Integration's toolset — Non — is a fair guide to whether it matches your workflow. It is maintained by jigarbhoye04; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against MATLAB MCP Integration's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the matlab mcp integration mcp server does with a few real requests.

Available tools

ToolWhat it does
NonBlocking Execution:** MATLAB engine calls are run asynchronously using asyncio.to_thread to prevent blocking the server.

Configuration

  • Python 3.12 or higher * MATLAB (R2023a or higher recommended - check MATLAB Engine API for Python compatibility) with the MATLAB Engine API for Python installed. * numpy Python package.
VariableDescriptionRequired
MY_VARConfiguration value read at startup.Optional

Example prompts to try

  • Use MATLAB MCP Integration to Non.

Frequently asked questions

Python 3.12 or higher, MATLAB (**R2023a or higher recommended**) with the MATLAB Engine API for Python installed, and the `numpy` Python package.