Failed to connect to MCP Server

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