Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MATLAB_MCP_SERVER_HOSTNoHost address for the SSE transport.0.0.0.0
MATLAB_MCP_SERVER_PORTNoPort number for the SSE transport.8765
MATLAB_MCP_POOL_MATLAB_ROOTNoThe root path to the MATLAB installation. If not provided, the server will attempt to auto-detect it.
MATLAB_MCP_POOL_MAX_ENGINESNoHard ceiling for the number of MATLAB engines in the pool.10
MATLAB_MCP_POOL_MIN_ENGINESNoMinimum number of always warm MATLAB engines.2
MATLAB_MCP_SERVER_TRANSPORTNoThe communication transport to use (stdio or sse).stdio
MATLAB_MCP_MONITORING_ENABLEDNoWhether to enable the metrics collector and monitoring dashboard.true
MATLAB_MCP_MONITORING_HTTP_PORTNoThe port used for the monitoring dashboard and health endpoints when using stdio transport.8766
MATLAB_MCP_EXECUTION_SYNC_TIMEOUTNoSeconds before a synchronous code execution is promoted to an asynchronous background job.30

Capabilities

Features and capabilities supported by this server

CapabilityDetails
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

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/HanSur94/matlab-mcp-server-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server