| description | Discover and install Vercel Marketplace integrations. Use to find databases, CMS, auth providers, and other services available on the Vercel Marketplace. |
|---|
Discover, install, and apply Vercel Marketplace integrations with guided setup and local verification.
- Project linked? — Check for
.vercel/project.jsonin the current directory or nearest parent.- If not found: run
vercel linkinteractively, then re-run/marketplace. - Do not attempt provisioning until the project is linked.
- If not found: run
- CLI available? — Confirm
vercelis on PATH.- If missing:
npm i -g vercel(orpnpm add -g vercel/bun add -g vercel).
- If missing:
- Repo state — Note uncommitted changes so the user can diff integration-related code changes later.
- Scope — Detect monorepo (
turbo.jsonorpnpm-workspace.yaml). If detected, confirm which package is targeted.
The marketplace command follows an apply-guide loop:
- Discover — Search the Marketplace catalog via
vercel integration discover. - Select — User picks an integration (or specifies one in "$ARGUMENTS").
- Guide — Fetch the agent-friendly setup guide via
vercel integration guide <name> --framework <fw>. - Install — Run
vercel integration add <name>for the automated happy path. - Confirm env vars provisioned — Explicitly verify required environment variables are set after provisioning.
- Apply code changes — Install SDK packages and scaffold configuration code.
- Verify drain — For observability integrations, confirm drain was auto-created and data is flowing.
- Run local health check — Verify the integration works locally before deploying.
If "$ARGUMENTS" specifies an integration name, skip directly to the Guide step.
For observability integrations (Datadog, Sentry, Axiom, etc.), the flow extends with drain verification — see Step 7.
No destructive operations unless the user explicitly confirms. Package installs and code scaffolding are additive.
# Search all available integrations
vercel integration discover
# Filter by category
vercel integration discover --category storage
vercel integration discover --category monitoring
vercel integration discover --category authentication
# List integrations already installed on this project
vercel integration listPresent integrations organized by category:
| Category | Examples |
|---|---|
| Database | Neon, PlanetScale, Supabase |
| Cache | Upstash Redis, Upstash KV |
| Auth | Clerk, Auth0 |
| CMS | Sanity, Contentful, Prismic |
| Payments | Stripe, LemonSqueezy |
| Monitoring | Datadog, Sentry, Axiom, Honeycomb |
Common replacements for sunset packages:
- Neon — Serverless Postgres (replaces
@vercel/postgres) - Upstash — Serverless Redis (replaces
@vercel/kv)
If the user hasn't specified one in "$ARGUMENTS", ask which integration to set up. Accept the integration name or slug.
# Get agent-friendly setup guide
vercel integration guide <name> --framework <fw>Use framework-specific guides by default when framework is known. If unknown, infer from the repo and confirm with the user.
The guide returns structured setup steps: required env vars, SDK packages, code snippets, and framework-specific notes. Present these to the user.
vercel integration add <name>vercel integration add is the primary scripted/AI flow. It installs against the linked project, auto-connects the integration, and auto-runs local env sync unless disabled.
If the CLI bounces to the dashboard for provider-specific completion, treat it as fallback and open the integration page directly:
vercel integration open <name>Complete the web step, then continue with env verification.
After installation, the integration auto-provisions environment variables. For observability vendors (Datadog, Sentry, Axiom), this also auto-creates log and trace drains.
Before applying code changes, verify the integration's required environment variables exist:
vercel env lsCheck that each variable name listed in the guide appears in the output. Never echo variable values — check names only.
- If local env sync was disabled or
.env.localis stale, run:
vercel env pull --yes- All present → Proceed to code changes.
- Missing vars → Tell the user which variables are missing. The integration install via
vercel integration add <name>typically provisions these automatically. Guide the user to provision them before continuing.
Install the SDK package:
npm install <sdk-package> # or pnpm add / bun addThen apply the code scaffolding from the guide:
- Create or update configuration files (e.g.,
db.ts,redis.ts,auth.ts) - Add initialization code following the guide's patterns
- Respect the project's existing conventions (TypeScript vs JavaScript, import style, directory structure)
Ask the user for confirmation before writing files.
Observability vendors installed via the Marketplace auto-create drains for logs and traces only. Speed Insights and Web Analytics need manual drain setup via the Dashboard or REST API.
| Data Type | Auto-configured by install? | How to set up |
|---|---|---|
| Logs | Yes | vercel integration add <vendor> |
| Traces | Yes | Same — auto-configured on install |
| Speed Insights | No | Manual drain via REST API or Dashboard (/~/settings/log-drains) |
| Web Analytics | No | Manual drain via REST API or Dashboard (/~/settings/log-drains) |
Confirm the auto-created drain landed:
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
"https://api.vercel.com/v1/drains?teamId=$TEAM_ID" | jq '.[] | {id, url, type, sources}'For Speed Insights / Web Analytics, create a drain manually:
curl -X POST -H "Authorization: Bearer $VERCEL_TOKEN" \
-H "Content-Type: application/json" \
"https://api.vercel.com/v1/drains?teamId=$TEAM_ID" \
-d '{
"url": "https://your-vendor-endpoint.example.com/vercel-analytics",
"type": "json",
"sources": ["lambda"],
"environments": ["production"]
}'- Drain present → Proceed to health check.
- No drain found → Integration may not auto-configure drains. Create one manually via Dashboard (
https://vercel.com/dashboard/{team}/~/settings/log-drains) or REST API. - Drain errored → Check the drain status in the Vercel Dashboard. Common fixes: endpoint URL typo, auth header missing, endpoint not accepting POST.
Verify the integration works locally:
vercel devOr run the project's dev server and test the integration endpoint/connection:
- Database → Confirm connection by running a simple query (e.g.,
SELECT 1) - Auth → Confirm the auth provider redirects correctly
- Cache → Confirm a set/get round-trip succeeds
- CMS → Confirm content fetch returns data
- Observability → Run
vercel logs <deployment-url> --follow --since 5mand confirm logs appear in the vendor dashboard
If the health check fails, review the error output and guide the user through fixes (common: missing env vars in .env.local, wrong SDK version, network issues).
After completing the apply-guide loop, confirm:
- Integration guide was retrieved via
vercel integration guide <name> --framework <fw> - Project was linked before provisioning started
- All required environment variables are provisioned on Vercel
- Local env sync is up to date (auto-sync succeeded or
vercel env pull --yesran) - SDK package installed without errors
- Code changes applied and match the guide's patterns
- For observability integrations: drain verified and test payload received
- Local health check passed (dev server starts, integration responds)
If any step fails, report the specific error and suggest remediation before continuing.
Present a structured result block:
## Marketplace Result
- **Integration**: <name>
- **Status**: installed | partially configured | failed
- **Package**: <sdk-package>@<version>
- **Env Vars**: <count> provisioned / <count> required
- **Drain**: configured | not applicable | manual setup needed
- **Health Check**: passed | failed | skipped
- **Files Changed**: <list of created/modified files>
Based on the outcome:
- Installed successfully → "Run
/deployto deploy with the new integration. Your environment variables are already configured on Vercel." - Env vars missing → "Provision the missing variables via the Vercel dashboard or
vercel integration add <name>, then re-run/marketplace <name>to continue setup." - CLI handed off to dashboard → "Run
vercel integration open <name>to complete the provider web step, then resume from env verification." - Drain not auto-created → "Create a drain manually via the REST API (
POST /v1/drains) or the Dashboard." - Need Speed Insights / Web Analytics export → "These data types require manual drain setup — they are not auto-configured by vendor installs. Configure via Dashboard or REST API."
- Health check failed → "Review the error above. Common fixes: copy env vars to
.env.localwithvercel env pull, check SDK version compatibility, verify network access." - Want another integration? → "Run
/marketplaceagain to browse available integrations." - Review changes → "Run
git diffto review all integration-related code changes before committing."