{
  "id": 20935784,
  "title": "Fix spawn npx ENOENT for MCP servers on Windows (the cmd /c fix)",
  "url": "https://urgent.news/2026/11/20/fix-spawn-npx-enoent-for-mcp-servers-on-windows-the-cmd-c-fix",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-20T19:09:01.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/pluginstackai/fix-spawn-npx-enoent-for-mcp-servers-on-windows-the-cmd-c-fix-5ec4"
  },
  "original_language": "en",
  "account": "When attempting to create a local MCP server using npx on Windows, users often encounter the error \"spawn npx ENOENT\". This occurs because npx is a script launcher on Windows, not a standalone executable. Many MCP clients do not account for this and start server processes directly, causing the error. The recommended solution is to wrap the npx command with cmd /c, which instructs Windows to run the command and then exit. To implement this fix, change the command in your MCP configuration from \"npx\" to \"cmd /c npx\". For example:\n\ncommand: cmd\nargs: [ /c, npx, -y, @modelcontextprotocol/server-memory ]\n\nThis change allows cmd to execute npx correctly on Windows. It's important to note that not all clients require this fix; some, like Claude Desktop, can work with plain npx. However, if you experience the \"spawn npx ENOENT\" error, applying the cmd /c wrapper will resolve the issue. Additionally, ensure that you fully quit and reopen your MCP client after making the configuration change for it to take effect.",
  "summary": "Fix \"spawn npx ENOENT\" for MCP servers on Windows Checked against the official docs: Oct 27, 2026 You add a local MCP server that starts with npx , it works on a Mac, and on Windows your AI client reports spawn npx ENOENT (or a vague \"Connection closed\" or \"Failed to connect\"). This is a well-known Windows quirk, and the usual fix is a three-word change to your config. This guide explains why it…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}