Skip to content

Error in setupAgenticToolkit - Write Permission missleading #26

@DaBe-gh

Description

@DaBe-gh

Bug Report

I wanted to update my agentic toolkit to the latest release, but got the following error-message:


setupAgenticToolkit("install")

MathWorks Agentic Toolkit Setup — Install
—————————————————————————————————————————

Detected:
Platform: Windows x86_64
MATLAB: R2023b (C:\Program Files\MATLAB_R2023b_x64)

Select toolkits to install:
1. MATLAB Agentic Toolkit
2. Simulink Agentic Toolkit
3. Both

Select: 3

Plan:
- Download the MATLAB Agentic Toolkit
- Download the Simulink Agentic Toolkit

Proceed? [Y/n]: y
Warning: File not found or permission denied

In setup.downloadMCPBinary
In setupAgenticToolkit
In setupAgenticToolkit
Downloading MATLAB MCP Server v0.9.2 for Windows x86_64...
Error using setup.downloadMCPBinary
Download failed:
Unable to open output file: 'C:\Users\xxx.matlab\agentic-toolkits\bin\matlab-mcp-core-server.exe' for writing. Common reasons include that the file exists and does not have write
permission or the folder does not have write permissions.

Try downloading manually from:
https://github.com/matlab/matlab-mcp-core-server/releases

Error in setupAgenticToolkit

Error in setupAgenticToolkit


Analysis and fix by github copilot:
The issue was not missing write permissions. The existing matlab-mcp-core-server.exe was already in use by one or more running MCP server processes, so the installer could not overwrite it.

Use this procedure on Windows:

Close any tools that may be using the MATLAB MCP server.
This usually means VS Code, Copilot sessions, or any other agent host connected to MATLAB.

Open PowerShell.

Check whether the MCP server is still running: Get-Process matlab-mcp-core-server | Select-Object Id,ProcessName,Path
Stop the running MCP server processes: Stop-Process -Name matlab-mcp-core-server -Force
Run the MATLAB installer again: setupAgenticToolkit("install")

Why this works:
The target folder was writable.
The installer error message was misleading.
The actual problem was that matlab-mcp-core-server.exe was locked by a running process.

I would expect the installer to handle this and to receive a prompt before any running processes are being closed

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    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