Vercel Connect now supports TanStack AI
TanStack AI agents can reach OAuth-protected MCP servers through Vercel Connect, with per-user token refresh and consent handled before model execution.
The **@vercel/connect/tanstack-ai** entry point adds **connectMCPTransport**, which attaches Vercel Connect authentication to a TanStack MCP transport and refreshes the token before each request.
Catch **getConsentChallenge** around createMCPClient and redirect to the supplied consent URL. Handling this before the model runs prevents authorization failures from becoming tool-error text in the conversation.
The **@vercel/connect/tanstack-ai** entry point adds **connectMCPTransport**, which attaches Vercel Connect authentication to a TanStack MCP transport and refreshes the token before each request. Catch **getConsentChallenge** around createMCPClient and redirect to the supplied consent URL. Handling this before the model runs prevents authorization failures from becoming tool-error text in the conversation. The material demonstrates an HTTP Linear MCP client with per-user identity, but does not describe support for other transport types, deployment environments, or failure recovery beyond consent.
This makes user-scoped MCP authorization an explicit pre-agent control flow in TanStack AI: attach refreshed credentials to each request and resolve consent before tool execution. It narrows the integration guidance to HTTP MCP and one demonstrated service, leaving transport portability, retry behavior, and recovery from non-consent authentication failures open.