Skip to content

Vercel CLI

15.0k stars
official open-source Has MCP Cross-platform Actively maintained

Vercel's official command-line interface. Deploy, preview, and manage web applications, serverless functions, and edge infrastructure from your terminal.

Vercel CLI has both a CLI and an MCP server. See when to use each

Part of the Vercel CLI tools for AI agents

What your agent can do

Vercel has separate environment variable tabs for Production, Preview, and Development. Add a new API key in Production, forget to add it in Preview, and spend 30 minutes debugging why your preview deployment is broken. Your agent runs `vercel env pull` and syncs every variable to your local environment in one command. No stale values, no copy-paste errors, no debugging environment mismatches.Your agent deploys with a single command. `vercel deploy` uploads your code, builds it on Vercel's infrastructure, and returns a unique preview URL in seconds. `vercel deploy --prod` sends your build straight to the live domain. The power move most developers miss: `vercel deploy --prebuilt` skips Vercel's build system entirely, deploying pre-built output directly. This eliminates "works locally but fails on Vercel" bugs and bypasses the remote build queue.The local development server `vercel dev` replicates Vercel's routing, serverless functions, and edge middleware on your machine. Your agent catches deployment issues locally instead of discovering them after pushing. For projects using serverless functions, edge functions, or rewrites, this is the most accurate way to test.Vercel has published CLI Workflows documentation explicitly targeting AI agent consumption at `/docs/agent-resources/workflows`. The platform is building for agent-driven deployment. Your agent can manage the full lifecycle: `vercel link` to connect a project, `vercel env pull` to sync secrets, `vercel build` for local testing, `vercel deploy --prod` for production, and `vercel logs` for debugging.For teams running CI/CD outside Vercel's Git integration (Azure DevOps, GitLab, any non-GitHub CI), the CLI is the deployment interface. Set `VERCEL_TOKEN`, `VERCEL_ORG_ID`, and `VERCEL_PROJECT_ID`, and your agent deploys from any pipeline that has Node.js.

Limitations

Project creation, team management, billing, and marketplace browsing are dashboard-only. The CLI requires network access for everything except `vercel dev`. Vercel-only, with no cross-platform deployment support. For monorepos with complex routing, the Git integration may handle build configuration more cleanly than manual CLI flags.

Key Commands

vercel Deploy the current project to Vercel with a preview URL
vercel dev Start a local development server that mirrors the Vercel production environment
vercel env pull Download environment variables from your Vercel project into a local .env file
vercel domains List, add, or remove custom domains for your project
vercel deploy --prod Deploy directly to your production domain, bypassing the preview step
vercel logs Stream real-time logs from your deployment's serverless functions
vercel link Link a local directory to an existing Vercel project

GitHub Stats

repo vercel/vercel
stars 15.0k
language TypeScript
license Apache-2.0
last commit Mar 14, 2026

FAQ

Is Vercel CLI free?
Yes. The Vercel CLI is free and open-source under the Apache 2.0 license. Deployments are billed per your Vercel account plan (Hobby free tier, Pro, or Enterprise). The CLI is the interface, not the billing boundary. Install with `npm i -g vercel` and authenticate with `vercel login`.
How do you install Vercel CLI?
Run `npm i -g vercel` to install globally. Also available via `pnpm i -g vercel` or `yarn global add vercel`. After installing, run `vercel login` to authenticate via the browser. The CLI stores your auth token locally. Your agent can then run any Vercel command without re-authenticating.
What is the difference between vercel and vercel deploy --prod?
`vercel` (no flags) creates a preview deployment with a unique URL for testing. `vercel deploy --prod` deploys directly to your production domain. Your agent uses preview deployments for work-in-progress sharing and production deploys for shipping. Add `--prebuilt` to skip Vercel's build system and deploy pre-built output directly.
Can you use Vercel CLI in CI/CD pipelines?
Yes. Set `VERCEL_TOKEN` in your CI environment and use the `--yes` flag to skip prompts. Your agent runs `vercel deploy --prod --token $VERCEL_TOKEN` for automated production deployments. Works in GitHub Actions, GitLab CI, CircleCI, and any environment with Node.js.
Does Vercel have an MCP server?
Yes. Vercel provides an official MCP server at mcp.vercel.com with OAuth-secured access to your projects, deployments, and logs. There is also a community-built `vercel-mcp` npm package. Your agent can use CLI commands for deployment operations and MCP for read access to project state.

Last verified: Mar 14, 2026