Skip to content

Conversation

@Sean-Kenneth-Doherty
Copy link

Summary

Instead of failing entirely when any configured allowed directory is unavailable (e.g., unmounted network volume, disconnected external drive), the server now:

  • Warns about each unavailable directory and skips it
  • Continues starting with all available directories
  • Only fails if NO directories are accessible

Changes

  • Modified startup validation in src/filesystem/index.ts to collect unavailable directories and filter them out instead of calling process.exit(1) on the first failure
  • Added clear warning messages showing which directories were skipped
  • Server exits with error only when zero directories are accessible

Testing

  • All 139 existing tests pass
  • Manual testing confirms:
    • Server starts with mixed valid/invalid directories (warns and continues)
    • Server fails gracefully with all invalid directories (helpful error message)

Impact

This makes the filesystem MCP server more resilient for setups involving:

  • Network shares/NAS devices
  • External drives
  • Mounted volumes
  • Any path that might be temporarily unavailable

Fixes #3232

Instead of failing entirely when any configured allowed directory is unavailable
(e.g., unmounted network volume, disconnected external drive), the server now:

- Warns about each unavailable directory and skips it
- Continues starting with all available directories
- Only fails if NO directories are accessible

This makes the filesystem MCP server more resilient for setups involving:
- Network shares/NAS devices
- External drives
- Mounted volumes
- Any path that might be temporarily unavailable

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filesystem MCP server fails to start when any allowed directory is unavailable

1 participant