agents
agents copied to clipboard
mcp-client: auth callback fails due to hibernation
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