I am hosting my n8n in a docker container.
It also failed with the same message when I tested it.
I changed the MCP Client SSE Endpoint url as follows: replace localhost with host.docker.internal in the parameter.
@PhGeek Hey! Bro can you please help me? I tried everything and doesn’t work. In my case is hosted from a friend. I have tried everything and still having the problem.
me sucedió el mismo error yo uso nginx y esta fue la solucion que le di:
desabilité la compresión GZIP solo para MCP dejé el resto de la conección con la compresión normal; esta es la configuración que usé:
# Configuración específica para MCP
location /mcp {
proxy_pass http://localhost:3000/mcp; # puerto definido por el usuario
proxy_http_version 1.1;
# Deshabilitar compresión específicamente
proxy_set_header Accept-Encoding "";
# Configuración para WebSockets/SSE
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
# Timeouts extendidos
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
# Deshabilitar buffering
proxy_buffering off;
proxy_cache off;
# Headers adicionales
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Configuración principal (este apartado es parte de la configuración normal de nginx)
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
# Habilitar compresión para otras rutas (agregar)
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
}
gracias al debate aquí logré encontar la solución, luego de entender el funcionamiento viendo el video que mandó @vorsters en este debate, gracias a todos
If you are using n8n inside docker. Simple change localhost:5678 into 127.0.0.1:5678 in the MCP client tool and use Production URL (not test URL). This will fix the issue.
Thank you @Pablo_Kinniburgh and @Cecilio_Matos : your answers pointed th way in the right direction of my problem… but not all the way.
Sharing here another approach, in case anyone is hosting his or her n8n instance on elesti.io
elstio also seems to run NGINX and n8n in different containers.
I tried all the IPs / URLs given in the examples (127.0.0.1 ; host.docker.internal …), but that wouldn’t work. Until I finally stumbled across 172.72.0.1. as Docker’s “default bridge gateway”.
I am far from being an expert, but this IP seems to allow communication between services running in different containters.
Long story short: using the following NGINX config in the elest.io securitiy seetings was the first step to success:
The next step was NOT to simply copy the URL of the MCP server node to the client node, but to change the domain name also to the Docker default bridge gateway IP. So:
If someone is using nginx proxy manager as their reverse proxy, this is what worked for me to get the mcp finally connecting to cursor in the Advanced tab of the proxy host config:
Please, someone could help me? I`m trying n8n trial and i can`t resolve the “Error in sub-node ‘MCP Client’. I tried to fix the MCP server trigger URL but nothing worked
This is my workflow: n8n.io - Workflow Automation