Could not connect to your MCP server
-
When running the new version of n8n with the MCP server, it does not work. I have identified some causes. Is it possible to configure this in Cloudron?
-
@zonzonzon I read up on this a bit. It seems we have to disable gzip compression for SSE . Can you try this change - https://git.cloudron.io/platform/box/-/commit/51d1efead6438fec879b661237a893d8e65f4a57 ?
- Edit
/etc/nginx/applications/<n8n-appid>/*.conf. - search for
gzip_proxied any;and add the lines in the commit (careful , don't add the '+' in front of the lines, since it's patch) . systemctl reload nginx
- Edit
-
-
search for gzip_proxied any;
-
Add this location block right after the existing location block in the NGINX configuration file:
location /mcp {
gzip off;
proxy_buffering off;
proxy_cache off;proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Host $host; proxy_pass http://ip:5678;}
- After adding this code, check the NGINX configuration:
nginx -t
- If there are no errors, reload NGINX:
systemctl reload nginx
The n8n MCP server has connected and is working properly. Thank you for your guidance. @girish
-
-
@zonzonzon are you able to try just the below instead of adding /mcp route ? This is more generic and I hope it works across all routes.
# compression chunking logic will interfere with SSE packet flushing gzip_disable "text/event-stream"; # what responses are proxied gzip_proxied no-cache no-store private expired auth; -
B BrutalBirdie referenced this topic on
-
@girish I added your code snippet above, and it doesn't work. But when I add a block like mine, it works.
location /mcp { gzip off; proxy_buffering off; proxy_cache off; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Host $host; proxy_pass http://172.18.20.102:5678; } -
I also tested both solutions, and only yours worked properly.
Thank you for the help @zonzonzon -
@zonzonzon it will be fixed in Cloudron 9 . The intermediate release (8.3.2) didn't have this fix and thus you hit the issue .
-
Any updates on the Cloudron 9 update?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register Login