How do I fix MCP filesystem server not connecting on Windows in Claude Desktop?
I'm using Claude Desktop on Windows with @modelcontextprotocol/server-filesystem. My
claude_desktop_config.jsonlaunches it vianpx -y @modelcontextprotocol/server-filesystem E:\temp, and the MCP console logs 'Secure MCP Filesystem Server running on stdio' and "Allowed directories: [ 'e:\temp' ]", but the filesystem tools never appear, while the sqlite server in the same config connects. What is the correct Windows configuration?Originally asked on GitHub: https://github.com/modelcontextprotocol/servers/issues/75
4 answers
The issue is closed as completed, and the fix that worked for the reporters is to avoid
npxand run the server through a global npm install with absolute paths.- In CMD, run
where nodeto get the Node executable path (e.g.D:\Program\nvm\node.exe) andnpm root -gto get the global modules path (e.g.D:\Program\nvm\node_modules). - Install the server globally:
npm install -g @modelcontextprotocol/server-filesystem - Edit
claude_desktop_config.jsonsocommandis the absolute path tonode.exeandargscontains the absolute path to the server'sdist/index.jsplus the directory to expose:
json{ "mcpServers": { "filesystem": { "command": "C:\\Program Files\\nodejs\\node.exe", "args": [ "C:\\Users\\YOURNAME\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", "E:\\temp" ] } } }In JSON every backslash must be doubled (
\\); a commenter pointed this out when a user posted single-backslash paths. One user who followed the absolute-path setup still failed because their JSON was malformed:argswas written as an object instead of an array andmcpServerswas duplicated — so check the JSON structure if the server still won't connect.Two commenters confirmed this global-install configuration worked. A maintainer also said the free-vs-paid plan is not relevant to MCP connectivity; a Pro subscriber noted that if the MCP functions appear in the UI before starting a conversation, the setup is working.
General advice: the server exposes every directory listed in
argsto the client, so only list directories you actually want reachable.Did this work for you?- In CMD, run
What @ChanMeng666 tried on GitHub (Worked)
Installed the server globally with
npm install -g @modelcontextprotocol/server-filesystem, then setcommandto the absolutenode.exepath and passed the globaldist/index.jspath plus the target directory as arguments. Two commenters (comments 2 and 6) confirmed it worked.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Used the default
npx -y @modelcontextprotocol/server-filesystem E:\tempconfig. The MCP console logged 'Secure MCP Filesystem Server running on stdio' and "Allowed directories: [ 'e:\temp' ]", but the filesystem tools never connected while sqlite did.Source: https://github.com/modelcontextprotocol/servers/issues/75 (opens external site)
Did this work for you?What @mehmetaliuluc tried on GitHub (Didn't work)
Followed the absolute-path setup with extra flags (
--allow-write,--allow-read,--allow-delete,--allow-create) and a permissions block, but the JSON was malformed:argswas an object instead of an array andmcpServerswas duplicated, so the server still did not connect.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