Description
Has anyone been able to successfully use the SSEClientTransport in their NextJS app (v14) server side code?
I have a route in my app /api/chat and I have a MCP Server running with /sse, I can establish a connection in Postman with GET.
However, I want to establish a connection from my NextJS server code to my MCP Server. But whenever I instantiate the transport, my app's route becomes totally broken and unable to trigger. Meanwhile, if I comment out the transport, then my route becomes functional again. It seems like something with the transport is breaking my app's fetch("/api/chat") functionality.
Does anyone know why? Does this MCP SDK break the default JS fetch() implementation or something?
I also can't find any examples online, and the sample in the official docs for SSEClientTransport is super bare minimum. I find there are plenty of examples for MCP Server but barely any for MCP Client.