Expert guidance on securely obtaining and managing third-party OAuth tokens for applications using Vercel Connect.
Install
mkdir -p .claude/skills/vercel-connect && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19532" && unzip -o skill.zip -d .claude/skills/vercel-connect && rm skill.zipInstalls to .claude/skills/vercel-connect
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Vercel Connect expert guidance — securely obtain scoped OAuth tokens for third-party services (Slack, GitHub, MCP servers, OAuth, Snowflake) on behalf of apps or users via Vercel OIDC. Use when wiring up third-party API access, connecting to MCP servers, sending Slack messages, accessing GitHub APIs, receiving webhook events from Slack/Linear/GitHub and forwarding them to your agents and apps, or building Eve agent connections.Key capabilities
- →Obtain scoped OAuth tokens
- →Connect to MCP servers
- →Authenticate third-party API calls
- →Manage app-level and user-level tokens
- →Configure webhooks for agents
How it works
Vercel Connect uses Vercel OIDC tokens to authenticate and exchange for scoped third-party tokens via the Vercel API, supporting user, app, and JWT-bearer subjects.
Inputs & outputs
When to use vercel-connect
- →Obtain Slack bot token via Vercel Connect
- →Configure GitHub OAuth for agent integration
- →Connect to an MCP server using OIDC
- →Set up third-party token handling for an app
About this skill
Vercel Connect Skill
Overview
Vercel Connect gives applications short-lived provider credentials without storing provider API keys or refresh tokens in project environment variables. A Vercel deployment authenticates with its project OIDC token. External CI or non-Vercel runtimes can pass a scoped Vercel access token through options.vercelToken.
Connectors are owned by a Vercel team. A consuming project and environment must be linked to the connector before it can request credentials. The connector UID, such as slack/acme-slack, is the stable identifier used by the SDK and CLI. Always use the UID or scl_... ID returned by create or list.
When to Use Vercel Connect
Use Vercel Connect when you need to:
- Send messages via Slack (as a bot or on behalf of a user)
- Access GitHub repositories or APIs
- Connect to any third-party system that requires OAuth tokens or API credentials
- Obtain scoped, short-lived provider credentials for authenticated API calls
- Forward provider events to applications through Vercel Connect triggers
Modes of tokens
The SDK supports four subject types. Pick based on what's acting:
user: actions performed on behalf of a specific end user (e.g., post a Slack message as the user). Requires a useridand optionalissuer.app: actions performed as the app itself (e.g., post as a Slack bot or use a GitHub installation). It skips per-user consent but may still require a provider installation or supported app grant.jwt-bearer: federated identity through the OAuth JWT-bearer grant. Passsub(required), plus optionaliss,aud, andadditionalClaims.token: token exchange. Pass{ token }with an existing subject token; the SDK inferstype: "token"in@vercel/connect2.4.0+.
For user subjects, derive subject.id from a stable identity in the authenticated server-side session. Never accept it from a request body or other client input. Keep getToken(), Connect auth providers, and MCP clients on the server.
CLI
The vercel connect CLI operates in the selected Vercel team and supports machine-readable output with --format=json or -F json.
Use the full lifecycle instead of assuming connector creation also authorizes a project:
# Inspect connectors linked to the current project, or all team connectors
vercel connect list
vercel connect list --all-projects
# Inspect supported setup options, then create a connector
vercel connect create <service> --help
vercel connect create <service>
# Link the connector to the current project and selected environments
vercel connect attach <connector>
# Request a scoped provider token
vercel connect token <connector> --subject app
The CLI also supports detach, update, remove, and open. Run vercel connect <command> --help before using optional installation, scope, trigger, branch, or custom-environment flags.
Use current-project behavior from a Vercel-linked project directory. Creating a connector and attaching it are distinct operations. Connector creation or token authorization may open a browser. Show the returned URL and wait for the person to finish the provider flow. --yes permits automatic browser opening; it does not force reauthorization.
vercel connect create <service> supports 100+ services (for example slack, github, microsoft, linear, snowflake, salesforce, notion, okta), plus any OAuth or MCP server URL. Run vercel connect create <service> --help to see that service's products, connection methods (oauth, api-key, mcp, custom-server, etc.), and required credentials before registering it.
For MCP servers there are two ways to register. For a known service, run vercel connect create <service> and pick the MCP connection method (e.g. vercel connect create linear --name my-agent gives the connector linear/my-agent). For any other OAuth-protected server, pass its URL (e.g. vercel connect create mcp.linear.app --name linear): Vercel discovers the OAuth endpoints from the URL and creates a custom OAuth connector (oauth/linear). Either way, attach it to the project with vercel connect attach <connector> before requesting tokens. The service name or URL you pass to create is not necessarily the MCP runtime URL; that goes in the connection's url.
JavaScript/TypeScript SDK (@vercel/connect)
For JavaScript/TypeScript code, use the @vercel/connect package directly:
import { getToken } from "@vercel/connect";
// Get a token for Slack bot
const token = await getToken("slack/acme-slack", {
subject: { type: "app" }, // If sending as a bot, or else use "user"
});
// Use the token
const response = await fetch("https://slack.com/api/chat.postMessage", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
channel: "C1234567890",
text: "Hello from Vercel Connect!",
}),
});
On Vercel, the SDK reads VERCEL_OIDC_TOKEN automatically. For local development, run vercel link followed by vercel env pull. Development OIDC tokens expire, so pull again when authentication fails. For external CI or non-Vercel hosting, pass a scoped Vercel access token through the third options argument.
Use getToken() immediately before calling the provider and let the SDK cache identical requests. Scope each SDK request to what it needs with installationId, scopes, audience, resources, or authorizationDetails. The CLI supports subject, installation, and scopes, but not every SDK field. Do not invent CLI flags for SDK-only parameters.
Use these root APIs when needed:
getTokenResponse()for token metadata such as expiry and connector details.getConnectorMetadata()to inspect connector metadata and provider-specific public configuration.startAuthorization()afterUserAuthorizationRequiredErrorto begin user consent.revokeToken()anddeleteTokenCacheEntry()for revocation and cache eviction.forceRefreshandvalidityBufferMsonly when the default cache behavior does not fit the call.
Passport-authenticated users: @vercel/passport
If the application already authenticates users with Passport, pass the identity returned by requireIdentity() directly as the Connect subject. There is no need to manually construct a separate user subject:
import { getToken } from "@vercel/connect";
import { requireIdentity } from "@vercel/passport";
const identity = await requireIdentity();
const token = await getToken("slack/xaa-slack", {
subject: identity,
scopes: ["users:read"],
});
Keep both calls on the server. Replace slack/xaa-slack with your linked connector UID and request only the scopes needed by the operation; users:read is the scope used in this example. Passport supplies the authenticated user identity, while Connect supplies the provider API token. Connector attachment and provider authorization requirements still apply.
eve agents: @vercel/connect/eve
When the project is built on eve, prefer the connect helper over calling getToken directly inside connection definitions. It wires token requests and interactive authorization into eve's connection runtime:
// agent/connections/linear.ts
import { defineMcpClientConnection } from "eve/connections";
import { connect } from "@vercel/connect/eve";
export default defineMcpClientConnection({
url: "https://mcp.linear.app/mcp",
description: "Linear workspace: issues, projects, cycles, and comments.",
auth: connect("linear/my-agent"),
});
Key points for the agent:
- Omit
principalTypefor the default per-user OAuth flow, or setprincipalType: "app"for app-scoped tokens. - Pass the connector UID directly with
connect("linear/my-agent"), or useconnect({ connector: "linear/my-agent" })when you need options. - For scopes, audiences, or
authorizationDetails, pass them throughtokenParams. For a custom challenge prompt, passinstructions. Both are optional. eveis an optional peer dependency, so the rest of@vercel/connect(CLI,getToken, etc.) is unaffected for non-eve consumers.
Slack channel: connectSlackCredentials
For eve Slack channels (agent/channels/slack.ts), use connectSlackCredentials(connector) from @vercel/connect/eve. It returns a complete SlackChannelCredentials object. Both the bot token and inbound webhook verification are handled by Vercel Connect, so you do not need SLACK_BOT_TOKEN or SLACK_SIGNING_SECRET env vars:
// agent/channels/slack.ts
import { slackChannel } from "eve/channels/slack";
import { connectSlackCredentials } from "@vercel/connect/eve";
export default slackChannel({
credentials: connectSlackCredentials("slack/my-agent", {
installationId: "inst_workspace_xyz",
}),
});
What the helper wires up:
botToken: a function that requests an app token when the channel needs it. Connect stores and refreshes installation credentials.webhookVerifier: a Vercel OIDC verifier (vercelOidc()). Vercel Connect forwards verified Slack webhooks to your app as signed Vercel OIDC requests; the helper verifies that signature instead of the raw Slack signing secret.
Without an explicit installationId, a channel helper uses the connector's default installation. It does not infer the correct installation from an inbound workspace or organization. Multi-tenant applications must resolve a trusted installation mapping and pass the resulting ID as the helper's second argument.
Use this whenever the project is on eve + Vercel Connect. It is the one-liner for both outbound posts and inbound webhook auth.
GitHub channel: connectGitHubCredentials
For eve GitHub channels (agent/channels/github.ts), use connectGitHubCredentials(connector) from @vercel/connect/eve. It returns a complete GitHubChannelCredentials object. eve uses th
Content truncated.
Prerequisites
Limitations
- →Commands must be run from the project or agent folder
- →Requires user to complete registration via URL
How it compares
It provides a secure, centralized way to handle third-party credentials via Vercel's infrastructure instead of managing raw environment variables.
Compared to similar skills
vercel-connect side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| vercel-connect (this skill) | 0 | 3mo | Caution | Advanced |
| ai-model-web | 1 | 4mo | Review | Intermediate |
| chat-sdk | 0 | 8mo | Review | Intermediate |
| backend-dev-guidelines | 10 | 3mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by vercel
View all by vercel →You might also like
ai-model-web
TencentCloudBase
Use this skill when developing browser/Web applications (React/Vue/Angular, static websites, SPAs) that need AI capabilities. Features text generation (generateText) and streaming (streamText) via @cloudbase/js-sdk. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). NOT for Node.js backend (use ai-model-nodejs), WeChat Mini Program (use ai-model-wechat), or image generation (Node SDK only).
chat-sdk
diegosouzapw
Expert on Vercel's Chat SDK for building production-ready AI chatbots. Use when user wants to build chatbot apps, add generative UI, create artifacts, or deploy AI chat interfaces. Triggers on mentions of chat-sdk, ai-chatbot, chatgpt clone, vercel chat, generative ui.
backend-dev-guidelines
langfuse
Comprehensive backend development guide for Langfuse's Next.js 14/tRPC/Express/TypeScript monorepo. Use when creating tRPC routers, public API endpoints, BullMQ queue processors, services, or working with tRPC procedures, Next.js API routes, Prisma database access, ClickHouse analytics queries, Redis queues, OpenTelemetry instrumentation, Zod v4 validation, env.mjs configuration, tenant isolation patterns, or async patterns. Covers layered architecture (tRPC procedures → services, queue processors → services), dual database system (PostgreSQL + ClickHouse), projectId filtering for multi-tenant isolation, traceException error handling, observability patterns, and testing strategies (Jest for web, vitest for worker).
nextjs-supabase-auth
davila7
Expert integration of Supabase Auth with Next.js App Router Use when: supabase auth next, authentication next.js, login supabase, auth middleware, protected route.
ai-sdk
vercel
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
better-auth
mrgoonie
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework. Features include email/password authentication with verification, OAuth providers (Google, GitHub, Discord, etc.), two-factor authentication (TOTP, SMS), passkeys/WebAuthn support, session management, role-based access control (RBAC), rate limiting, and database adapters. Use when adding authentication to applications, implementing OAuth flows, setting up 2FA/MFA, managing user sessions, configuring authorization rules, or building secure authentication systems for web applications.