I’m attempting to build my first Workflow, I’m getting this error. Is this indicative of a configuration issue at the server-level, the n8n-level, or apify-level? I’m not sure where to begin,
I’m setting up connection to my MCP Client:
Command: npx
Arguments: -y @apify/actors-mcp-server --actors matej.vavro/Coingecko
Environments: APIFY_TOKEN=(My Token)
When I go back to edit enviroment setting I see “_n8n_BLANK_VALUE…” according to ChatGPT " *field was saved but blanked out by the UI (often happens with secrets for security)" – is this true?
I set an environment variable at “docker=compose.yml” and called it in my environment field:
APIFY_TOKEN={{ $env.APIFY_TOKEN }}
I still see the “_n8n_BLANK_VALUE…”
What is the error message (if any)?
I click “SAVE” and I get error bottom-right notification:
“Problem running workflow Lost connection to the server”
Steps we took to resolve the “Lost connection to the server” error encountered when executing an MCP Client node that runs an npx command within a Dockerized n8n setup behind an NGINX reverse proxy.
Running an MCP Client node that executes npx -y @apify/actors-mcp-server --actors (MY ACTOR) resulted in the n8n UI displaying:
“Problem running workflow – Lost connection to the server”
Despite the UI error, the backend process continued running.
Root Cause
The issue stemmed from the NGINX reverse proxy not being configured to handle WebSocket connections properly. n8n relies on WebSockets for real-time communication between the server and the browser UI. Without the appropriate NGINX configuration, the WebSocket connection was not established, leading to the UI losing connection during long-running workflows.
Solution
We updated the NGINX configuration to support WebSocket connections and increased timeout settings to accommodate long-running processes.