The pylink-square MCP server crashes periodically. Root cause hypothesis: every tool call creates a fresh pylink.JLink(), opens USB, connects, and discards -> repeated DLL load/unload + USB churn in a long-lived process.
Goal:
- Make J-Link Remote Server on localhost (default port 19020) the default connection backend for all scripts in tools/pylink-square-mcp.
- mcp_server.py should launch JLinkRemoteServer (-Port, optional -USB <serial/nickname>) on startup if it is not already listening, then persist across MCP restarts.
Per SEGGER KB (https://kb.segger.com/J-Link_Remote_Server), JLinkRemoteServerCLExe takes -Port and -USB (S/N or nickname) options; device/speed stay client-side in pylink connect(). Client connects via jlink.open(ip_addr='127.0.0.1:').
The pylink-square MCP server crashes periodically. Root cause hypothesis: every tool call creates a fresh pylink.JLink(), opens USB, connects, and discards -> repeated DLL load/unload + USB churn in a long-lived process.
Goal:
Per SEGGER KB (https://kb.segger.com/J-Link_Remote_Server), JLinkRemoteServerCLExe takes -Port and -USB (S/N or nickname) options; device/speed stay client-side in pylink connect(). Client connects via jlink.open(ip_addr='127.0.0.1:').