Skip to content

Enhancement Request: Graceful handling of temporarily unavailable network paths #2483

Description

@F1rlefanz

Enhancement Request: Graceful handling of temporarily unavailable network paths

Summary

The Filesystem MCP Server currently crashes on startup if any configured path is temporarily unavailable (e.g., network drives, NAS systems). This prevents using the server in environments where some paths may be intermittently available.

Current Behavior

  • Server performs fs.stat() on all configured paths during startup
  • If ANY path is unreachable, server terminates with process.exit(1)
  • This makes the entire filesystem server unusable when network paths are offline

Expected Behavior

The server should:

  1. Start successfully even if some network paths are temporarily unavailable
  2. Log warnings for unreachable paths instead of crashing
  3. Gracefully handle operations on unavailable paths at runtime with appropriate error messages
  4. Optionally retry path validation periodically or on-demand

Use Case

Many users have configurations mixing local paths with network storage (NAS, SMB shares, etc.) that may not be available 24/7:

  • Home NAS systems that power down overnight
  • VPN-connected network drives
  • Intermittent cloud storage mounts

Reproduction

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\username\\Documents",
        "\\\\nas.local\\shared\\documents"  // <- NAS is offline
      ]
    }
  }
}

Current result: Server fails to start completely
Expected result: Server starts, local paths work, NAS operations fail gracefully

Proposed Solutions

Option 1: Command-line flag (recommended)

npx @modelcontextprotocol/server-filesystem --ignore-missing-paths C:\local \\nas\share

Option 2: Path-specific configuration

{
  "required": ["C:\\Users\\username\\Documents"],
  "optional": ["\\\\nas.local\\shared\\documents"]
}

Option 3: Runtime validation only

Skip startup validation entirely, handle path availability at operation time.

Impact

This enhancement would:

  • ✅ Improve reliability in mixed local/network environments
  • ✅ Reduce configuration management complexity
  • ✅ Allow for more flexible deployment scenarios
  • ✅ Maintain backward compatibility

Environment

  • OS: Windows 11
  • Package: @modelcontextprotocol/server-filesystem (latest)
  • Client: Claude Desktop

Related Issues

Similar issues suggest this is a common pain point:

Additional Context

The current "fail-fast" approach makes sense for critical paths but is too rigid for optional network resources. A more resilient approach would significantly improve the user experience for mixed-environment setups.

Logs

From C:\Users\Christoph\AppData\Roaming\Claude\logs\mcp-server-filesystem.log:

Error accessing directory \\ds418play\Daten\Gesundheits- und Krankenpfleger\Arbeitsanweisungen: Error: UNKNOWN: unknown error, stat '\\ds418play\Daten\Gesundheits- und Krankenpfleger\Arbeitsanweisungen'
    at async Object.stat (node:internal/fs/promises:1037:18)
    at async file:///C:/Users/Christoph/AppData/Local/npm-cache/_npx/a3241bba59c344f5/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js:53:23
    at async Promise.all (index 5)
    at async file:///C:/Users/Christoph/AppData/Local/npm-cache/_npx/a3241bba59c344f5/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js:51:1 {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'stat',
  path: '\\\\ds418play\\Daten\\Gesundheits- und Krankenpfleger\\Arbeitsanweisungen'
}

Activity

  1. added
    enhancementNew feature or request
    server-filesystemReference implementation for the Filesystem MCP server - src/filesystem
    on Aug 11, 2025
  2. sebastien-rosset commented on Aug 22, 2025

    @sebastien-rosset
    Contributor

    How about validating paths on startup, but do not crash - just log warnings. That's because directory accessibility may change:

    • NAS up/down
    • VPN up/down
    • Drive plugged/unplugged
    • Configuration errors (typos, wrong paths) - This is indistinguishable from accessibility issues, i.e. the validation code can't tell the difference between:
      • /home/user/documants (typo in "documents")
      • /mnt/nas/documents (correct path, but NAS or VPN is down)
    • Path refers to file, not directory

    There could be hours or days between startup validation and runtime, so the startup state becomes irrelevant.

  3. localden commented on Jul 30, 2026

    @localden
    Contributor

    Closing as a duplicate of #2113; let's track it there.

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

    enhancementNew feature or requestserver-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