Getting Failed to execute operation: The file or directory does not exist for n8n-nodes-mcp

Question: Issues with n8n-nodes-mcp on VPS

Hi everyone,

I’m encountering an issue with the n8n-nodes-mcp package on my VPS. I installed it using the community nodes feature in n8n, and I can see the folder inside the node_modules directory. However, when I try to execute operations involving this package, I get the following error:

NodeOperationError: Failed to execute operation: The file or directory does not exist

Here are some details about my setup:

  • Environment: VPS running Windows server
  • n8n Version: 1.83.2
  • Installation Method: Installed via community nodes

I’ve verified that the paths specified in my workflow are correct and that the files exist. I’ve also checked permissions and ensured that the environment variables are set correctly.

Has anyone else encountered this issue or have any suggestions on how to resolve it? Any help would be greatly appreciated!

{
  "errorMessage": "Failed to execute operation: The file or directory does not exist",
  "errorDetails": {},
  "n8nDetails": {
    "nodeName": "MCP Client",
    "nodeType": "n8n-nodes-mcp.mcpClient",
    "nodeVersion": 1,
    "operation": "listTools",
    "time": "21.03.2025, 12:47:13",
    "n8nVersion": "1.83.2 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "NodeOperationError: Failed to execute operation: The file or directory does not exist",
      "    at ExecuteContext.execute (C:\\Users\\Administrator\\.n8n\\nodes\\node_modules\\n8n-nodes-mcp\\nodes\\McpClient\\McpClient.node.ts:561:10)",
      "    at processTicksAndRejections (node:internal/process/task_queues:105:5)",
      "    at WorkflowExecute.runNode (C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\n8n\\node_modules\\n8n-core\\src\\execution-engine\\workflow-execute.ts:1155:9)",
      "    at C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\n8n\\node_modules\\n8n-core\\src\\execution-engine\\workflow-execute.ts:1505:27",
      "    at C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\n8n\\node_modules\\n8n-core\\src\\execution-engine\\workflow-execute.ts:2064:11"
    ]
  }
}

Workflow:

Thanks in advance, Roy

2 Likes

Hello @roymeshulam

Seems it is an issue with the community node. Better to reach out to the node author via github

Hi, Can you please share your configuration inside the MCP client? thanks. Ive tried with an empty / BS configuration inside of a MCP client and I get the exact same error. Try to put a basic config like this:

it should list the tools correctly

1 Like

Im in a similar condition, have seen more people facing it on redit too

I also encounter the same condition,
I am running both my n8n in windows 10 system locally, both has such issue.

Yes, i can confirm that when running directly through npm, I have the exact same issue, which does not exist when you run via docker. There is already an issue logged for this: pls refer to Failed to execute Node, file or directory does not exist · Issue #34 · nerding-io/n8n-nodes-mcp. You might find a workaround there

1 Like

I had the same until I realized that the error refers to npx executable not being found. I did put in the whole path (e.g. C:\\nvm4w\\nodejs\\npx.cmd] and it started to work. Just use where npx from a command prompt to find the exact location of your npx installation.

I was facing the same issue but I was running on docker, so I had to go on the terminal of the container and run which npx.
then it will output the path to npx like /usr/local/bin/npx so grab it and place on the UI .

Hi Silvio, what do you mean place it on the UI?

This error occurs simply because there’s a space at the end of the npx command. Make sure the command doesn’t have any spaces.