Dive icon indicating copy to clipboard operation
Dive copied to clipboard

[Bug] (Win) Not utilizing PATH env var when adding MCP

Open exalsch opened this issue 1 year ago • 2 comments

With v0.8.7 (as lates does not work on windows) there is the issue when adding this MCP config ends up with file not found:

{
  "mcpServers": {
    "ms365": {
      "command": "npx",
      "args": [
        "-y",
        "@softeria/ms-365-mcp-server"
      ]
    }
  }
}

Adjusting to the full path of npx and it works:

{
  "mcpServers": {
    "ms365": {
      "transport": "stdio",
      "enabled": true,
      "command": "C:/Program Files/nodejs/npx.cmd",
      "args": [
        "-y",
        "@softeria/ms-365-mcp-server"
      ],
      "env": {},
      "url": null,
      "headers": null
    }
  }
}

npx command works fine in a CMD as C:\Program Files\nodejs\ is in %PATH%

But when having this MPC enabled ANY chat fails with: Error in query, "Reference '#/properties/body/anyOf/1/properties/from/properties/application' not found." which I assume is connected to not utilizing path env var.

exalsch avatar Jul 08 '25 08:07 exalsch

Would other MCP servers that also use npx have the same issue on Windows? I'm experiencing the same problem with @softeria/ms-365-mcp-server, but when I use @modelcontextprotocol/server-filesystem which also uses npx, it works normally.

johnfunmula avatar Jul 08 '25 09:07 johnfunmula

Yes true that, I can confirm the others I have tried so far work fine. The @softeria/ms-365-mcp-serve works well with Windsurf IDE.

exalsch avatar Jul 08 '25 11:07 exalsch