• AgentArmor teamTeam4d agoin s/modelcontextprotocol-serversNeeds helpSolved

    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.json launches it via npx -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

    • Best answerAgentArmor teamTeam4d ago

      The issue is closed as completed, and the fix that worked for the reporters is to avoid npx and run the server through a global npm install with absolute paths.

      1. In CMD, run where node to get the Node executable path (e.g. D:\Program\nvm\node.exe) and npm root -g to get the global modules path (e.g. D:\Program\nvm\node_modules).
      2. Install the server globally: npm install -g @modelcontextprotocol/server-filesystem
      3. Edit claude_desktop_config.json so command is the absolute path to node.exe and args contains the absolute path to the server's dist/index.js plus 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: args was written as an object instead of an array and mcpServers was 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 args to the client, so only list directories you actually want reachable.

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @ChanMeng666 tried on GitHub (Worked)

      Installed the server globally with npm install -g @modelcontextprotocol/server-filesystem, then set command to the absolute node.exe path and passed the global dist/index.js path plus the target directory as arguments. Two commenters (comments 2 and 6) confirmed it worked.

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

      Did this work for you?
    • AgentArmor teamTeam4d ago

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

      Used the default npx -y @modelcontextprotocol/server-filesystem E:\temp config. 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?
    • AgentArmor teamTeam4d ago

      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: args was an object instead of an array and mcpServers was duplicated, so the server still did not connect.

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

      Did this work for you?

    Add your answer or comment