Skip to content

bug: MCP filesystem server fails with "os error 267" (directory name invalid) — works in upstream Jan #259

Description

@MarcLocalAI

Version: v2.0.23

Describe the Bug

The @modelcontextprotocol/server-filesystem MCP server fails to start with "The directory name is invalid. (os error 267)" on every launch attempt, regardless of configuration. The identical server config works correctly in Jan (the upstream project this was forked from) on the same machine.

Steps to Reproduce

  1. Add an MCP server (STDIO transport) with:
    • Command: npx
    • Args: -y, @modelcontextprotocol/server-filesystem@2026.1.14, C:\Users\Marc\Documents\Test1
  2. Save and attempt to connect.
  3. Observe: Failed to run command filesystem: The directory name is invalid. (os error 267)

Already ruled out:

  • Running the identical command manually in PowerShell works fine
  • Target folder exists and was verified before each test
  • Tested path with and without spaces — same error
  • Tested Command as bare "npx", full path "C:\Program Files\nodejs\npx.cmd", and routed through "cmd /c" — same error every time
  • Tested with and without the @2026.1.14 version pin — same error
  • Added APPDATA and USERPROFILE as explicit Environment Variables in the server config — same error
  • Confirmed npx.cmd and node.exe both exist in C:\Program Files\nodejs
  • npm config list shows no unusual prefix/cache paths

Key finding: identical config connects and runs successfully in Jan on the same machine — points to a regression in Atomic Chat's fork rather than a config issue. os error 267 is Windows' ERROR_DIRECTORY, which typically means an invalid working directory was passed to process creation — possibly unrelated to the Args shown in the UI. A similar root cause was reported in another Tauri/Electron AI client: aofp/yume#12

Screenshots / Logs

[14:40:49] INFO Starting MCP server filesystem (Initial attempt)
[14:40:49] ERROR Failed to run command filesystem: The directory name is invalid. (os error 267)
[14:40:49] WARN Failed to start MCP server filesystem on first attempt: Failed to run command filesystem: The directory name is invalid. (os error 267)

Operating System

  • MacOS
  • [✔️] Windows - Windows 11 Pro
  • Linux

Activity

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions