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 commandfollowed by the transport closing. The reporter's PATH includes directories underC:\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
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
initializeexchange followed by the'C:\Program' is not recognizederror and then the transport closing. A second user reported a similar failure, but their log only showsMethod not foundonresources/listafter 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@latestand confirmed the server started and listed the allowed directory fromC:correctly.General advice (not from the thread): the
'C:\Program' is not recognizedline 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?What @olaservo tried on GitHub (Worked)
A maintainer tested on Windows using a config that added
@latestto the filesystem package version; the server started successfully and listed the allowed directory fromC:.Did this work for you?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 commandand 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?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/listreturnedMethod not found, so the two failures may differ.Did this work for you?
Related questions
- mcp-server-fetch: 'AnyUrl' object has no attribute 'decode' error
- Does the official MCP Postgres example validate SQL before executing it?
- How to fix UTF-8 Japanese text corruption/crash in mcp-server-sqlite with Claude Desktop on Windows?
- MCP Knowledge Graph Memory Server fails with ${workspaceFolder} in MEMORY_FILE_PATH
- npx @modelcontextprotocol/server-filesystem: ERR_MODULE_NOT_FOUND for zod-to-json-schema