Skip to content

MATLABDisplayMode: desktop is ignored when MATLABSessionMode: auto spawns a new session #104

Description

@JWinawer

Setting MATLABDisplayMode to desktop in the extension config (confirmed correct in the settings JSON, and the matlab-mcp-server process itself relaunches with --matlab-display-mode desktop on its command line) does not change the MATLAB process it spawns -- the spawned MATLAB_maca64 process still includes -nodesktop on its command line.

Steps to reproduce:

  1. Set MATLABDisplayMode: desktop in the extension's user config (with MATLABSessionMode: auto, the default).
  2. Kill the currently-running MATLAB process spawned by the extension.
  3. Call any tool (e.g. evaluate_matlab_code) to trigger a fresh session.
  4. Inspect the newly-spawned MATLAB_maca64 process's command line (e.g. via ps aux on macOS).

Expected: MATLAB launches without -nodesktop, i.e. with a full interactive desktop, so figure windows persist normally for the user to view.

Actual: MATLAB still launches with -nodesktop regardless of the desktop setting. As a result, figures created via run_matlab_file or evaluate_matlab_code are captured as screenshots for the AI but are not reliably visible/persistent for the human user on screen (consistent with nodesktop mode's documented "capture outputs like figures" design in the v0.5.0 changelog, which should not apply when desktop mode is explicitly requested).

Environment:

  • matlab-mcp-server version: v0.11.1 (issue also suspected present in v0.11.2)
  • macOS, MATLAB R2026a
  • MATLABSessionMode: auto

Workaround: none found short of MATLABSessionMode: existing with a manually-launched, manually-shared MATLAB session

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageThis issue is awaiting review by the teamwaiting-for-infoWe need more information from the reporter to proceed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions