# matlab-mcp-server

Skill for executing MATLAB code from AI assistants via Model Context Protocol. Lets agents run calculations, assess code quality, and manage MATLAB sessions.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 102 installs · ★ 9 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/matlab-mcp-server/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/matlab-mcp-server

## What it does

matlab-mcp-server bridges MATLAB with AI applications through MCP, exposing three core tools: code execution, expression evaluation, and code quality checks using Code Analyzer. Supports desktop mode and headless operation (`--matlab-display-mode=nodesktop`), can connect to an existing MATLAB session or start a new one.

Requires MATLAB R2021a or later in your system PATH. Configure via command-line flags: set working folder with `--initial-working-folder`, choose session mode with `--matlab-session-mode=existing` to attach to a running MATLAB, or specify the MATLAB root if it's not auto-detected. For MATLAB R2023a and later, run `./matlab-mcp-server --setup-matlab` once, then add `shareMATLABSession()` to your MATLAB startup script to share an existing session.

In CI/CD and cloud scenarios, use headless mode. For local work with graphics, save results to files that the agent can read back.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/matlab-mcp-server/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/matlab-mcp-server/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/matlab-mcp-server/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/matlab-mcp-server/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/mcp-skills skills/matlab-mcp-server
```

2. **Manually: put the files in place**
- File: `.github/skills/matlab-mcp-server/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/matlab-mcp-server
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/matlab-mcp-server/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/matlab-mcp-server/SKILL.md

## When to use it
- Execute MATLAB code directly from agent prompts
- Validate MATLAB scripts for style and errors
- Compute mathematical expressions in a MATLAB session
- Connect AI to a running MATLAB instance
- Automate engineering calculations through AI

## Example prompts
- Write MATLAB code for linear regression on three variables and run it through the analyzer
- Apply a Butterworth filter with 100 Hz cutoff to a time-series signal
- Calculate eigenvalues of `magic(5)` and check the residual

## Similar
- [matlab](https://affpapa.org/en/nevibecode/skills/matlab.md) — skill · 2200 installs
- [MATLAB MCP Server](https://affpapa.org/en/nevibecode/mcp/matlab-mcp-server.md) — MCP server · ★ 1850 repo stars
- [matlab-simulink-tools](https://affpapa.org/en/nevibecode/plugins/matlab-simulink-tools.md) — plugin · ★ 1596 repo stars
- [scientific-toolkit-skill](https://affpapa.org/en/nevibecode/skills/scientific-toolkit-skill.md) — skill · 896 installs
- [kody](https://affpapa.org/en/nevibecode/plugins/kody.md) — plugin · ★ 985 repo stars
- [comsol-multiphysics-modeler](https://affpapa.org/en/nevibecode/skills/comsol-multiphysics-modeler.md) — skill · 1 install

From the same set: [reason-machines/mcp-skills](https://affpapa.org/en/nevibecode/by/reason-machines/mcp-skills.md) — 98 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
