modelcontextprotocol / modelcontextprotocol/servers
[BUG] Filesystem server crashes completely when any configured path is invalid
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 90.5k
- Forks
- 11.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
[BUG] Filesystem server crashes completely when any configured path is invalid
Description
The MCP filesystem server shuts down entirely if ANY path in the configuration becomes invalid (unmounted volume, disconnected network share, typo). This makes the protocol fragile and unsuitable for production use.
Current Behavior
When any path is inaccessible:
- Entire filesystem server shuts down
- ALL file access is lost (not just the invalid path)
- No error recovery possible through Claude
- Must restart Claude Desktop to restore functionality
Expected Behavior
- Invalid paths should be skipped with a warning
- Valid paths should continue working
- Server should log errors but not crash
- Graceful degradation, not total failure
Steps to Reproduce
- Configure MCP filesystem with a network mount:
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/Volumes/NetworkDrive" // This is a Samba mount
]
}
- Start Claude Desktop - filesystem works normally
- Disconnect network/unmount the Samba share
- Filesystem server crashes completely
- Cannot access even
/Users/username/Desktopanymore
Impact
- Severity: Critical
- Frequency: Happens whenever network conditions change
- Workaround: None - must restart Claude Desktop
Real-World Example
Working on a project with files on both local disk and a Samba mount. Network hiccup occurs:
- Samba mount at
/Volumes/Codebecomes unavailable - MCP filesystem server completely dies
- Cannot read local logs to debug
- Cannot edit local config files to remove the bad path
- Cannot continue any file-based work until full restart
Proposed Solution
// pseudocode
async function initializePaths(configuredPaths) {
const validPaths = [];
for (const path of configuredPaths) {
try {
await fs.access(path);
validPaths.push(path);
console.log(`✓ Registered path: ${path}`);
} catch (error) {
console.warn(`✗ Skipping inaccessible path: ${path} - ${error.message}`);
// Continue with other paths instead of crashing
}
}
if (validPaths.length === 0) {
throw new Error("No valid paths found");
}
return validPaths;
}
Additional Context
This "all-or-nothing" approach contradicts basic fault tolerance principles. For MCP to be a production-ready standard for LLM tool integration, it must handle common scenarios like:
- Network drives going offline
- Typos in configuration
- Permissions changes
- Mounted volumes being unmounted
The current behavior makes MCP fragile and frustrating to use in real development environments.
Environment
- OS: macOS [your version]
- Claude Desktop: [your version]
- MCP filesystem server version: [check package.json]
Related Issues
- [Check if there are similar issues and reference them]
Note: This issue affects anyone using MCP with network storage, external drives, or complex file system configurations. The fix would significantly improve MCP's reliability and production readiness.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files, tests, or entry points are named. Start by locating filesystem server startup and configured-path initialization, then reproduce the invalid network or unmounted path case; done means inaccessible paths are warned about without stopping access through valid paths, with the all-invalid behavior made explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100