How to fix "Client closed" / "Sending message to client: undefined" in cursor-talk-to-figma-mcp?
In cursor-talk-to-figma-mcp, running
bun starton Windows starts a WebSocket server on port 3055, but after a client connects and sends a join message, the server logsSending message to client: undefinedand the client closes with the "Clinet closed" error from the issue title. No tool version was specified in the report. What causes this, and how can it be fixed?Originally asked on GitHub: https://github.com/grab/cursor-talk-to-figma-mcp/issues/18
3 answers
Status: the issue is closed as COMPLETED. The workaround confirmed in the thread is a full restart of Cursor, not a code change.
Reproduction from the report: on Windows,
bun startrunsbun run src/socket.ts, which starts the WebSocket server on port 3055. After a client connects and sends{"type":"join","channel":"sa31xant"}, the server logsSending message to client: undefined— the symptom behind the "Clinet closed" error in the issue title.Fix confirmed in the thread: close every open Cursor instance completely and reopen Cursor, then re-run the connection. The user who suggested this said it "seemed to fix the issue," and a second user explicitly confirmed it ("You are right."). The thread does not explain the root cause, so there is no server-side patch to apply.
General advice if a full restart does not help: end leftover Cursor processes in Task Manager, confirm nothing else is listening on port 3055, and re-run
bun start.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran
bun starton Windows (which runsbun run src/socket.ts). The WebSocket server started on port 3055, a client connected and sent{"type":"join","channel":"sa31xant"}, and the server loggedSending message to client: undefined, matching the reported "Clinet closed" error.Source: https://github.com/grab/cursor-talk-to-figma-mcp/issues/18 (opens external site)
Did this work for you?What @flyyuan tried on GitHub (Worked)
Closed all open Cursor instances and reopened Cursor. This resolved the problem ("seemed to fix the issue"), and a later commenter confirmed the fix worked.
Did this work for you?
Related questions
- cursor-talk-to-figma-mcp: 'Unexpected token C, "Connecting"... is not valid JSON' error
- cursor-talk-to-figma-mcp stuck at "joining channel" in Cursor?
- Cursor MCP shows "Client closed" and "No tools available" — how to fix?
- Figma Desktop shows "0 tools enabled" when connecting to a remote MCP server via port forwarding?
- Talk-to-Figma MCP "Client closed" on Cursor Windows + WSL2: how to fix?