Vibeleaderboard
← All Intel
Intel / article

Vercel Connect now supports TanStack AI

Source
vercel.com
Author
Ben Sabic
Date

Context

Vercel Connect's TanStack AI integration handles authentication when an calls an OAuth-protected server, a service exposing tools to the agent. Its transport adapter asks Connect for authentication before each request, moving recurring access-credential handling into that service.

The integration also places consent in the application's user flow. If access has not been granted, client creation raises a consent challenge before the model runs. The application can redirect the person to approve access, instead of allowing the problem to reach the model later as a failed tool call. Developers still need to handle that redirect in their application.

Key takeaways · AI-distilled
  • 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 MCP request, which is how Vercel says 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
  • 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.
  • 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.
More from Ben Sabic
Recommended reads
Comments

Checking sign-in…

Loading comments…