modelcontextprotocol / modelcontextprotocol/servers

[BUG] Filesystem server crashes completely when any configured path is invalid

Open
#2,113 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug server-filesystem
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

  1. 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
  ]
}
  1. Start Claude Desktop - filesystem works normally
  2. Disconnect network/unmount the Samba share
  3. Filesystem server crashes completely
  4. Cannot access even /Users/username/Desktop anymore

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/Code becomes 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.