When Claude CLI starts the Laputa MCP server, it crashed immediately because startUiBridge() tried to bind port 9711 which is already held by the running Laputa app. The unhandled EADDRINUSE error killed the process, making all Laputa MCP tools unavailable to Claude Code in AI Chat. Fix: - Make startUiBridge() async, return Promise<WebSocketServer|null> - Handle 'error' event on HTTP server: EADDRINUSE resolves to null instead of crashing - Guard broadcastUiAction() with 'if (!uiBridge) return' for graceful no-op - In ws-bridge.js main: chain startUiBridge().then(() => startBridge()) All vault tools (read/write/search) now work via stdio MCP when port is busy.
11 KiB
11 KiB