modelcontextprotocol / modelcontextprotocol/servers
[filesystem] write_file silently returns success but never writes to disk on Windows
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 90.5k
- Forks
- 11.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
Describe the bug
write_file silently returns success without writing the file to disk on Windows. edit_file, read_file, and list_directory work correctly on the same paths — only write_file is broken.
To Reproduce
Configure the filesystem server against any local directory.
Call write_file with a path to a new file. Response: File created successfully.
Call read_file on the same path. Response: ENOENT: no such file or directory.
Verify externally (Explorer, Test-Path). File does not exist.
Expected behavior
Either write the file, or return an error. Silently returning success while doing nothing leaves the caller unable to detect the failure.
Logs
None visible client-side. Server response is a normal success payload.
Additional context
OS: Windows 11
Claude Desktop: Last
Reproduces with both isUsingBuiltInNodeForMcp: true and system Node
Ruled out: NTFS permissions (PowerShell writes work), Defender, Controlled Folder Access, OneDrive, paths with spaces
Survives full Claude Desktop uninstall + %APPDATA%\Claude wipe + reinstall
edit_file writes persist on the same directory; only write_file is affected
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
Start by locating the filesystem server's write_file handler and compare its behavior with edit_file and read_file. Reproduce the issue on Windows using a new-file path, then add coverage showing that write_file either persists the file or returns an error; done means the subsequent read_file call succeeds or the failure is explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100