{"id":24891,"plugin_id":"plugin_connector_690a90ec05c881918afb6a55dc9bbaa1","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:18:44.864Z","digest":"e7f7d8b3e9fed013ecb2e2631b7f199d1d22619cfe28788cdf28e3d41965f150","against":5428,"payload":{"name":"vercel-connect","description":"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.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":128}],"skill_md_contents":"---\nname: vercel-connect\ndescription: 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.\nmetadata:\n  priority: 5\n  docs:\n    - \"https://vercel.com/docs/connect\"\n  sitemap: \"https://vercel.com/sitemap/docs.xml\"\n  pathPatterns:\n    - 'agent/connections/**'\n    - 'agent/channels/**'\n  importPatterns:\n    - '@vercel/connect'\n    - '@vercel/connect/eve'\n    - '@vercel/connect/authjs'\n    - '@vercel/connect/betterauth'\n  bashPatterns:\n    - '\\bvercel\\s+connect\\b'\n    - '\\bvc\\s+connect\\b'\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*@vercel/connect\\b'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@vercel/connect\\b'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*@vercel/connect\\b'\n    - '\\byarn\\s+add\\s+[^\\n]*@vercel/connect\\b'\n  promptSignals:\n    phrases:\n      - \"vercel connect\"\n      - \"slack token\"\n      - \"slack bot token\"\n      - \"post to slack\"\n      - \"send slack message\"\n      - \"github oauth token\"\n      - \"linear oauth\"\n      - \"oauth token for\"\n      - \"third-party token\"\n      - \"connect to slack\"\n      - \"connect to github\"\n      - \"connect to mcp\"\n      - \"mcp connection\"\n      - \"mcp server\"\n      - \"snowflake connection\"\n    allOf:\n      - [slack, token]\n      - [github, token]\n      - [oauth, token]\n      - [mcp, connect]\n      - [mcp, server]\n    anyOf:\n      - \"vercel connect\"\n      - \"@vercel/connect\"\n      - \"oauth\"\n      - \"mcp\"\n    noneOf:\n      - \"supabase auth\"\n      - \"clerk\"\n      - \"auth0\"\n    minScore: 6\n---\n\n# Vercel Connect Skill\n\n## Overview\n\nVercel Connect enables to securely obtain scoped tokens for accessing third-party services on behalf of apps or users. It uses Vercel OIDC tokens to authenticate and exchange for Vercel Connect tokens via the Vercel API.\n\n## When to Use Vercel Connect\n\nUse Vercel Connect when you need to:\n\n- Send messages via Slack (as a bot or on behalf of a user)\n- Access GitHub repositories or APIs\n- Connect to any third-party system that requires OAuth tokens or API credentials\n- Obtain tokens for authenticated API calls\n\n## Modes of tokens\n\nThe SDK supports three subject types — pick based on what's acting:\n\n- **`user`** — actions performed on behalf of a specific end user (e.g., post a Slack message as the user). Requires a user `id` and optional `issuer`.\n- **`app`** — actions performed as the app itself (e.g., post as a Slack bot, app-level GitHub access). No consent flow — fails terminally if the connector is not installed.\n- **`jwt-bearer`** — RFC 7523 JWT-bearer exchange for connectors that accept a caller-minted assertion. Pass `sub` (required), plus optional `iss`, `aud`, and `additionalClaims`. Use when the third-party expects you to vouch for the subject via a signed JWT rather than an interactive OAuth grant.\n\n## Available Tools\n\nAll tools have `--format=json` option for machine-readable output.\n\n### 1. Vercel Connect CLI (for Bash/Shell)\n\nUse the `vercel connect` CLI for command-line operations. Use `vercel connect --help` to get available commands. The user needs to be authenticated to the Vercel CLI and the commands work within the scope of the user's currently selected Vercel team. For eg it will create & list Connect connectors created within the currently selected Vercel team.\n\nImportant! Always run `vercel connect` commands from the **project or agent folder** that will consume the connection (the directory containing `package.json` / `vercel.json`). Vercel Connect reads the local project context to auto-configure the connection — for example, picking a sensible connector name and `uid`, setting up project access to the connection, configuring webhooks and triggers. Running from the repo root or an unrelated directory skips this auto-configuration and you'll have to wire things up by hand. If the user invokes a `vc connect` command from elsewhere, `cd` into the closest matching project/agent folder first (or pass `--cwd <DIR>`).\n\nExample commands:\n\n```bash\n# Create new Connect connector\nvercel connect create <service>\n\n# List existing Connect connectors\nvercel connect list\n\n# Get token\nvercel connect token <connector> --subject user|app\n```\n\nImportant! The `vercel connect create` and `vercel connect token` commands may open the browser for the user if there's a manual registration required (for eg completing the OAuth consent or installing a slack app to a workspace). The user must visit the browser to complete the process while you wait for the process to complete.\n\n#### Available Services\n\n| Service                | Modes      | Description                                |\n| ---------------------- | ---------- | ------------------------------------------ |\n| `slack`                | user, bot  | Slack API access                           |\n| `github`               | user, app  | GitHub API access                          |\n| MCP servers            | user, app  | Any MCP server (`mcp.<host>/<path>`)       |\n| `snowflake`            | user       | Snowflake data access                      |\n| Generic OAuth provider | user, app  | Any OAuth 2.0 server registered via `vercel connect create` |\n\nFor MCP servers, pass the full endpoint URL when registering (e.g. `vercel connect create https://mcp.linear.app/mcp`). The connector ID then takes the form `mcp.<host>/<name>` (for example `mcp.linear.app/myagent`).\n\n#### Example: Send a Slack message using curl\n\n```bash\nTOKEN=$(vercel connect token <connector>)\ncurl -X POST https://slack.com/api/chat.postMessage \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"channel\": \"C1234567890\", \"text\": \"Hello from Vercel Connect!\"}'\n```\n\n### 2. JavaScript/TypeScript SDK (`@vercel/connect`)\n\nFor JavaScript/TypeScript code, use the `@vercel/connect` package directly:\n\n```typescript\nimport { getToken } from \"@vercel/connect\";\n\n// Get a token for Slack bot\nconst token = await getToken(\"scl_abc123\", {\n  subject: { type: \"app\" }, // If sending as a bot, or else use \"user\"\n});\n\n// Use the token\nconst response = await fetch(\"https://slack.com/api/chat.postMessage\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${token}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    channel: \"C1234567890\",\n    text: \"Hello from Vercel Connect!\",\n  }),\n});\n```\n\nThe SDK uses the user's Vercel OIDC token to authenticate. The user should have run `vc env pull` to pull the OIDC token env variables locally (or `vc link` pulls it automatically)\n\n#### Eve agents — `@vercel/connect/eve`\n\nWhen the project is built on [Eve](https://eve.dev), prefer the `connect` helper over calling `getToken` directly inside connection definitions. The helper wires the full token / start-authorization / complete-authorization lifecycle into Eve's connection runtime, so a Vercel Connect-backed connection becomes a single declaration:\n\n```typescript\n// agent/connections/linear.ts\nimport { defineMcpClientConnection } from \"eve/connections\";\nimport { connect } from \"@vercel/connect/eve\";\n\nexport default defineMcpClientConnection({\n  url: \"https://mcp.linear.app/mcp\",\n  description: \"Linear workspace — issues, projects, cycles, and comments.\",\n  auth: connect(\"mcp.linear.app/myagent\"),\n});\n```\n\nKey points for the agent:\n\n- Omit `principalType` for the default per-user OAuth flow, or set `\"app\"` for app-scoped tokens (no consent flow — fail terminally if not installed).\n- Pass the connector id directly with `connect(\"mcp.linear.app/myagent\")`, or use `connect({ connector: \"mcp.linear.app/myagent\" })` when you need options.\n- For scopes, audiences, or `authorizationDetails`, pass them through `tokenParams`. For a custom challenge prompt, pass `instructions`. Both are optional.\n- `eve` is an optional peer dependency, so the rest of `@vercel/connect` (CLI, `getToken`, etc.) is unaffected for non-Eve consumers.\n\n##### Slack channel — `connectSlackCredentials`\n\nFor 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:\n\n```typescript\n// agent/channels/slack.ts\nimport { slackRoute } from \"eve/channels/slack\";\nimport { connectSlackCredentials } from \"@vercel/connect/eve\";\n\nexport default slackRoute({\n  credentials: connectSlackCredentials(\"slack/myagent\"),\n});\n```\n\nWhat the helper wires up:\n\n- `botToken`: a function that calls `getToken(connector, { subject: { type: \"app\" } })` on each inbound webhook, so token rotation, refresh, and multi-workspace tenancy are handled server-side.\n- `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.\n\nUse this whenever the project is on Eve + Vercel Connect — it's the one-liner for both outbound posts and inbound webhook auth.\n\n##### GitHub channel — `connectGitHubCredentials`\n\nFor Eve GitHub channels (`agent/channels/github.ts`), use `connectGitHubCredentials(connector)` from `@vercel/connect/eve`. It returns a complete `GitHubChannelCredentials` object — Eve uses the installation token directly (skipping its native GitHub App JWT exchange) and Vercel Connect handles rotation, refresh, and multi-installation tenancy server-side. You do **not** need `GITHUB_APP_PRIVATE_KEY`, `GITHUB_APP_ID`, `GITHUB_INSTALLATION_ID`, or `GITHUB_WEBHOOK_SECRET` env vars:\n\n```typescript\n// agent/channels/github.ts\nimport { githubRoute } from \"eve/channels/github\";\nimport { connectGitHubCredentials } from \"@vercel/connect/eve\";\n\nexport default githubRoute({\n  credentials: connectGitHubCredentials(\"github/myagent\"),\n});\n```\n\nWhat the helper wires up:\n\n- `installationToken`: a function that calls `getToken(connector, { subject: { type: \"app\" } })`. The helper pins `subject` to `\"app\"` — GitHub installation tokens are app-scoped.\n- `webhookVerifier`: a Vercel OIDC verifier (`vercelOidc()`). Vercel Connect forwards verified GitHub webhooks to your app as signed Vercel OIDC requests; the helper verifies that signature instead of the raw GitHub webhook secret.\n\n##### Linear channel — `connectLinearCredentials`\n\nFor Eve Linear channels (`agent/channels/linear.ts`), use `connectLinearCredentials(connector)` from `@vercel/connect/eve`. It returns a complete `LinearChannelCredentials` object — Vercel Connect manages the Linear app access token and webhook auth, so you do **not** need `LINEAR_API_KEY` or `LINEAR_WEBHOOK_SECRET` env vars:\n\n```typescript\n// agent/channels/linear.ts\nimport { linearRoute } from \"eve/channels/linear\";\nimport { connectLinearCredentials } from \"@vercel/connect/eve\";\n\nexport default linearRoute({\n  credentials: connectLinearCredentials(\"linear/myagent\"),\n});\n```\n\nWhat the helper wires up:\n\n- `accessToken`: a function that calls `getToken(connector, { subject: { type: \"app\" } })`. The helper pins `subject` to `\"app\"` — Linear Agent tokens are app-scoped.\n- `webhookVerifier`: a Vercel OIDC verifier (`vercelOidc()`). Vercel Connect forwards verified Linear webhooks to your app as signed Vercel OIDC requests; the helper verifies that signature instead of the raw Linear webhook secret.\n\n### 3. HTTP API (for other languages)\n\nFor other languages, make HTTP requests directly to the Vercel Connect server. The request must be authenticated with the project's Vercel OIDC token (`VERCEL_OIDC_TOKEN` env var — pulled by `vc env pull` or injected at runtime):\n\n```bash\n# Get a token via HTTP\nPOST https://api.vercel.com/v1/connect/token/<connector>\nAuthorization: Bearer <VERCEL_OIDC_TOKEN>\nContent-Type: application/json\n\n{ \"subject\": { \"type\": \"user\", \"id\": \"user_123\" } }\n```\n\nThe response is JSON with a `token` field (plus `expiresAt`, `connector`, and other metadata).\n\n#### Python Example\n\n```python\nimport os\nimport requests\n\n# Get token from Vercel Connect\nconnect_response = requests.post(\n    \"https://api.vercel.com/v1/connect/token/slack1234\",\n    headers={\"Authorization\": f\"Bearer {os.environ['VERCEL_OIDC_TOKEN']}\"},\n    json={\n        \"subject\": {\"type\": \"app\"},\n    },\n)\ntoken = connect_response.json()[\"token\"]\n\n# Use the token\nslack_response = requests.post(\n    \"https://slack.com/api/chat.postMessage\",\n    headers={\"Authorization\": f\"Bearer {token}\"},\n    json={\"channel\": \"C1234567890\", \"text\": \"Hello from Vercel Connect!\"}\n)\n```\n\n### 4. BetterAuth and AuthJS support\n\nWhen the app already uses [Better Auth](https://www.better-auth.com/) or [Auth.js](https://authjs.dev/) for end-user authentication, you can plug a Vercel Connect connector in as an OAuth provider instead of calling `getToken` directly. The `connect` helper on each subpath handles the token exchange so provider credentials stay in Vercel Connect rather than in framework config or env vars.\n\n#### Better Auth — `@vercel/connect/betterauth`\n\nOptional peer dependency: `better-auth`. Pass the connector through Better Auth's `genericOAuth` plugin. Connector UIDs can contain a `/` (e.g. `linear/myagent`), and Better Auth additionally requires a `providerId`:\n\n```typescript\nimport { genericOAuth } from \"better-auth/plugins\";\nimport { connect } from \"@vercel/connect/betterauth\";\n\ngenericOAuth({\n  config: [connect({ providerId: \"linear\", connector: \"linear/myagent\" })],\n});\n```\n\n#### Auth.js — `@vercel/connect/authjs`\n\nOptional peer dependency: `@auth/core`. Use the connector as an `OAuth2Config` provider. Connector UIDs can contain a `/` (e.g. `linear/myagent`), and Auth.js additionally requires an `id`:\n\n```typescript\nimport { connect } from \"@vercel/connect/authjs\";\n\nconst providers = [connect({ id: \"linear\", connector: \"linear/myagent\" })];\n```\n\n## Workflow\n\nAll tools have `--json` option for machine-readable output.\n\nBefore running any `vercel connect` step below, make sure your shell cwd is the project or agent folder that will use the connection (see the CLI section above). Vercel Connect uses that context to auto-configure the project, so running from the right directory removes follow-up wiring work.\n\n1. **Check existing Connect connectors**: See if a required Connect connector is already present\n\n   ```bash\n   vercel connect list\n   vercel connect token <connector>\n   ```\n\nImportant! If more than one connector found, allow user to make the choice between them, or ask to create a new one\n\n2. **Register**: If the provider you need is not registered of if the user asked to create a new connector / app / bot, follow the instructions to register it (this may involve setting up credentials on browser in the third-party service and then registering them with Vercel Connect).\n\n   ```bash\n   vercel connect create <service> [--name <app-name>]\n   ```\n\nImportant! Provide the most precise server URL for the service, including the complete connection URL (e.g. `https://mcp.linear.app/mcp` rather than just `linear`). Short service aliases may resolve to a default endpoint that does not match the transport or path the user actually wants. When in doubt, run `vercel connect create --help` to confirm which service names and URL forms are accepted before picking one.\n\nImportant! This command will give you a URL or directly open it to complete the registration process. User must visit that URL and follow the instructions to link their third-party account with Vercel Connect. The command will not complete until they finish the registration. The agent must clearly show the URL to the user and prompt them to complete the registration.\n\nImportant! Once `vercel connect create` completes, it will print a successful message. You must capture that connector ID for the next step.\n\nImportant! The `vercel connect create` command may open the browser so it's better to get the user approval before running it.\n\n3. **Get token**: Obtain a token for the provider you need:\n   On CLI, you can get the token via\n\n   ```bash\n   vercel connect token <connector> [--subject <subject>]\n   ```\n\nThe default subject is user. Use app for getting app scoped tokens. It's recommended to run this command with the `--yes` in case an re-authorization or installation is required. This will trigger the reauthorization flow for the user.\n\nImportant! Always put the token value into a variable and use the variable in the subsequent commands to avoid accidentally echoing the token in the terminal or logs. Avoid combining this command with other commands using `&&`. For example:\n\n```bash\nTOKEN=$(vercel connect token)\n```\n\nImportant! Try to reuse tokens as much as possible. If you already have a token with the required scopes, use it instead of requesting a new one, even when fewer scopes are needed. This will reduce friction for the user and avoid unnecessary authorization prompts.\n\nWhen working with a JavaScript/TypeScript code, use the `@vercel/connect` package directly:\n\n4. **Use token**: Use the token to authenticate with the third-party service.\n   For example:\n\n```typescript\nimport { getToken } from \"@vercel/connect\";\n\nconst token = await getToken(\n  \"connector-id\",\n  // Optional params:\n  {\n    subject: { ... },\n  },\n);\n```\n"},"changes":[{"path":"/included_files","type":"changed","before":[],"after":[{"relative_path":"agents/openai.yaml","size_in_bytes":128}]}],"summary":"Fields changed: 1. /included_files.","summary_kind":"deterministic","summary_metadata":{}}