Skip to content

--initialize-matlab-on-startup false is ignored, MATLAB always starts immediately #88

Description

@KaisvenZ

Describe the bug The matlab-mcp-core-server ignores the --initialize-matlab-on-startup false command-line argument and always initializes MATLAB on startup (internally treating it as true).

Environment

matlab-mcp-core-server version: v0.10.0
MATLAB version: R2025a
Operating System: macOS (Darwin 27.0.0, Apple Silicon)
AI Agent: Claude Code (VS Code extension 2.1.170)
To Reproduce

Configure MCP server with --initialize-matlab-on-startup false:

Code
· json
{
"matlab": {
"command": "/Users/kaisven/.matlab/agentic-toolkits/bin/matlab-mcp-core-server",
"args": [
"--matlab-root", "/Applications/MATLAB_R2025a.app",
"--matlab-display-mode", "desktop",
"--initialize-matlab-on-startup", "false"
]
}
}
Start the MCP server (e.g., by opening Claude Code)

Observe that MATLAB desktop automatically launches

Expected behavior With --initialize-matlab-on-startup false, MATLAB should NOT start until the first MCP tool is called.

Actual behavior MATLAB desktop launches immediately when the MCP server starts, despite the false argument.

Evidence

Command line shows false:

Code
ps aux | grep matlab-mcp-core-server
.../matlab-mcp-core-server --matlab-root /Applications/MATLAB_R2025a.app --matlab-display-mode desktop --initialize-matlab-on-startup false
Server internal configuration shows true (from server logs):

Code
· json
{
"time": "2026-06-10T16:46:55.846793+08:00",
"level": "INFO",
"msg": "Configuration state",
"InitializeMATLABOnStartup": true,
"MATLABDisplayMode": "desktop",
...
}
Impact

Multiple MATLAB instances accumulate when using different AI agents
MATLAB window steals focus repeatedly, disrupting workflow
System resources consumed by unnecessary MATLAB processes
Additional context

The issue occurs consistently across restarts
Both Claude Code (~/.claude.json) and Claude Desktop (claude_desktop_config.json) configurations are affected
No reliable workaround available

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA request for new functionality or an improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions