The experimental_createMCPClient() in the Vercel AI SDK hangs because it doesn't respond to server "ping" messages over Server-Sent Events (SSE). This causes the connection to time out, preventing tools from executing. This is a know issue, so you should revert the clause that Vercel works with Composio. Becasue Vercel doesnt work with SSE and experimental_createMCPClient. There is no ping-pong going on. Only ping.
The solution is a fork of Vercel ai SDK and a wrapper of the client.
The reason it worked for about a week. Or "now and then":
Likely one (or a combo) of these changed mid-stream:
Dependency update: A patch/minor release of Vercel AI SDK, Composio, or a transitive SSE/EventSource polyfill changed behavior (e.g., stricter heartbeat/ping handling). Even “non-breaking” updates can alter timing.
Server-side tightening: Composio MCP servers may have enabled/shortened ping/idle timeouts. Your client not replying to pings would start failing once the server enforced them.
Environment/network shifts: Edge runtimes (Supabase/Render) can change keep‑alive, idle TCP, or proxy timeouts. A redeploy, region move, or infra tweak can surface previously masked bugs.
Load pattern: Under light load, connections survived long enough despite missing pongs; once traffic/latency increased, the lack of ping/pong started causing disconnects/hangs.
Code path variance: Small logic/config changes (creating more clients per request, longer tool runs, different model/tools) increased connection duration, triggering the heartbeat issue.
In short: the client has a latent ping/pong gap; a routine update or runtime change flipped conditions so the server now expects heartbeats your client doesn’t send, so it began hanging.
That was a good 48 hour troubleshooting getting to this point.