Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

matlab-mcp-server

MCP.Pizza Chef: WilliamCloudQi

The MATLAB MCP server integrates MATLAB's scientific computing and data analysis capabilities with AI assistants. It enables users to execute MATLAB code, generate MATLAB scripts from natural language descriptions, and access MATLAB documentation directly within conversations. This server streamlines workflows by allowing real-time MATLAB code execution and script generation, enhancing productivity for data scientists, engineers, and researchers.

Use This MCP server To

Execute MATLAB code snippets within AI conversations Generate MATLAB scripts from natural language instructions Access MATLAB documentation via URI links Save and reuse MATLAB scripts generated or executed Run complex scientific computations interactively Integrate MATLAB workflows into AI-driven applications

README

MATLAB MCP Server

GitHub Logo

A powerful MCP server that integrates MATLAB with AI, allowing you to execute MATLAB code, generate MATLAB scripts from natural language descriptions, and access MATLAB documentation directly through your AI assistant.

Features

Resources

  • Access MATLAB documentation via matlab://documentation/getting-started URI
  • Get started guide with examples and usage instructions

Tools

  • execute_matlab_code - Execute MATLAB code and get results

    • Run any MATLAB commands or scripts
    • Option to save scripts for future reference
    • View output directly in your conversation
  • generate_matlab_code - Generate MATLAB code from natural language

    • Describe what you want to accomplish in plain language
    • Get executable MATLAB code in response
    • Option to save generated scripts

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Requirements

  • MATLAB installed on your system
  • Node.js (v14 or higher)

Installation

1. Install the package

npm install -g matlab-mcp-server

Or clone the repository and build it yourself:

git clone https://github.com/username/matlab-mcp-server.git
cd matlab-mcp-server
npm install
npm run build

2. Configure cline to use the server

To use with cline , add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "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:

  • Windows: Usually C:\\Program Files\\MATLAB\\R2023b\\bin\\matlab.exe
  • macOS: Usually /Applications/MATLAB_R2023b.app/bin/matlab
  • Linux: Usually /usr/local/MATLAB/R2023b/bin/matlab

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

matlab-mcp-server FAQ

How do I execute MATLAB code using this MCP server?
Use the 'execute_matlab_code' tool to run MATLAB commands or scripts and view results directly in your conversation.
Can I generate MATLAB code from plain English descriptions?
Yes, the 'generate_matlab_code' tool converts natural language instructions into executable MATLAB scripts.
Is it possible to save MATLAB scripts for later use?
Yes, both executed and generated MATLAB scripts can be saved for future reference.
How do I access MATLAB documentation through this server?
Access MATLAB documentation using the 'matlab://documentation/getting-started' URI provided by the server.
What kind of MATLAB commands can I run?
You can run any MATLAB commands or scripts supported by your MATLAB environment, including complex scientific computations.
Does this server support integration with multiple AI models?
Yes, it is designed to work with various AI providers like OpenAI, Claude, and Gemini, enabling flexible AI integration.
What are the installation requirements for this MCP server?
You need Node.js and MATLAB installed; dependencies are installed via npm as per the GitHub instructions.
Can this server be used for educational purposes?
Absolutely, it helps students and educators execute and generate MATLAB code interactively within AI conversations.