Skip to content

Matlab mcp failed to connect in terminal-in-matlab, but successfully connects outside Matlab in PowerShell or CMD #108

Description

@aaortizb

Description

I have shareMATLABSession() in startup.m. I open a terminal in matlab commnad window:

t = terminal()

In the terminal in matlab:

D:\NICETOOLS>claude mcp list

I get this:

claude.ai Google Drive: https://drivemcp.googleapis.com/mcp/v1 - ✔ Connected claude.ai Gmail: https://gmailmcp.googleapis.com/mcp/v1 - ✔ Connected claude.ai Google Calendar: https://calendarmcp.googleapis.com/mcp/v1 - ✔ Connected codebase-memory-mcp: C:/Users/Alejandro/.local/bin/codebase-memory-mcp.exe - ✔ Connected matlab: C:\Users\Alejandro\.matlab\agentic-toolkits\bin\matlab-mcp-server.exe --matlab-root=C:\Program Files\MATLAB\R2026a --initialize-matlab-on-startup=true --log-folder=C:\Users\Alejandro\matlab-mcp-server-logs - ✘ Failed to connect

Now, in a CMD terminal outside Matlab:

D:\NICETOOLS>claude mcp list

I get this:

claude.ai Google Drive: https://drivemcp.googleapis.com/mcp/v1 - √ Connected claude.ai Gmail: https://gmailmcp.googleapis.com/mcp/v1 - √ Connected claude.ai Google Calendar: https://calendarmcp.googleapis.com/mcp/v1 - √ Connected codebase-memory-mcp: C:/Users/Alejandro/.local/bin/codebase-memory-mcp.exe - √ Connected matlab: C:\Users\Alejandro\.matlab\agentic-toolkits\bin\matlab-mcp-server.exe --matlab-root=C:\Program Files\MATLAB\R2026a --initialize-matlab-on-startup=true --log-folder=C:\Users\Alejandro\matlab-mcp-server-logs - √ Connected

So, matlab mcp does not connect in the terminal inside Matlab, but successfully connects in a terminal outside Matlab. Why is this behavior?

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions