Failed to connect to MCP Server

Hi,

My MCP server has suddenly stopped working. It was working fine, but for some reason it has stopped working.

I’ve replicated the issue in a simpler workflow, as you can see in the image below:

The Agent enters into a loop.

The configuration is fine. The console output is:

McpClientTool: Failed to connect to MCP Server
Error in sub-node MCP Cal.com
McpClientTool: Failed to connect to MCP Server
Error in sub-node MCP Client
Received request for unknown webhook: The requested webhook "sheet/sse" is not registered.
McpClientTool: Failed to connect to MCP Server
Error in sub-node MCP Client
Received request for unknown webhook: The requested webhook "sheet/sse" is not registered.
Received request for unknown webhook: This webhook is not registered for HEAD requests. Did you mean to make a GET request?

I’ve tried several times to change the test/prod mode, paths, tools, etc. , but with no success.

Help, please!

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

Hello @motoneurona!
Welcome to n8n community!

Your workflows are likely fine, the problem seems to be in how SSE/webhook connections are handled by your hosting environment. Adjusting execution mode and checking reverse proxy behavior should help.

→ Similar issues in the n8n community and Coolify GitHub

What you can try?

  1. Switch execution mode (if possible)

If you’re using EXECUTIONS_MODE=queue, try changing it to:

EXECUTIONS_MODE=own

This allows n8n to manage SSE/webhook registration directly.

  1. Check your reverse proxy

If you’re deploying with Coolify or have NGINX/Traefik in front of n8n:

  • Make sure /sse and /webhook/* routes are not cached, rewritten, or blocked
  • Ensure SSE connections are supported
  1. Try running the same flow locally

To rule out infra issues:

  • Run n8n locally
  • Activate the MCP Server workflow first, then the MCP Client/Agent
  • If it works locally, the issue is definitely with your cloud/proxy config

Let me know!

3 Likes

Solved! It was a problem with Traefik. I use EasyPanel and the version 2.16 introduces a bug solved in version 2.17 ( * removed default compress middleware due to a bug in Traefik).

Once upgraded, everything works properly!

Thank you for you time!

1 Like

I’m running n8n in Docker on a Plesk (IONOS) server behind the built-in Nginx reverse proxy. When my vAPI Voice AI instance calls the MCP Server Trigger endpoint, I get:

502 Bad Gateway
failed to connect to MCP server

I suspect GZIP or buffering is interfering with the SSE connection, so I added a custom Nginx block to disable compression, but the error persists.


Configuration:

  • Plesk edition: IONOS
  • Web servers: Apache + Nginx (reverse proxy)
  • Docker container:
    • Image: n8nio/n8n
    • Port mapping: 127.0.0.1:9001→5678
  • Custom Nginx include: /var/www/vhosts/system/n8n.domain.com/conf/vhost_nginx.conf
location ^~ /mcp/ {
    proxy_pass           http://127.0.0.1:5678/mcp/;
    proxy_http_version   1.1;
    proxy_set_header     Connection "";
    proxy_buffering      off;
    proxy_cache          off;
    proxy_read_timeout   3600s;
    proxy_send_timeout   3600s;
    gzip                 off;
}

Request:

What am I missing in my Nginx or Plesk setup to allow the MCP SSE endpoint to connect successfully without triggering a 502? Any pointers on next steps or additional directives to try?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.