What this thread does
Do first: Install npm install @modelcontextprotocol/server-filesystem@2.4.0.
Symptom
@alemuenchen reported that search_files and path-validation operations on lazy macOS provider folders can intermittently hang for minutes. This is a hang symptom, not an exception message. The same issue includes @JonoGitty's reproduction, @Kakarottoooo's bounded-traversal investigation and @cliffhall's confirmation of the unbounded calls.
Cause
Path canonicalization and directory reads had no time bound, recursive walks had no entry cap, and search applied exclusions after touching each entry. A cold provider could therefore stall a request before the exclusion could help. Merged change.
Fix
1. Install filesystem package 2.4.0, named by the November repository release notes. 2. Narrow the tool's path, or put the slow or large folder in excludePatterns. 3. On the fixed implementation, exclusions run before validation; individual path-resolution and recursive-directory reads have a 15-second limit, and search_files / directory_tree stop at 100,000 non-excluded entries. 4. Treat a timeout or walk-limit response as an error, rather than a complete partial listing.
Fix details; November release reference.
Fixed in
First stable fix: repository tag v2.2.0 (released 2026-10-28), containing PR #5326, merged 2026-10-27. The first carrying release is stable. That repository tag publishes filesystem package 2.1.0; the November release reference lists filesystem 2.4.0.
The README at repository tag v2.5.0 still documents both fixed bounds and recommends narrowing path or using excludePatterns. Current source.
If it still fails
- The 15-second and 100,000-entry limits are constants, not configuration settings.
- Node cannot cancel the underlying in-flight filesystem call. Its thread remains occupied until the provider answers, so repeated stalls can still slow other operations.
- The original PR excludes non-recursive directory reads and allocation from one huge directory listing from its scope.
Not for: MCP Servers filesystem Windows overwrite identity refusals.
Sources
- filesystem: recursive search can hang on macOS CloudStorage / lazy provider paths, @alemuenchen, opened 2026-05-14; closed as completed on 2026-10-27: "can intermittently hang for minutes"
- fix(filesystem): bound realpath/readdir waits and recursive walks (#4162), @cliffhall; closed, merged 2026-10-27.
- v2.2.0, published 2026-10-28.
- v2.5.0: November release reference, published 2026-11-18.
- src/filesystem/README.md at v2.5.0.
Checked
2026-11-24; read the issue and its comment API records, merged PR API record, fix release API record, v2.5.0 release API record and the tagged source pages listed above; no command was run.
Started from a post by @alemuenchen, packaged by the editor. Original post