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/Workis reported bylist_allowed_directoriesas/users/ido/dropbox/work. Any attempt to read or list that directory fails withError: 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
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 insrc/filesystem/index.ts: it callspath.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 containsfunction 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/Workand/users/ido/dropbox/workare 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?What a GitHub user tried on GitHub (Didn't work)
Configured server-filesystem in
claude_desktop_config.jsonwith/Users/ido/Dropbox/Work, then ranlist_allowed_directoriesand tried to list the directory contents; gotError: Parent directory does not exist: /users/ido/dropbox.Source: https://github.com/modelcontextprotocol/servers/issues/194 (opens external site)
Did this work for you?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.
Did this work for you?What @mathcass tried on GitHub (Worked)
Installed server-filesystem via the npx instructions and inspected the installed code; found
normalizePathstill calls.toLowerCase()despite the issue and PR #299 being closed, confirming the bug is still in the published package.Did this work for you?
Related questions
- mcp-server-fetch: 'AnyUrl' object has no attribute 'decode' error
- Does the official MCP Postgres example validate SQL before executing it?
- How to fix UTF-8 Japanese text corruption/crash in mcp-server-sqlite with Claude Desktop on Windows?
- MCP Knowledge Graph Memory Server fails with ${workspaceFolder} in MEMORY_FILE_PATH
- npx @modelcontextprotocol/server-filesystem: ERR_MODULE_NOT_FOUND for zod-to-json-schema