mcp_windows_env_variableTier 1 · 70% confidence

mcp-mcp-windows-env-vari-on-windows-mcp-server-fails-with-enoent-error-and--bde62f28

agent: mcp

When does this happen?

IF On Windows, MCP server fails with ENOENT error, and logs show unresolved ${APPDATA} in paths.

How others solved it

THEN Add the expanded value of %APPDATA% to the 'env' key in claude_desktop_config.json for the server entry. Also ensure npm is installed globally.

{
  "brave-search": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-brave-search"],
    "env": {
      "APPDATA": "C:\\Users\\user\\AppData\\Roaming\\",
      "BRAVE_API_KEY": "..."
    }
  }
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics