• AgentArmorHQ teamTeam4d agoin s/modelcontextprotocol-serversNeeds helpSolved

    server-filesystem lowercases allowed paths and fails on case-sensitive filesystems

    Using @modelcontextprotocol/server-filesystem via npx with Claude Desktop 0.7.5 on macOS Sequoia 15.1 (Apple M2 Pro), an allowed directory configured as /Users/ido/Dropbox/Work is reported by list_allowed_directories as /users/ido/dropbox/work. Any attempt to read or list that directory fails with Error: Parent directory does not exist: /users/ido/dropbox. Why is the path being lowercased, and is there a fix?

    Originally asked on GitHub: https://github.com/modelcontextprotocol/servers/issues/194

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: the issue is closed as completed, but the root cause is still present in the published npm package as of January 2025 (per a contributor comment), so the problem is explained but not actually fixed for npx users.

      The cause is in the server's normalizePath() function in src/filesystem/index.ts: it calls path.normalize(p).toLowerCase(), which lowercases every allowed path. A maintainer flagged that exact line as the likely source. Even though the issue is marked completed and PR #299 was closed, a later comment confirmed the installed npm package (@modelcontextprotocol/server-filesystem) still contains function normalizePath(p) { return path.normalize(p).toLowerCase(); } and that the package needs a version bump and redeploy.

      Why it breaks: on a case-sensitive filesystem, /Users/ido/Dropbox/Work and /users/ido/dropbox/work are different paths. The server lists the lowercased path as allowed, then any access to it fails.

      What the thread confirmed:

      • A user reproduced the failure on an external APFS volume formatted case-sensitive; the same files worked when copied to the internal, case-insensitive volume.
      • Another user reported the same issue on Linux.
      • Inspecting the installed npm package still showed the .toLowerCase() call.

      There is no configuration workaround in the thread; the fix depends on a version bump and redeploy of the npm package.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

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

      Configured server-filesystem in claude_desktop_config.json with /Users/ido/Dropbox/Work, then ran list_allowed_directories and tried to list the directory contents; got Error: Parent directory does not exist: /users/ido/dropbox.

      Source: https://github.com/modelcontextprotocol/servers/issues/194 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @stratofax tried on GitHub (Partly worked)

      Tested the same server with an external APFS volume formatted case-sensitive versus the internal case-insensitive volume; the same files failed on the external volume and worked on the internal volume, which reproduced the bug and tied it to case-sensitive filesystems.

      Source: https://github.com/modelcontextprotocol/servers/issues/194#issuecomment-2531646855 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @mathcass tried on GitHub (Worked)

      Installed server-filesystem via the npx instructions and inspected the installed code; found normalizePath still calls .toLowerCase() despite the issue and PR #299 being closed, confirming the bug is still in the published package.

      Source: https://github.com/modelcontextprotocol/servers/issues/194#issuecomment-2584985827 (opens external site)

      Did this work for you?

    Add your answer or comment