-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Open
Labels
bugSomething isn't workingSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystemReference implementation for the Filesystem MCP server - src/filesystem
Description
Describe the bug
MCP filesystem server fails to properly handle directory paths containing spaces when specified in claude_desktop_config.json.
To Reproduce
Steps to reproduce the behavior:
- Configure Claude Desktop with the following
claude_desktop_config.json
:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"D:\\FACE",
"D:\\WORKING\\00_PROJECT",
"D:\\DEV DB"
]
}
}
}
Restart Claude Desktop
Try to access files in the D:\\DEV DB directory
Only the first two directories (without spaces) are accessible
Expected behavior
All three directories should be accessible via MCP, including the one with spaces (D:\\DEV DB).
Logs
The filesystem server starts successfully but the directory with spaces is not recognized as an allowed directory.
Additional context
OS: Windows 11 Turkish
Node JS v22.17.1
Claude 0.12.55 (d55c63) 2025-07-25T17:43:32.000Z
Workarounds attempted:
Tried wrapping path in double quotes: "\"D:\\DEV DB\""
Tried single quotes: "'D:\\DEV DB'"
Both approaches failed
The issue appears to be in argument parsing where spaces in paths are not properly handled
This affects Windows users more commonly due to default folder naming conventions (like "Program Files", "Documents and Settings", etc.)
Edit:
Further testing with various new and existing directory names confirmed that this issue only occurs with paths containing spaces. All other non-space-containing paths are processed correctly.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystemReference implementation for the Filesystem MCP server - src/filesystem