agents icon indicating copy to clipboard operation
agents copied to clipboard

mcp-client: auth callback fails due to hibernation

Open klaemo opened this issue 5 months ago • 7 comments

So, I'm trying to connect to an authenticated mcp server from my chat agent. I basically threw the mcp-client example into the starter agent. And it almost worked 😅 But it fails to recognize the authentication callback url when i get redirected back from the mcp server's auth url. I added some logging and noticed the callbackUrls of the agent's this.mcp MCPClientManager was empty. This is why this.mcp.isCallbackRequest(request) always returns false.

Disabling hibernation of the agent MyAgent.options.hibernate = false; seems to fix it.

This is reproducible with the examples/mcp-client example

klaemo avatar May 04 '25 10:05 klaemo