-
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 from PyPI, Docker)
- Configuration — Full YAML config reference with all options
- MCP Tools Reference — All 20+ built-in tools with parameters and examples
-
Custom Tools — Expose your own
.mfunctions as AI-callable tools - Examples — Ready-to-run MATLAB examples for common tasks
- Architecture — System design, engine pool, async jobs, session model
- Async Jobs — Long-running jobs, progress reporting, job lifecycle
- Plotly Conversion — Interactive figure rendering, style fidelity, supported plot types
- Security — Function blocklist, workspace isolation, upload limits
- 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, async for long-running jobs
- Discover toolboxes — browse installed toolboxes, functions, and help text
-
Check code quality — run
checkcode/mlintbefore execution - Get interactive plots — figures auto-converted to interactive Plotly JSON with full style preservation
-
Use custom libraries — expose your
.m/.mexfunctions as first-class MCP tools - Run long simulations — hours-long jobs with progress reporting, while the agent keeps working
| Feature | Description |
|---|---|
| Execute MATLAB code | Sync for fast commands, auto-async for long jobs (30s default threshold) |
| Elastic engine pool | Scales 2-10+ engines based on demand |
| Toolbox discovery | Browse installed toolboxes, functions, help text |
| Code checker | Run checkcode/mlint before execution |
| Interactive Plotly plots | Figures auto-converted to Plotly JSON with line styles, markers, colors, legends, subplots |
| Multi-user (SSE) | Session isolation with per-user workspaces |
| Custom tools | Expose your .m functions as MCP tools via YAML |
| Progress reporting | Long jobs report percentage back to the agent |
| Cross-platform | Windows + macOS, MATLAB R2022b+ |
| One-click Windows install | Offline install.bat — no admin rights needed |
| Platform | MATLAB Version | Transport | Notes |
|---|---|---|---|
| macOS | R2022b+ | stdio, SSE | Full support |
| Windows 10/11 | R2022b+ | stdio, SSE | One-click installer available |
| Linux | R2022b+ | stdio, SSE | Docker support |
Windows (one-click):
git clone https://github.com/HanSur94/matlab-mcp-server-python.git
cd matlab-mcp-server-python
install.batmacOS / Linux:
pip install matlab-mcp-python
matlab-mcpConnect to Claude Desktop:
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"matlab": {
"command": "matlab-mcp"
}
}
}