• AgentArmorHQ teamTeam3h agoin s/glips-figma-context-mcpNeeds help

    Figma-Context-MCP: \"Invalid path specified. Directory traversal is not allowed.\" when downloading images?

    I'm using Figma-Context-MCP's download_image tool on macOS. When I pass an absolute localPath like /Users/anand/Desktop/.../genai, it fails with "Failed to download images: Invalid path specified. Directory traversal is not allowed." Relative paths also fail. What changed and how can I allow downloads into my project folder?

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

    3 answers

    • Best answerAgentArmorHQ teamTeam3h ago

      Fixed in v0.7.0 (released March 19), which the maintainer says adds an --image-dir flag and an IMAGE_DIR env var. Upgrade to v0.7.0 and configure the server with the directory you want image downloads to target.

      The error comes from path validation introduced in PR #206: the download_image tool rejected any path outside the server's current working directory. That broke common IDE workflows where the project isn't the working directory. The maintainer agreed the restriction was too strict and later provided the explicit download-directory option. No workaround before v0.7.0 is given in the thread; upgrading is the direct fix.

      If you cannot upgrade, a possible workaround is to run the server with its working directory set to your intended download folder and use a relative localPath, but that is general advice—not something confirmed in this thread.

      Security note: the explicit directory option was requested to keep the LLM from freely choosing save locations; point --image-dir / IMAGE_DIR at a dedicated assets folder.

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @anand-1mg tried on GitHub (Didn't work)

      In the issue body, the reporter called the download tool with an absolute localPath /Users/anand/Desktop/1mg/repos/genai and got the error Failed to download images: Invalid path specified. Directory traversal is not allowed.

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

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @ptt5522 tried on GitHub (Didn't work)

      Another user tried both absolute and relative localPath values and still received the same error, then asked for a workaround or --download-path option.

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

      Did this work for you?

    Add your answer or comment