Frameworks and Adapters for Vercel Connect
Vercel Connect is available on all plans and is subject to the Vercel Connect terms
Vercel Connect integrations adapt connector tokens, consent, and webhook verification to the frameworks you already use. Choose an integration based on the task your application needs to perform.
| Integration | Package | Use it to |
|---|---|---|
| AI SDK and MCP | @vercel/connect/ai-sdk or @vercel/connect/mcp | Authenticate an MCP client, request user consent, and pass MCP tools to an AI SDK model |
| TanStack AI | @vercel/connect/tanstack-ai | Authenticate MCP transports, handle user consent, and pass MCP clients to TanStack AI |
| eve | @vercel/connect/eve | Authorize eve connections, supply channel credentials, and verify Connect OAuth gateway tokens |
| Chat SDK | @vercel/connect/chat | Supply adapter credentials and verify trigger-forwarded webhooks |
| Better Auth | @vercel/connect/betterauth | Sign users into an application through Connect with Better Auth |
| Auth.js | @vercel/connect/authjs | Add a Connect OAuth provider to Auth.js |
AI SDK and framework-agnostic MCP clients use the same
connectAuthProvider() implementation. Import it from the entry point that
matches your client. For TanStack AI, use
connectMCPTransport()
to build the transport configuration with a Connect auth provider.
Use the root @vercel/connect package when you need a provider token without a
framework adapter. Its APIs let you:
- Request app, user, federated, or exchanged tokens with
getToken()andgetTokenResponse() - Start an interactive authorization flow with
startAuthorization() - Select installations, scopes, audiences, resources, and authorization details
Follow the Quickstart to create and link a connector. See Tokens to choose a subject and scopes, and use the SDK Reference for the root API.
Every integration authenticates the calling project through Vercel OpenID Connect (OIDC). Link your local directory and pull a development token:
vercel link
vercel env pullVercel provides VERCEL_OIDC_TOKEN automatically after deployment. Your
connector must also have a project link
for each environment that requests credentials.
Vercel Connect has adapters for AI SDK, Model Context Protocol (MCP) clients, TanStack AI, eve, Chat SDK, Better Auth, and Auth.js. Each adapter is an entry point of the @vercel/connect package, such as @vercel/connect/chat or @vercel/connect/authjs. For code that doesn't use one of these frameworks, call getToken() from the root @vercel/connect package, or use the Python SDK, vercel-connect. See the TypeScript SDK Reference and Python SDK Reference.
No. Install @vercel/connect once and import the entry point that matches your framework. The package declares frameworks such as ai, better-auth, and eve as optional peer dependencies, so installing it doesn't add frameworks you don't use. Install the framework packages your application already needs alongside it.
Choose based on whether you need to sign users in or call a provider's API. The Better Auth and Auth.js adapters sign a person into your application through a connector and create an application session. They don't return a token for the provider's API. To call a provider API as your app or on behalf of a user, request a short-lived token with getToken(), or use the AI SDK, MCP, TanStack AI, eve, or Chat SDK adapters, which request tokens for you. To require sign-in before a visitor reaches a deployment, use Vercel Passport.
Yes. On Vercel, your project's OIDC token authenticates AI SDK requests to AI Gateway and token requests to Vercel Connect, so an agent can call models and third-party services without stored API keys. Locally, vercel env pull writes one development token that both read. AI Gateway uses the token to authorize model requests. Vercel Connect checks it against the connector's project links before it issues a provider token. See AI Gateway OIDC authentication.
Yes. In external CI/CD or on other hosting, VERCEL_OIDC_TOKEN isn't available, so pass a Vercel access token to the SDK with the vercelToken option. The token's project must be linked to the connector. An access token can request only an app subject or its own user. To request tokens on behalf of other users, run the code on Vercel, where the OIDC token represents the project. See Access token authentication.
Was this helpful?