-
Notifications
You must be signed in to change notification settings - Fork 0
Home
github-actions[bot] edited this page Mar 22, 2026
·
21 revisions
Welcome to the MATLAB MCP Server wiki! This server connects any AI agent to a shared MATLAB installation via the Model Context Protocol (MCP).
- Installation — Prerequisites, MATLAB Engine API, server setup (Windows one-click installer, macOS/Linux, Docker)
- Configuration — Full YAML config reference with environment variable overrides
- MCP Tools Reference — All built-in tools: code execution, async jobs, discovery, file management, monitoring
-
Custom Tools — Expose your
.mfunctions as AI-callable tools via YAML - Examples — Ready-to-run MATLAB examples: signal processing, Monte Carlo, custom libraries
- Architecture — System design, elastic engine pool, async jobs, session model
- Async Jobs — Long-running jobs, progress reporting, job lifecycle
- Plot Conversion — MATLAB figures to interactive Plotly JSON, style preservation
- Security — Workspace isolation, upload limits, function blocklist
- Troubleshooting — Common issues and solutions
- FAQ — Frequently asked questions
A Python MCP server that gives AI agents (Claude, Cursor, Copilot, custom agents) the ability to:
- Execute MATLAB code — sync for fast commands, auto-async for long-running jobs
- Get interactive plots — MATLAB figures auto-converted to interactive Plotly JSON with full style fidelity
- Discover toolboxes — browse installed toolboxes, functions, and help text
-
Check code quality — run
checkcode/mlintbefore execution -
Manage files — upload data, read scripts, import
.mat/.csv/.json/.xlsxfiles -
Use custom libraries — expose your
.m/.mexfunctions as first-class MCP tools with zero code changes - Scale elastically — 2–10+ MATLAB engines auto-scale based on demand
- Support multiple users — per-user workspace isolation via SSE transport
| Feature | Description |
|---|---|
| Execute MATLAB code | Sync for fast commands, auto-async for jobs >30s |
| Elastic engine pool | Scales 2–10+ engines based on demand |
| Interactive Plotly plots | Line, scatter, bar, area, subplots; line styles, markers, colors preserved |
| Async job management | Long-running simulations, progress reporting, job polling |
| Toolbox discovery | Browse installed toolboxes, functions, help text |
| Code checker | Run checkcode/mlint before execution |
| Multi-user (SSE) | Per-user workspace isolation, shared server |
| Custom tools | Expose .m functions as MCP tools via YAML |
| File I/O | Upload data, read .m scripts, .mat, .csv, .json, .xlsx, images |
| Monitoring | Pool stats, job metrics, server health, error logs |
| One-click Windows install | Offline install.bat — no admin rights, no internet |
| Cross-platform | Windows + macOS, MATLAB R2022b+ |
| Platform | MATLAB Version | Transport | Notes |
|---|---|---|---|
| macOS | R2022b+ | stdio, SSE | Intel & Apple Silicon |
| Windows | R2022b+ | stdio, SSE | 10/11, Python 3.10–3.12 |
| Linux | R2022b+ | stdio, SSE | With MATLAB Engine API installed |
| Docker | R2022b+ | stdio, SSE | Mount your MATLAB installation |
Windows (one-click, no admin):
git clone https://github.com/HanSur94/matlab-mcp-server-python.git
cd matlab-mcp-server-python
install.batmacOS / Linux:
pip install matlab-mcp-python# Single user (stdio) — simplest
matlab-mcp
# Multi-user (SSE) — shared server
matlab-mcp --transport sseAdd to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"matlab": {
"command": "matlab-mcp"
}
}
}