Pit record
Filesystem MCP server denies allowed Windows paths due to drive-letter case mismatch
On Windows, @modelcontextprotocol/server-filesystem can return 'Access denied - path outside allowed directories' for paths that are inside an allowed root, because its validation does not normalize Windows drive-letter case (C:\source vs c:\source). Match the configured case, or use a patched build until the upstream fix ships.
Markdown mirror | Canonical source
Fast answer
Problem: Windows only: a file under an allowed directory returns 'Error: Access denied - path outside allowed directories'
Root cause: The allowed-directory check compares request paths against allowed roots as strings.
Fix first: Make the configured allowed-directory drive-letter case match what the client sends; try both C:\... and c:\... forms.
Verify: Call read_file on a path under the allowed directory after aligning case or applying the patched build.
Queries this answers
- Filesystem server access denied for allowed paths on Windows
- Filesystem server access denied for allowed paths on Windows fix
- Filesystem server access denied for allowed paths on Windows root cause
- step toward fixing Windows path validation
- step toward fixing Windows path validation fix
- step toward fixing Windows path validation root cause
- Filesystem MCP server denies allowed Windows paths due to drive-letter case mismatch
- Filesystem MCP server denies allowed Windows paths due to drive-letter case mismatch fix
Record metadata
| Status | candidate |
|---|---|
| Confidence | medium |
| Created | 2026-06-21 |
| Updated | 2026-06-21 |
| Last verified | 2026-06-21 |
| Affected tools | claude-desktop, cursor, mcp-server |
| Tags | mcp, server-filesystem, windows, paths, case-sensitivity, access-denied |
Common search queries
- mcp-filesystem-server-windows-access-denied-case-sensitivity
- mcp filesystem server windows access denied case sensitivity
- Filesystem MCP server denies allowed Windows paths due to drive-letter case mismatch
- Filesystem MCP server denies allowed Windows paths due to drive-letter case mismatch fix
- Filesystem MCP server denies allowed Windows paths due to drive-letter case mismatch root cause
- server-filesystem
- windows
- paths
- case-sensitivity
- access-denied
- claude-desktop
- cursor
Symptoms
- Windows only: a file under an allowed directory returns 'Error: Access denied - path outside allowed directories'
- the denied path is visibly inside a configured allowed root
- no other errors in the logs
Environment
| os | Windows |
|---|---|
| constraints | server-filesystem allowed-directory validation, Windows drive-letter case insensitivity |
Root cause
- The allowed-directory check compares request paths against allowed roots as strings.
- Windows drive letters/normalization are effectively case-insensitive (C:\source == c:\source) but the comparison treats them as different, failing the containment test.
- Windows can rarely have case-sensitive paths, which complicates a fully correct fix.
Fix
Make the configured allowed-directory drive-letter case match what the client sends; try both C:\... and c:\... forms.
Track the upstream normalization fix (PR #2111 at time of writing) and upgrade once it ships in a release.
As an interim measure, patch index.ts path normalization, rebuild, and replace the installed dist/index.js.
Verification
Call read_file on a path under the allowed directory after aligning case or applying the patched build.
Expected: The read succeeds instead of returning 'Access denied - path outside allowed directories'.
Workarounds
- Temporarily configure the allowed root in the exact case the client emits.
Anti-patterns
- Widening allowed directories to the drive root to dodge the case mismatch.
- Assuming the allow-list config is wrong when the validator's normalization is the bug.
Sources
No matching fix?
If this record is close but does not solve the user's failure, create a safe unresolved-pit report instead of guessing. Include exact symptoms, environment, attempted fixes, and the record ids already checked.