I have a meta workflow triggered by a webhook, which needs to be exposed as a tool to other compatible custom AI agents via n8n MCP server. Having issues accessing the server via the provided analogous URL
Hi @adarsh-lm The problem you’re having is that the devtunnel you are using is stripping the HTTP Upgrade headers necessary for establishing the MCP WebSocket connection and is returning the n8n Editor UI HTML instead of the MCP protocol handshake there are several solutions i can suggest but the major one i would say is that do not use development server of VScode and use Ngrok and as it supports free plans with 20k HTTP requests a month that would be more than enough for testing things around, let me know if this helps.
One small clarification based on the docs: the instance-level MCP /mcp-server/http endpoint uses streamable HTTP, not WebSockets, so it does not rely on Upgrade headers.
Since you’re getting the Editor UI HTML back, that usually means the request is being routed to / instead of /mcp-server/http. In practice, this happens when the tunnel/proxy rewrites or drops the path.
The key things to verify are:
the exact URL copied from Settings → Instance-level MCP → Connection details
that your tunnel forwards /mcp-server/http unchanged to http://localhost:5678/mcp-server/http
and that you’re only sending Authorization: Bearer <token> for streamable HTTP
If the tunnel can’t preserve the path reliably, using ngrok or a public host is the safest way to test MCP.
While I will check into the devtunnel aspect. I wanted to understand if corporate VPN has any role to play into this issue? I am still learning about these details so any opinions in this regard will also help me!
I will reply soon as possible on switching devtunnel
Yes, the corporate VPN could definitely be involved. However, the knowledge sources don’t provide a definitive rule on this – it depends entirely on your organization’s network configuration and firewall policies.
I’d recommend checking with your IT team to see if there are any restrictions on outbound connections or specific domains that might be blocked when connected to the VPN.
@adarsh-lm VPN is just a private network and it should not effect your traffic until specifically configured, just use a Ngrok/CloudFlare tunnel and things should start working, i am using Ngrok its better.
I have seemingly found a way out to the problem without having to further dig into replacing devtunnel OR VPN issues
The rationale comes from the point that I was able to connect with the MCP server endpoint in the first place. The major issue seemed to be routing to the correct path as I was being returned HTML
Adding the X-Tunnel-Skip-Anti-Phishing-Page header seemingly worked with the connection
To the curl request, I had to add another header Accept: application/json, text/event-stream
Also supergateway seems to be giving a lot of issues with connection, so I also switched to mcp-remote and I have been able to connect, though the consistency is not great. Keep either getting no response or timeouts
my final config json that seemingly should work with agents