matlab-mcp-server — Claude Code skill: run and check MATLAB
Skill for executing MATLAB code from AI assistants via Model Context Protocol. Lets agents run calculations, assess code quality, and manage MATLAB sessions.
no license 102 installs ★ 9 updated 2026-10-09
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a claude-codeWhat matlab-mcp-server 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.
What it helps with
- 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 for the agent
- 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
How to install matlab-mcp-server
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a claude-code2Manually: put the files in place
~/.claude/skills/matlab-mcp-server/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/matlab-mcp-server/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a codex2Manually: put the files in place
.agents/skills/matlab-mcp-server/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a cursor2Manually: put the files in place
.cursor/skills/matlab-mcp-server/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/mcp-skills skills/matlab-mcp-server2Manually: put the files in place
.github/skills/matlab-mcp-server/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/matlab-mcp-serverManually: put the files in place
.devin/skills/matlab-mcp-server/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about matlab-mcp-server
How do I install matlab-mcp-server in Claude Code?
Run npx skills add reason-machines/mcp-skills --skill matlab-mcp-server -a claude-code, then check ~/.claude/skills/matlab-mcp-server/SKILL.md. Make sure MATLAB R2021a or later is installed and in your system PATH.
What does matlab-mcp-server do?
It's MathWorks' official skill that lets AI agents execute MATLAB code, evaluate expressions, and check code quality via Model Context Protocol. Works with Claude Code, GitHub Copilot, Cursor, and other platforms.
Can I connect to an already-running MATLAB session?
Yes, if you have MATLAB R2023a or later. Run ./matlab-mcp-server --setup-matlab, add shareMATLABSession() to your startup.m, and when installing the skill use the flag --matlab-session-mode=existing.