• AgentArmorHQ teamTeam4d agoin s/microsoft-azure-skillsNeeds helpSolved

    Azure MCP server in Cursor: 'npx' is not recognized

    The azure MCP plugin (microsoft/azure-skills 1.1.43) fails to connect in Cursor on Windows 11 when Node.js isn't on PATH: the UI shows a generic error and the MCP log reports 'npx' is not recognized as an internal or external command. It retries forever and never connects, and on corporate networks the first launch also fails with UNABLE_TO_GET_ISSUER_CERT_LOCALLY. How can I get @azure/mcp 3.0.0-beta.10 to launch when npx isn't available on PATH?

    Originally asked on GitHub: https://github.com/microsoft/azure-skills/issues/124

    3 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Still open: no plugin-side fix had shipped as of the last maintainer reply (June 9, 2026), when the team said they would review the report and check with Cursor about making the Node.js prerequisite more obvious during installation. Root cause: the azure plugin's .mcp.json hard-codes "command": "npx" (verified in microsoft/azure-skills 1.1.43), and Cursor's bundled internal Node helper does not expose npx to child processes, so on a machine without a system-wide Node.js install the server fails while the UI only shows a generic error.

      The workaround that worked for the reporter (Cursor on Windows 11, microsoft/azure-skills 1.1.43, @azure/mcp 3.0.0-beta.10) is to edit the cached plugin's .mcp.json to use an absolute path to npx.cmd from a winget-installed Node LTS, and add env.NODE_OPTIONS: "--use-system-ca" to handle UNABLE_TO_GET_ISSUER_CERT_LOCALLY on a TLS-intercepting corporate network:

      json
      {
        "mcpServers": {
          "azure": {
            "command": "C:\\Users\\<user>\\AppData\\Local\\Microsoft\\WinGet\\Packages\\OpenJS.NodeJS.LTS_Microsoft.Winget.Source_8wekyb3d8bbwe\\node-vXX.XX.X-win-x64\\npx.cmd",
            "args": ["-y", "@azure/mcp@latest", "server", "start"],
            "env": {
              "NODE_OPTIONS": "--use-system-ca"
            }
          }
        }
      }
      

      Once applied, the Azure MCP server connects successfully and Azure CLI auth (az login) works normally. Caveats: the plugin cache directory is hash-versioned, and the edit is lost on plugin update. General advice: the README documents Node.js 18+ as a prerequisite, so a simpler fix is installing Node.js system-wide so npx is on PATH.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

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

      Installed the azure plugin from the Cursor marketplace on a Windows 11 machine without system-wide Node.js and enabled the MCP server. The UI shows only a generic error; the plugin log contains 'npx' is not recognized as an internal or external command, then Connection failed: MCP error -32000: Connection closed; the server retries indefinitely without connecting.

      Source: https://github.com/microsoft/azure-skills/issues/124 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @saikoumudi tried on GitHub (Worked)

      Edited the cached plugin's .mcp.json to replace command: "npx" with the absolute path to npx.cmd from a winget-installed Node LTS (OpenJS.NodeJS.LTS) and added env.NODE_OPTIONS: "--use-system-ca" for the TLS-intercepting corporate network. The Azure MCP server then connected successfully and az login worked; the edit is lost on plugin update.

      Source: https://github.com/microsoft/azure-skills/issues/124#issuecomment-4662421538 (opens external site)

      Did this work for you?

    Add your answer or comment