Hello everyone,
I’m experiencing an issue integrating Claude’s MCP Server with n8n on my Hostinger VPS running Ubuntu 24.04.
Context
- I had to reset my n8n installation following some terminal manipulations
- I’m using Docker Compose to deploy n8n
- Node.js, npm, and npx are installed on the host system (locations: /usr/bin/)
- I receive the “spawn npx ENOENT” error when trying to use the “Claude MCP Server” trigger
Current configuration
I have a minimal docker-compose.yml:
yaml
version: "3"
services:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- NODE_ENV=production
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
Solutions attempted
I’ve tried configuring the PATH variable in the Docker environment:
"env": { "PATH": "/usr/bin:/usr/local/bin:/bin" }
I’ve also found information suggesting that the solution might be related to this environment variable configuration, but I can’t implement it correctly.
Questions
- How can I properly configure the PATH so that n8n can find and execute npx?
- Are there specific configurations required for Claude’s MCP Server to work with n8n in a Docker environment?
- Is it possible to inject environment variables specifically for the MCP Server Trigger node?
I’m looking for advice to solve this issue without resorting to overly complex solutions. Thank you in advance for your help!