MCP Directory

How to add MATLAB MCP Server to Claude Desktop

MathWorks' official server that lets agents start MATLAB, write and run code, lint scripts, and execute test files. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 1.1kโ˜… ยท stdio ยท no auth ยท official

Claude Desktop config for MATLAB MCP Server

claude mcp add --transport stdio matlab -- /fullpath/to/matlab-mcp-server-binary
{
  "mcpServers": {
    "matlab-mcp-server": {
      "command": "/fullpath/to/matlab-mcp-server-binary",
      "args": []
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the MATLAB MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm MATLAB MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • MATLAB R2021a or later installed and on the system PATH (releases from the past five years supported)
  • The matlab-mcp-server binary from GitHub Releases (macOS: curl the arm64/x64 build and chmod +x), or `go install github.com/matlab/matlab-mcp-server/cmd/matlab-mcp-server@latest`
  • For attaching to existing sessions: run `./matlab-mcp-server --setup-matlab` once, then `shareMATLABSession()` in MATLAB (R2023a+)
  • Claude Desktop only: the matlab-mcp-server.mcpb bundle plus Anthropic's Filesystem extension

What MATLAB MCP Server can do in Claude Desktop

detect_matlab_toolboxes

Report installed MATLAB version and toolboxes.

check_matlab_code

Read-only static analysis of a .m file: style, potential errors, deprecated functions, performance issues.

evaluate_matlab_code

Evaluate a string of MATLAB code in a project directory and return the output.

run_matlab_file

Execute a .m script by absolute path and return the output.

run_matlab_test_file

Run a MATLAB unit-test file and return comprehensive results.

Security

evaluate_matlab_code and run_matlab_file execute arbitrary code in a local MATLAB session with your user's permissions โ€” MathWorks itself says to review every tool call before approving. Anonymized telemetry is on by default (opt out with --disable-telemetry=true), and usage must follow the MathWorks Software License Agreement: the server must not be shared by multiple users.

MATLAB MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the MATLAB MCP Server config there under the "mcpServers" key and restart the client.

Is MATLAB MCP Server safe to use with Claude Desktop?

evaluate_matlab_code and run_matlab_file execute arbitrary code in a local MATLAB session with your user's permissions โ€” MathWorks itself says to review every tool call before approving. Anonymized telemetry is on by default (opt out with --disable-telemetry=true), and usage must follow the MathWorks Software License Agreement: the server must not be shared by multiple users.

Is the MATLAB MCP Server free?

The server itself is a free download from MathWorks' GitHub, but it is useless without a licensed MATLAB R2021a+ installation โ€” it launches the real product. MathWorks' license also forbids sharing one server across multiple users, so it is strictly a per-developer tool.

Can it use the MATLAB session I already have open?

Yes โ€” that is the default 'auto' mode's first choice. Install the MATLAB MCP Server Toolbox once with ./matlab-mcp-server --setup-matlab, run shareMATLABSession() in your MATLAB (R2023a or newer), and the server attaches to that session instead of starting a new one.

Does it send my code or data to MathWorks?

Your code runs locally in your MATLAB; what MathWorks collects is fully anonymized usage telemetry, enabled by default. Set --disable-telemetry=true (or the MW_MCP_SERVER_DISABLE_TELEMETRY env var) to opt out.

View repo Full MATLAB MCP Server page