MATLAB MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with the ability to execute MATLAB code, create scripts and functions, and interact with MATLAB's computational environment.
Features
- 🔧 Create and execute MATLAB scripts and functions
- 📊 Capture MATLAB figures and visualizations
- 📝 Open MATLAB editor for script editing
- 🔍 Access workspace variables and outputs
- 🚀 Seamless integration with AI assistants via MCP
Installation
Using uvx (Recommended)
uvx matlab-mcp
Using pip
pip install matlab-mcp
Prerequisites
- MATLAB installation (R2024a or later recommended)
- Python 3.11 or later
- MATLAB Engine for Python (automatically installed if missing)
Configuration
Claude Desktop
Add the following to your Claude Desktop config file:
{
"mcpServers": {
"matlab": {
"command": "uvx",
"args": ["matlab-mcp"],
"env": {
"MATLAB_PATH": "/path/to/your/matlab/installation"
}
}
}
}
Environment Variables
Set the MATLAB_PATH environment variable to your MATLAB installation directory:
- Windows:
C:\Program Files\MATLAB\R2024a - macOS:
/Applications/MATLAB_R2024a.app - Linux:
/usr/local/MATLAB/R2024a
Available Tools
create_matlab_script(script_name, code)- Create a new MATLAB scriptcreate_matlab_function(function_name, code)- Create a new MATLAB functionexecute_matlab_script(script_name, args)- Execute a MATLAB scriptcall_matlab_function(function_name, args)- Call a MATLAB functionopen_matlab_editor(script_name)- Open MATLAB editor for a script
Example Usage
Ask your AI assistant to:
- "Create a MATLAB script that plots a sine wave"
- "Execute the MATLAB script with custom parameters"
- "Create a function to calculate the mean of an array"
- "Open the MATLAB editor to review the script"
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for matlab-mcp 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| matlab_mcp-0.1.4.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matlab_mcp-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / matlab_mcp-0.1.4.tar.gz
| Download URL | matlab_mcp-0.1.4.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40d155c216aa7300ffd95964a1a0de82208d9fef011aafe2c4f303ce5377d11b
|
|
BLAKE2b-256 checksum How to use checksums |
ab1f9743f2f964e8286a23e683aa829525e52f1b87e7fee95471fbb98ce95069
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / matlab_mcp-0.1.4-py3-none-any.whl
| Download URL | matlab_mcp-0.1.4-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e2cd9b56cbac66f1daae52f3df4a679b68b0b320b2a4e083e475c892df7c5c2
|
|
BLAKE2b-256 checksum How to use checksums |
302b36366be71c09996c058c662d811b6c65fe8e8186ae899f24912337317ae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for matlab-mcp 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.