The integration ships as the @vercel/connect/tanstack-ai subpath, whose connectMCPTransport wraps a TanStack transport config with a Connect-backed auth provider.
The auth provider runs before every MCPThe Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.Full definition → request, which is how Vercel says tokenThe chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.Full definition → stay fresh without the app storing or rotating credentials.
If a user has not granted access, createMCPClient fails with a consent challenge before the model runs; catching it with getConsentChallenge lets the app redirect the user to Connect's consent URL.
Vercel's stated reason for failing early: a consent error raised inside a tool call would reach the model as an error string instead of reaching the user as a redirect.
Terms in this piece · Glossary
MCP — The Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.
token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
Why it matters
Removes a recurring pain point in AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → development: manually handling OAuth token refresh and consent for third-party MCP servers like Linear.