I’m building an automation using n8n and trying to connect an AI Agent to an SSE (Server-Sent Events) endpoint using the MCP Client node.
However, I’m getting this error in the flow:
Error in sub-node ‘MCP Client’
Could not connect to your MCP server
The endpoint I’m using is public and should work, but I keep getting the message:
“Cannot GET /mcp/teste/sse”
I’m not sure if the problem is with my endpoint configuration or something I’m missing on the n8n side.
Has anyone faced this before?
Any tips on what I should check to make this connection work properly with SSE?
Thanks in advance!
I got the same issue here. My MCP server was created in another workflow and my n8n is installed via coolify
same issue. both production and test url did not work.
getting the same error got it to work for a while then it just would not connect ! anyone figured it out
Hey guys, this is a known issue.
It turns out MCP uses SSE connection and that’s a new thing for n8n.
So you have to adapt the infrastructure to treat the connection differently when using MCP.
With Coolify I found out you have to disable gzip compression for the /mcp path, while leaving it enabled for everything else.
That’s also true for traefik and nginx users.
Here’s some useful resources:
The video is in Portuguese, but it’s very well explained. Enable subtitles.
@Robin_Ramkhalawan @Lucas_Mozzatto_Chave @damiao_j @Jonathan_Politzki @khai-mle
Do you know where gzip is disabled for MCP? I can’t find that information easily.
On the links I sent above I know there’s a guy teaching how to do it.
Hello everyone, I managed to connect my client by passing the following URL in the agent tool (SSE Endpoint field): http://[SERVICENAME]:[PORT]/mcp/… Mine ended up something like: http://n8n:5678/mcp/…
this is for using within n8n only but is better than connect via internet.
For those who wants to disable gzip just uncheck this and restart your n8n service:
Did you fixed the issue…?? I am also having the same problem
same for this worfklow please help
Thanks @damiao_j , using container name worked for me.
SSE Endpoint:
http://n8n:5678/mcp/{path}/sse
I also tested exposing n8n with ngrok and works fine too.
yasafa
May 12, 2025, 10:44am
14
I am having the same problem too, if someone has a concise and an easy-forward way to solve this issue please share it with the community
PhGeek
May 12, 2025, 3:02pm
15
Hey @yasafa , please provide more details and what you have tried so far. Is it local or hosted?
In the meantime, check for any typos in scheme, URL, port, and path.
{SCHEME}://{URL}:{PORT}/{PATH}
yasafa
May 13, 2025, 7:16am
16
no i mean it was really similar to what others described, when connecting an MCP client with a local MCP trigger (on n8n) it fails to connect using the production URL. is there another way to do it?
because with external mcp servers, like brave search I managed to connect with STDIO, so yeah I was wondering if there is a simple solution to connect the client to a local MCP trigger on n8n itself
I simply replaced “localhost” with the IP equivalent 127.0.0.1 and it worked
PhGeek
May 23, 2025, 1:50pm
19
You enter that on MCP Clients’s SSE Endpoint field.
SOLVED: In my case (n8n is hosted in hostinger) the solution was:
1- add the port after my domain
2- due n8n doesn’t have SSL, the url of my MCP Server is http://
3- the example: http://n8n.YOURDOMAIN:5678/mcp/XXXXXXXX/sse
Hoping it helps you.
PhGeek:
ner name worked for me.
SSE Endpoint:
Thank you. Worked for me as well.