Atlas / MCP servers / tsuchijo / Matlab

MatlabSAFE

mcp/tsuchijo/matlab

Model Context Protocol server to let LLMs write and execute matlab scripts

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
4 1r · 3w · 0d
Transport
stdio
License
—
Stars
40
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

This Model Context Protocol (MCP) server provides integration with MATLAB, allowing you to create and execute MATLAB scripts and functions through Claude or other MCP clients.

Setup Requirements

  • Python 3.11 (Python 3.13 and 3.12 are not currently supported by MATLAB Engine)
  • MATLAB R2024a (or compatible version)
  • uv package manager

Installation

  1. Create and set up the Python environment:
# Pin Python version
uv python pin 3.11

# Create virtual environment
uv venv

# Activate virtual environment
source .venv/bin/activate

# Install MCP
uv add "mcp[cli]"
  1. Install MATLAB Engine

The MATLAB Engine will be installed automatically when the server first runs, using the MATLAB installation specified in the MATLAB_PATH environment variable.

Directory Structure

  • matlab_server.py: The main MCP server implementation
  • matlab_scripts/: Directory where all MATLAB scripts and functions are saved (created automatically)
  • pyproject.toml: Python project configuration
  • .python-version: Specifies Python version for uv

Claude Desktop Integration

  1. Open your Claude Desktop configuration:
# On macOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the MATLAB server configuration:
{
"mcpServers": {
"matlab": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/matlab-mcp",
"run",
"matlab_server.py"
],
"env": {
"MATLAB_PATH": "/Applications/MATLAB_R2024a.app"
}
}
}
}

Make sure to:

  • Replace /absolute/path/to/matlab-mcp with the actual path to your project directory
  • Verify the MATLAB_PATH points to your MATLAB installation
  • Use absolute paths (not relative)

Features

The server provides several tools:

  1. create_matlab_script: Create a new MATLAB script file
  2. Scripts are saved
Read from source at commit 6dc7530395b7OBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add matlab-mcp -- uvx matlab-mcp
claude-desktop
{
  "mcpServers": {
    "matlab-mcp": {
      "command": "uvx",
      "args": [
        "matlab-mcp"
      ]
    }
  }
}
03

Exposed tools (4)

1 read · 3 write · 0 destructive.

ToolRiskDescription
call_matlab_functionreadCall a MATLAB function with arguments.
create_matlab_functionwriteCreate a new MATLAB function file.
create_matlab_scriptwriteCreate a new MATLAB script file.
execute_matlab_scriptwriteExecute a MATLAB script and return results.
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (4 observation(s))
Network
none-observed
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (1)

LOWInventory / provenance · inv.no_license · CWE-1104
Why it matters. no LICENSE file and no repo licence
Fix. add a licence

Gates applied: no_behavioural_pass, no_license.

Audited 2026-10-08 · audit v0.4.1 · source sha 6dc7530395b7full audit observations/trust-audit/mcp-server/tsuchijo__matlab.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-086dc7530395b7SAFEB89first audit
06

Questions

What is the Matlab MCP server?

Model Context Protocol server to let LLMs write and execute matlab scripts

What tools does Matlab expose?

4 in total: 1 read-only, 3 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Matlab safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does Matlab need?

No credential environment variables were found in its source, so it appears to need none.

How does Matlab run?

It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as matlab-mcp.

How current is this page?

The grade is for one exact copy of the source (6dc7530395b7), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement