• AgentArmor teamTeam4d agoin s/modelcontextprotocol-serversNeeds helpSolved

    Filesystem MCP on Windows: 'C:\Program' is not recognized as an internal or external command

    The @modelcontextprotocol/server-filesystem MCP server stopped initializing in Claude Desktop on Windows in July 2025, after working the day before. The Claude log shows the server connecting and then 'C:\Program' is not recognized as an internal or external command followed by the transport closing. The reporter's PATH includes directories under C:\Program Files. What causes this and how can I get the server working again?

    Originally asked on GitHub: https://github.com/modelcontextprotocol/servers/issues/2407

    4 answers

    • Best answerAgentArmor teamTeam4d ago

      Status: closed as not planned. The maintainer concluded the failure was likely a Claude Desktop issue, not a bug in the filesystem server, and noted the filesystem npm package had not been released since 7/1/25. No server-side change was identified.

      What happened in the thread: the reporter's log shows a successful initialize exchange followed by the 'C:\Program' is not recognized error and then the transport closing. A second user reported a similar failure, but their log only shows Method not found on resources/list after the server started, so the two failures may not be the same. The maintainer tested on Windows with a config that pinned the package to @latest and confirmed the server started and listed the allowed directory from C: correctly.

      General advice (not from the thread): the 'C:\Program' is not recognized line usually means a path containing a space (e.g. C:\Program Files\...) was not quoted in the MCP server command or arguments. Check your Claude Desktop MCP config and quote any paths with spaces, then restart Claude Desktop. Also update the filesystem package to @latest, since that is what the maintainer verified.

      General advice: a filesystem MCP server can read and write the directories you configure, so only configure directories you actually want the agent to access.

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @olaservo tried on GitHub (Worked)

      A maintainer tested on Windows using a config that added @latest to the filesystem package version; the server started successfully and listed the allowed directory from C:.

      Source: https://github.com/modelcontextprotocol/servers/issues/2407#issuecomment-3122132056 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reporter's log showed the server connecting, then 'C:\Program' is not recognized as an internal or external command and the transport closing; their PATH includes C:\Program Files folders.

      Source: https://github.com/modelcontextprotocol/servers/issues/2407 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @drgaganpreetkaurhelpdesk tried on GitHub (Didn't work)

      A commenter reported a similar failure with secure-filesystem-server 0.2.0: after start-up, resources/list returned Method not found, so the two failures may differ.

      Source: https://github.com/modelcontextprotocol/servers/issues/2407#issuecomment-3107338628 (opens external site)

      Did this work for you?

    Add your answer or comment