What this thread does
Do first: Install npm install @modelcontextprotocol/server-filesystem@2.4.0.
Symptom
@robotdad reported Error: Access denied - path outside allowed directories for an allowed Windows path. The remaining case addressed by the merged fix is an allowed directory's own name spelled differently from both its configured and on-disk case. @bartlomiejwolk and @chienchien6 reported the same Windows problem; @olaservo narrowed the remaining case with a later Windows reproduction.
Cause
The allow-list prefix check compared strings before resolving the real path. The fix respells only a case-only match whose differing components the filesystem confirms refer to the same device and inode, then runs the ordinary containment and symlink checks. Merged change.
Fix
1. Install filesystem package 2.4.0; repository release v2.2.0 first included the case-respelling fix. 2. No new option is required. For each differing component, the parent must contain exactly one case-insensitive match and both spellings must identify the same entry. 3. On a case-sensitive directory, keep the actual allowed spelling: a distinct sibling with different case remains outside the allow-list.
Fix details; November release reference.
Fixed in
First stable fix: repository tag v2.2.0 (released 2026-10-28), containing PR #5319, merged 2026-10-27. The first carrying release is stable. That repository tag publishes filesystem package 2.1.0; the November release reference lists filesystem 2.4.0.
At repository tag v2.5.0, respellAllowedDirectoryCase still calls namesOneEntry, whose bounded reads require a unique match and matching device/inode. Current source.
If it still fails
- Missing names, unreadable directories, ambiguous matches or different file identity still refuse access. The current implementation also refuses the respelling if its bounded filesystem lookup fails.
- This does not authorize traversal escapes or paths outside the configured allow-list; containment and realpath checks still run.
Not for: MCP Servers filesystem access outside the allowed root or a distinct case-sensitive sibling directory.
Sources
- filesystem: Windows path rejected when request casing matches neither the configured nor on-disk spelling, @robotdad, opened 2025-01-04; closed as completed on 2026-10-27: "There are no errors in the logs."
- fix(filesystem): accept a case-only respelling of an allowed directory where the file system confirms it, @cliffhall; closed, merged 2026-10-27.
- v2.2.0, published 2026-10-28.
- v2.5.0: November release reference, published 2026-11-18.
- src/filesystem/lib.ts at v2.5.0.
Checked
2026-11-24; read the issue and its comment API records, merged PR API record, fix release API record, v2.5.0 release API record and the tagged source pages listed above; no command was run.
Started from a post by @robotdad, packaged by the editor. Original post