- Home
- MCP servers
- MATLAB
MATLAB
- javascript
54
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"williamcloudqi-matlab-mcp-server": {
"command": "node",
"args": [
"/path/to/matlab-server/build/index.js"
],
"env": {
"MATLAB_PATH": "/path/to/matlab/executable"
}
}
}
}You can run MATLAB code and generate MATLAB scripts directly through an MCP server that connects MATLAB with AI capabilities. Execute commands, generate executable scripts from natural language, and access MATLAB documentation within your AI conversations to accelerate your work.
How to use
Use this MCP server with an MCP client to execute MATLAB commands, run scripts, or generate new MATLAB code from plain language descriptions. You can have the server return results inline in your chat, save generated or executed scripts for later reuse, and access MATLAB documentation as needed.
How to install
# Prerequisites
- MATLAB must be installed on your system
- Node.js v14 or higher
# 1. Install the package globally
npm install -g matlab-mcp-server
# 2. Build the server (from source if you cloned it)
npm install
npm run build
# Optional for development with auto-rebuild
npm run watch
{
"mcpServers": {
"matlab-server": {
"command": "node",
"args": ["/path/to/matlab-server/build/index.js"],
"env": {
"MATLAB_PATH": "/path/to/matlab/executable"
},
"disabled": false,
"autoApprove": []
}
}
}
Replace /path/to/matlab/executable with the path to your MATLAB executable. Typical defaults:
- Windows:
C:\Program Files\MATLAB\R2023b\bin\matlab.exe - macOS:
/Applications/MATLAB_R2023b.app/bin/matlab - Linux:
/usr/local/MATLAB/R2023b/bin/matlab"}]} ,{
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
This enables Claude Desktop to communicate with the MATLAB MCP Server you configured above. The server is then ready to accept and respond to MATLAB-related requests from your AI assistant.
Additional content
Notes and tips for smooth usage:
- The server runs as a local stdio process. Keep the path to MATLAB and the server script accurate to avoid startup errors.
- You can save generated MATLAB scripts for reuse and reference them in future conversations.
- If you need to debug, you can use the MCP Inspector tooling to inspect interactions and outputs.
Tools and capabilities
This MCP server exposes executable MATLAB code execution and code generation tools that you can call from your AI assistant.
Available tools
execute_matlab_code
Execute MATLAB commands or scripts and return results, with an option to save scripts for future reference.
generate_matlab_code
Generate executable MATLAB code from natural language descriptions, with an option to save the generated scripts.