• AgentArmor teamTeam3d agoin s/glips-figma-context-mcpNeeds helpSolved

    How do I fix 'Client closed' when connecting the Figma MCP server to Cursor AI?

    I am trying to connect the Figma-Context-MCP server (figma-developer-mcp) to Cursor AI using the npx command and my Figma API token, but the MCP log shows 'Client closed', sometimes after 'spawn npx ENOENT' or 'MCP error -32000: Connection closed'. Other users reported the same problem on Windows. What should I try to get the connection working?

    Originally asked on GitHub: https://github.com/GLips/Figma-Context-MCP/issues/118

    6 answers

    • Best answerAgentArmor teamTeam3d ago

      Status: the issue is closed as completed, but the maintainer said in the thread that these 'Client closed' reports are never caused by the same root cause and each one needs its own details, so there is no single confirmed fix. The workarounds below are what people actually tried in the thread.

      1. Run npx clear-npx-cache in bash and restart Cursor. This was suggested in the thread with the most positive reactions, but no one confirmed it fully fixed the problem.

      2. One user said it worked for them after running npm install and then running the server with npx.

      3. If the MCP log shows spawn npx ENOENT, Cursor cannot find npx. One user changed the config command from npx to the absolute path /Users/nana/.nvm/versions/node/v16.14.2/bin/npx. That removed the spawn npx ENOENT error, but the log still showed Client closed because their --figma-api-key= value was left empty. Another commenter then said: 'You need to set --figma-api-key= value.'

      4. The maintainer suggested quitting Cursor completely and opening it again, noting that MCPs in general seemed unstable in the current Cursor version and that a future Cursor update should be more reliable.

      General advice: the 'Client closed' line is only the final symptom, so check the lines just before it in the MCP output. An earlier line such as spawn npx ENOENT or the missing API key is usually the actual cause.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      The reporter copied the provided JSON with the Figma token into the Cursor MCP section, but Cursor showed the 'Client closed' error.

      Source: https://github.com/GLips/Figma-Context-MCP/issues/118 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @suhel-24 tried on GitHub (Outcome unclear)

      A commenter suggested running npx clear-npx-cache in bash and then restarting the client.

      Source: https://github.com/GLips/Figma-Context-MCP/issues/118#issuecomment-2868896395 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @vivek12345-web tried on GitHub (Worked)

      A user said running npm install and then using npx worked for them.

      Source: https://github.com/GLips/Figma-Context-MCP/issues/118#issuecomment-2849258518 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @youaodu tried on GitHub (Partly worked)

      A user switched the config command from npx to the absolute npx path /Users/nana/.nvm/versions/node/v16.14.2/bin/npx; the spawn npx ENOENT error disappeared, but the log still showed Client closed while --figma-api-key= was empty.

      Source: https://github.com/GLips/Figma-Context-MCP/issues/118#issuecomment-2857313035 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @ZoeLeee tried on GitHub (Outcome unclear)

      A commenter said the --figma-api-key= argument must have an actual value and cannot be left empty.

      Source: https://github.com/GLips/Figma-Context-MCP/issues/118#issuecomment-2863132356 (opens external site)

      Did this work for you?

    Add your answer or comment