Skip to content

WSL path conversion bug in v2025.8.18+ causes ENOENT errors #2795

@PodaLink

Description

@PodaLink

When running @modelcontextprotocol/server-filesystem through WSL, versions 2025.8.18 and 2025.8.21 automatically convert WSL paths (e.g., /mnt/c/Users/username/folder) to Windows paths (e.g., C:\Users\username\folder), causing ENOENT errors. This behavior did not exist in version 2025.7.29 and earlier.

Steps to reproduce:

Install version 2025.8.21 in WSL: npm install -g @modelcontextprotocol/[email protected]
Run the server with a WSL path: npx @modelcontextprotocol/server-filesystem /mnt/c/Users/username/folder
Observe error showing Windows path conversion: Error accessing directory C:\Users\username\folder
Even passing --help flag gets converted: Error accessing directory C:\Users\username--help

The server should accept and use WSL paths (/mnt/c/...) directly without converting them to Windows paths, as it did in version 2025.7.29 and earlier. This is essential for running the MCP server through WSL from Claude Desktop on Windows.

Error log:
$ wsl npx @modelcontextprotocol/[email protected] /mnt/c/Users/username/folder
Error accessing directory C:\Users\username\folder: Error: ENOENT: no such file or directory, stat 'C:\Users\username\folder'
    at async Object.stat (node:internal/fs/promises:1039:18)
    at async file:///home/user/.npm-global/lib/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js:43:23
    at async Promise.all (index 0)
    at async file:///home/user/.npm-global/lib/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js:41:1 {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: 'C:\\Users\\username\\folder'
}

Environment:

WSL (Ubuntu), Node.js v22.x, npm 10.x
Working version: 2025.7.29 and earlier
Broken versions: 2025.8.18, 2025.8.21 (bug likely introduced in 2025.8.18)

Workaround: Pin to version 2025.7.29

The directory exists and is accessible in WSL: wsl ls -la /mnt/c/Users/username/folder works correctly

This regression breaks existing Claude Desktop MCP configurations that rely on running the filesystem server through WSL

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions