MATLAB Workflow MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MATLAB Workflow MCP Serverrun the UAV path planning experiment"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MATLAB MCP Server
跨平台 MATLAB 远程实验执行服务。在 Mac 端通过 Qoder/QoderWork 用自然语言驱动 Windows 端 MATLAB 执行 UAV 路径规划实验。
架构
Mac (Qoder IDE) Windows (MATLAB R2022b)
┌───────────────────┐ ┌──────────────────────────────┐
│ MCP Client (HTTP)│ ─── Tailscale ──►│ matlab_mcp_server.py │
│ Syncthing │ ◄── P2P Sync ───►│ 子进程池 + matlab -batch │
│ Git │ │ 17 个 MCP 工具 │
└───────────────────┘ └──────────────────────────────┘执行层: 子进程池 +
matlab -batch(Streamable HTTP, :8080),独立进程真正并行,无持久 Engine 会话同步层: Syncthing P2P (:22000),代码实时双向同步
网络层: Tailscale (WireGuard),局域网/公网自动切换
Related MCP server: ssh-mcp-server
快速开始
Windows 端
# 1. 安装依赖(无需 MATLAB Engine API)
pip install -r requirements.txt
# 2. 修改 .env 配置(MATLAB_WORKING_DIR、PYTHON_PATH、MCP_TOKEN 等)
# matlab 需在 PATH 中,或通过 .env 的 MATLAB_EXE 指定
# 3. 启动服务
python matlab_mcp_server.py
# 或双击 start_server.batMac 端 (Qoder MCP 配置)
{
"mcpServers": {
"matlab": {
"type": "http",
"url": "http://100.x.y.z:8080/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}认证仅走请求头
Authorization: Bearer,不支持 query 参数携带 token。
工具清单 (17 个)
类别 | 工具 | 说明 |
执行 |
| 执行代码(自动捕获图形,含耗时统计) |
执行 |
| 运行 .m 脚本或指定段落 |
执行 |
| 提交异步后台任务(>30分钟实验) |
实验 |
| 参数化实验 + raw_code 双模式 |
任务 |
| 后台任务生命周期管理 |
历史 |
| 查看已完成任务历史记录 |
工作区 |
| 查看 .m 脚本/工作区变量/struct 结构 |
图形 |
| 导出图形 |
文件 |
| 文件传输与管理 |
质量 |
| MATLAB checkcode 静态检查 |
诊断 |
| 系统诊断(quick/full) |
管理 |
| 同步状态检查 |
工具选择指南
实验时长 | 推荐工具 |
< 10 分钟 |
|
10 - 30 分钟 |
|
> 30 分钟 |
|
论文标准实验 |
|
项目结构
├── matlab_mcp_server.py # 主服务(17 个 MCP 工具,~1150 行)
├── mcp_run_experiment.m # MATLAB 实验执行器(含 manifest + 种子管理)
├── cleanup_and_start.py # 安全启动器(清理残留的 matlab -batch 进程)
├── config.py # 配置兜底(.env 为唯一权威)
├── .env # 环境变量配置(唯一权威,不入库)
├── requirements.txt # Python 依赖
├── test_smoke.py # 冒烟测试(调度器/认证/路径沙箱)
│
├── start_server.bat # Windows 快速启动
├── install_service.bat # NSSM 服务安装(开机自启)
├── setup_firewall.ps1 # Windows 防火墙配置
├── setup_syncthing_mac.sh # Mac Syncthing 配置
├── setup_syncthing_win.ps1 # Windows Syncthing 配置
├── sync_and_run.sh # Mac 一键同步+运行
├── fetch_results.sh # Mac 结果拉取
├── test_connection.py # 连接测试
│
├── DEPLOYMENT_GUIDE.md # 部署操作手册(16 章)
├── SOLUTION_REPORT.md # 方案讲解报告
├── .qoder/skills/ # Qoder AI Skill(工具选择指导)
└── .gitattributes # Git LFS 配置配置优先级
.env 文件为唯一权威配置源,config.py 仅作兜底默认值。
关键配置项(在 .env 中设置):
变量 | 默认值 | 说明 |
|
| MATLAB 工作目录 |
|
| 监听地址 |
|
| 监听端口 |
| (空) | Bearer Token 认证(强烈建议设置) |
|
| 默认执行超时(秒) |
|
| 最大并发 MATLAB 进程数 |
|
| 最大排队任务数 |
|
| CPU 拒绝阈值 (%) |
|
| 内存拒绝阈值 (%) |
|
| 磁盘警告阈值 (%) |
| 脚本目录\logs | 日志输出目录 |
技术栈
Python 3.9+(无需 MATLAB Engine API)
MCP SDK (FastMCP) + Streamable HTTP transport
Tailscale (WireGuard) + Syncthing
NSSM (Windows 服务) + Git LFS
运行测试
python test_smoke.py # 冒烟测试(含调度器/认证/路径沙箱)
python test_connection.py --token YOUR_TOKEN # 连接测试(真实握手)文档
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceIntegrates MATLAB with AI to execute code, generate scripts from natural language, and access MATLAB documentation seamlessly.255Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI assistants to securely execute remote SSH commands, perform file transfers, and monitor system status through a standardized interface. It features robust security controls including command whitelisting, blacklisting, and credential isolation to prevent unauthorized operations.1022MIT
- AlicenseAqualityAmaintenanceMCP server that connects any AI agent to MATLAB — execute code, async jobs, interactive Plotly plots, custom tools, and monitoring dashboard205MIT
- Alicense-qualityBmaintenanceEnables AI assistants to control MATLAB Simulink models through natural language, providing tools for model creation, block management, wiring, simulation, and more via a local MCP backend.3MIT
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/will-bw/matlab-workflow-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server