Based on Vercel's and Anthropic's official docs, checked
How to deploy to Vercel with Claude Code
Vercel scores 5/5 on our Claude Code fit scale: its official plugin gives Claude Code deployment skills, slash commands, and MCP tools. Vercel turns a git push or one CLI command into a live URL, with a preview deployment for every branch and environment variables that follow your code. Its official plugin gives Claude Code the deployment skills, slash commands, and MCP tools to run the whole flow for you. This guide takes you from the CLI to a production deploy, using only Vercel's and Anthropic's official instructions.
1. Install the Vercel CLI and log in
Every Vercel workflow starts with the CLI, whether or not you use an AI coding agent. Agents that can run terminal commands use it to deploy, pull environment variables, and manage projects. You need a Vercel account and Node.js 20 or later. Install the CLI globally with your package manager, then log in and follow the prompts to authenticate with your Vercel account.
npm i -g vercel vercel login2. Install the Vercel plugin for Claude Code
The Vercel plugin gives Claude Code deployment skills, framework best practices, and slash commands such as /vercel-plugin:deploy prod and /vercel-plugin:env. Install it with the plugins command. It activates automatically, and no configuration is needed. The plugin also ships three specialist agents for deployment, performance optimization, and AI architecture, plus skills for deployments and CI/CD, environment variables, domains, and the Vercel CLI.
npx plugins add vercel/vercel-pluginThis is the install command Vercel documents now. An older route through Claude Code's official marketplace used a /plugin install command, but the command above is the one on Vercel's plugin page, so use it.
Source: https://vercel.com/docs/agent-resources/vercel-plugin
3. Connect the Vercel MCP server
Connect the Vercel MCP server so your agent can search the docs, manage projects and deployments, and query Web Analytics. The MCP server lives at https://mcp.vercel.com and uses OAuth, so you sign in through your browser instead of handing Claude a token. Run the add-mcp command, then check the connection with /mcp inside a Claude Code session, which lists connected servers and their status.
npx -y add-mcp https://mcp.vercel.com -g4. Deploy a preview
Move into your project directory and run vercel. The CLI detects your framework, builds your project, and deploys it, then prints a preview URL. Preview deployments are the safe way to test before production: share the URL, click through the app, and fix what breaks before you promote anything.
vercelIf you have no account yet, you can still deploy. Run
vercel deploy --temporaryinstead, and the CLI prints a claim URL you use to keep the project when you create your account.5. Add environment variables
Add variables in the dashboard under Settings, Environment Variables, or from the CLI. Scope each variable to Production, Preview, or Development, and pick its type: Config values stay readable to members with access, while Secret values are write-only after saving and cannot be viewed or retrieved. The change takes effect on your next deployment, not on the one already live, so redeploy after you add a variable.
vercel env add DATABASE_URL production vercel env pullPull the same values into local development with vercel env pull, which writes the Development variables to .env.local and adds .env.local to .gitignore automatically. Never put secrets in NEXT_PUBLIC_ variables: Next.js bakes those into the client bundle at build time, so anyone can read them. Server-only variables stay on the server, where your Route Handlers, Server Components, and Server Actions can read them.
Source: https://vercel.com/kb/guide/how-to-add-vercel-environment-variables
6. Ship to production and connect Git
When the preview looks right, deploy to production. This command deploys to your primary production domain and updates all custom domains connected to your project, so only run it when the code is tested.
vercel --prodFor the hands-off route, connect your repo instead. In the dashboard, go to the New Project page, connect your GitHub, GitLab, or Bitbucket account, select the repo, and click Deploy. Every push to your connected branch then triggers a new deployment automatically, with a preview for each pull request. From then on, your normal git workflow is your deploy workflow.
Preview vs production: which URL is which
A preview deployment is a temporary URL for one deploy, made for testing. It is the default when you run vercel without flags. A production deployment is the live site on your primary production domain, made with vercel --prod or a push to your production branch. Treat previews as disposable and production as the one your users see. If a production deploy goes wrong, the dashboard's Deployments page lets you roll back to an earlier deployment.
The plugin's deployments-cicd skill covers the deploy, promote, and rollback flows, so ask Claude to walk you through a rollback instead of guessing at the dashboard. And never deploy to production from a feature branch: preview from feature branches, and let only your main branch promote.
What the plugin adds beyond the CLI
The CLI deploys your code. The plugin teaches Claude how to use Vercel well. Its skills cover the AI SDK, auth integrations for Clerk, Better Auth, Descope, and Auth0, Marketplace provisioning with vercel install, routing and middleware, caching, queues, storage, and the Vercel CLI itself. You can call a skill directly, for example /vercel-plugin:deploy prod to ship production, or /vercel-plugin:env to manage variables. The plugin also gives you Vercel Agent in the dashboard and Slack for code review and investigations.
If your project needs a database, blob storage, or another backing service, provision one from the CLI and let Vercel wire the credentials in automatically. Run vercel install neon, vercel install upstash, or vercel install supabase, and the integration provisions the resource, connects it to the linked project, and syncs the environment variables into .env.local.
Then just ask
With the plugin installed, you can hand the whole job to Claude in plain words. Try this prompt, and ask Claude to show you the plan before it changes files:
"Help me deploy to Vercel in this project. Follow the Vercel skills, keep secrets in environment variables, and show me the plan before changing files."
Next steps
How to add Clerk authentication with Claude Code
How to add Stripe payments with Claude Code
How to add a Supabase database with Claude Code
How to deploy to Railway with Claude Code
Claude Code integrations: email, queues, workers and more
How to install Claude Code on macOS, Linux and Windows
Frequently asked questions
No, not for your first deploy. Run vercel deploy --temporary and the CLI prints a claim URL you use to keep the project when you create your account. For anything beyond a first test, create the account first.
Sources
- https://vercel.com/docs/getting-started-with-vercel · checked 2026-11-15
- https://vercel.com/docs/agent-resources/vercel-plugin · checked 2026-11-15
- https://vercel.com/docs/agent-resources/vercel-mcp · checked 2026-11-15
- https://vercel.com/kb/guide/how-to-add-vercel-environment-variables · checked 2026-11-15
- https://vercel.com/docs/cli · checked 2026-11-15
- https://code.claude.com/docs/en/mcp · checked 2026-11-15