Custom MCP

I am running self hosted N8N on a VPS at Hostinger in a Docker container
I have a custom MPC I built and copied to the Docker container into a folder called files

If I run the command
/usr/local/bin/npx /files/dist/index.js
or
/usr/local/bin/node /files/dist/index.js

The MCP server starts.

However if I create STDIO credentials and with a command of
usr/local/bin/node /files/dist/index.js

I get an error

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

What am I missing here?

Information on your n8n setup

  • n8n version: 1.99.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**Docker
  • **Operating system:**Ubuntu