Skip to content

Filesystem MPC Server rejects lowercase drive letters in paths #1987

Closed as duplicate

Description

@s-varenia

Describe the bug
The filesystem MPC Server incorrectly treats paths with lowercase drive letters as outside the allowed directory scope, even though the path is valid on Windows. This results in an "access denied" error, despite the target path being inside the allowed directory.

To Reproduce
Steps to reproduce the behavior:

  1. Use the create_directory , directory_tree operation with a path like:
{
  "path": "g:\\GitHub\\obsidian\\Temp"
}
  1. Observe the error:
Error: Access denied - path outside allowed directories:
g:\GitHub\obsidian\Temp not in G:\GitHub\obsidian

Image

  1. Retry the same operation with the drive letter capitalized:
{
  "path": "G:\\GitHub\\obsidian\\Temp"
}
  1. This time, the directory is created successfully.

Image

Expected behavior
Since Windows paths are case-insensitive, both "g:" and "G:" should be treated the same. The server should allow the operation if the actual path is within the allowed root, regardless of drive letter case.

Additional context
This behavior appears to be caused by a case-sensitive string comparison in the server’s path validation logic. Normalizing the paths or performing case-insensitive comparison (at least for the drive letter) should resolve this inconsistency on Windows systems.

Activity

  1. DanOverflow commented on Jun 14, 2025

    @DanOverflow

    I created a temporary fork so I could get the Filesystem server working for myself in Windsurf. This commit seemed to get things working properly for me.

    I believe this fix would also resolve reported issues: #470, #1820, #1033, #1838

    I will submit a Pull Request shortly on this repo.

  2. added
    server-filesystemReference implementation for the Filesystem MCP server - src/filesystem
    on Jul 28, 2025
  3. domdomegg commented on Aug 9, 2025

    @domdomegg
    Member

    Thanks for reporting this! Going to merge this into #470 for clearer tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions