Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MATLAB_MCP_SERVER_HOST | No | Host address for the SSE transport. | 0.0.0.0 |
| MATLAB_MCP_SERVER_PORT | No | Port number for the SSE transport. | 8765 |
| MATLAB_MCP_POOL_MATLAB_ROOT | No | The root path to the MATLAB installation. If not provided, the server will attempt to auto-detect it. | |
| MATLAB_MCP_POOL_MAX_ENGINES | No | Hard ceiling for the number of MATLAB engines in the pool. | 10 |
| MATLAB_MCP_POOL_MIN_ENGINES | No | Minimum number of always warm MATLAB engines. | 2 |
| MATLAB_MCP_SERVER_TRANSPORT | No | The communication transport to use (stdio or sse). | stdio |
| MATLAB_MCP_MONITORING_ENABLED | No | Whether to enable the metrics collector and monitoring dashboard. | true |
| MATLAB_MCP_MONITORING_HTTP_PORT | No | The port used for the monitoring dashboard and health endpoints when using stdio transport. | 8766 |
| MATLAB_MCP_EXECUTION_SYNC_TIMEOUT | No | Seconds before a synchronous code execution is promoted to an asynchronous background job. | 30 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tasks | {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
},
"prompts": {
"get": {}
},
"resources": {
"read": {}
}
}
} |
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| execute_code | Execute MATLAB code. Runs the given MATLAB code string in the session's engine. Returns a result dict with status, job_id, output, variables, etc. |
| check_code | Lint MATLAB code using checkcode/mlint. Writes the code to a temporary file and runs mcp_checkcode() on it, returning a list of issues (line, column, message, severity). |
| get_workspace | Get workspace variables for the current session. Runs 'whos' in MATLAB and returns the result. |
| get_job_status | Get the status of a MATLAB execution job. Returns status, timing info, and optional progress (from .progress file) for running jobs. |
| get_job_result | Get the full result of a completed MATLAB execution job. Returns the result dict for completed jobs, or the error dict for failed jobs. |
| cancel_job | Cancel a pending or running MATLAB execution job. Attempts to cancel the underlying MATLAB future and marks the job as cancelled in the tracker. |
| list_jobs | List all jobs for the current session. Returns a list of job summaries including status and timing. |
| list_toolboxes | List available MATLAB toolboxes. Runs 'ver' in MATLAB and returns the output along with toolbox configuration info. |
| list_functions | List functions in a MATLAB toolbox. Runs 'help <toolbox_name>' in MATLAB and returns the output. |
| get_help | Get help text for a MATLAB function. Runs 'help <function_name>' in MATLAB and returns the documentation. |
| upload_data | Upload a data file to the session's temporary directory. The file content should be base64-encoded. The file is written to the session temp dir and can be accessed from MATLAB code. |
| delete_file | Delete a file from the session's temporary directory. Only files in the session temp directory can be deleted. |
| list_files | List files in the session's temporary directory. Returns names, sizes, and paths for all files in the session temp dir. |
| read_script | Read a MATLAB .m script file from the session's temporary directory. Returns the file content as text. Use list_files to see available files. |
| read_data | Read a data file (.mat, .csv, .json, .txt, .xlsx) from the session temp directory. For .mat files, 'summary' mode shows variable names/sizes/types via MATLAB, 'raw' mode returns base64-encoded content. Text files return inline content. |
| read_image | Read an image file (.png, .jpg, .gif) from the session temp directory. Returns the image as an inline content block that renders in agent UIs. |
| get_pool_status | Get the current status of the MATLAB engine pool. Returns the total, available, busy, and max engine counts. |
| get_server_metrics | Get comprehensive server metrics including pool, jobs, sessions, and system stats. |
| get_server_health | Get server health status with issue detection. Returns healthy/degraded/unhealthy. |
| get_error_log | Get recent server errors and notable events for diagnosing issues. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |