How to use Claude Code with Vercel and Netlify without risky deploys

By: Irina Shvaya | October 14, 2026
This article is part of our Claude Code Guide: what Claude Code is, how to use it safely on a business website, and how to budget for and choose help. Want it set up for your team? See Claude Code consulting.

Vercel and Netlify both deploy your site from git. Push a branch or open a pull request and you get a preview; merge into the production branch and the change goes live. That makes them a natural fit for Claude Code, which works in git anyway. It also means the real safety question isn't "can Claude deploy?" but "who can push or merge to the production branch, and who can call the host's deploy tools?" The answer should always be: a person, after reviewing the change.

Both hosts also publish official MCP servers that let Claude manage projects and deployments, including deploying to production. This guide explains how previews and rollbacks work on each platform, what the MCP servers can do, and the Claude Code settings that keep unreviewed changes off your live site, as both vendors document them in October 2026.

Key Takeaways

  • On Vercel, pushes to a non-production branch, pull requests and CLI deploys without --prod create previews. Merges to the production branch deploy to production. A new project's first deployment is always production.
  • Netlify builds Deploy Previews for pull requests and agent runs. With the Netlify CLI, netlify deploy makes a draft deploy and netlify deploy --prod goes live.
  • Claude Code's auto mode allows pushes to any branch of your repository by default, including main. Add an ask rule for git push and protect the production branch with required reviews.
  • Vercel MCP (https://mcp.vercel.com) is on all plans and grants your AI tool "the same access as your Vercel user account." Its deploy_to_vercel tool takes a target of preview or production.
  • Rollbacks are fast on both, but behave differently afterward: Vercel pauses automatic production updates until you undo the rollback, while on Netlify the next git-triggered production deploy overwrites it unless you lock deploys.

How git-push deploys work on each host

VercelNetlify
Preview created byPushing to a non-production branch, opening a pull request, or a CLI deploy without --prodOpening a pull or merge request, or an agent run that changes files
Production deploy byMerging or pushing to the production branch (commonly main); vercel --prodBuilds of the production branch with auto publishing on; netlify deploy --prod
Preview linksA branch URL (latest on that branch) and a commit URL (that exact deploy)A Deploy Preview URL; agent runs use an agent- prefix plus the run ID
RollbackInstant Rollback to an earlier production deploymentPublish Deploy on any earlier successful deploy
Hold productionTurn off Auto-assign Custom Production Domains, so production builds wait for a manual PromoteLocked deploys (auto publishing off)
StagingCustom Environments on Pro and Enterprise; a preview branch as staging on all plansDeploy Previews per pull request
Official MCP servermcp.vercel.comnetlify-mcp.netlify.app/mcp, or a local package

Vercel's environments docs add one surprise worth knowing before you connect a new repository: "The first deployment of a new project is always a production deployment." If Claude helps set up a new project, make sure the first deploy is something you're happy to have live. If you're new to Vercel, our walkthrough on deploying GitHub projects to Vercel covers the basics.

The rule: Claude doesn't deploy to production

With git-push deploys, a push to main is a production deploy. Anthropic's auto mode docs say auto mode "allows pushes to any branch of the repository you're working in, including the default branch." So the guardrails go in three places: Claude Code's permission rules, your git host's branch protection, and the hosts' deploy tools.

A starting set of ask rules in your project's .claude/settings.json, which make Claude Code stop and ask before each of these runs:

{ "permissions": { "ask": [
"Bash(git push *)",
"Bash(vercel *)",
"Bash(netlify *)",
"Bash(npx vercel *)",
"Bash(npx netlify *)",
"mcp__vercel",
"mcp__netlify"
] } }

The last two cover each host's whole MCP server. A rule can also name a single tool, but Vercel's server has more than one way to change production, including create_deployment, deploy_to_vercel and promote and rollback tools, so a one-tool rule leaves gaps. Use the server names you chose when adding them. The npx lines matter because Claude Code doesn't strip npx before matching a rule. Ask rules still force a prompt in auto mode; our guide to Claude Code permission modes explains the order rules are checked in. Then:

  • Protect the production branch on GitHub (or your git host) so merging needs an approved pull request. Claude can open pull requests; a person merges them.
  • Never run with bypass mode on a project that can deploy. Anthropic says bypass mode "offers no protection against prompt injection or unintended actions."
  • Keep deploy tokens out of reach. Don't paste host tokens into prompts or CLAUDE.md, and deny reads of .env files.

Telling Claude "never deploy" in CLAUDE.md helps, but it's advice, not enforcement. The rules and branch protection are what hold. For the full safety picture, read whether Claude Code is safe for a live website.

Reviewing a preview

A preview is only useful if someone looks at it. On Vercel, share the commit-specific URL for review, since the branch URL moves as new commits land. On Netlify, each pull request gets its own Deploy Preview URL, and with deploy notifications on, Netlify comments the link on the pull request. Check, at minimum:

  • The pages the change touched, on mobile and desktop.
  • Titles, canonical tags and structured data on a sample of URLs.
  • Redirects, if any changed.
  • Forms, tracking and anything that sends data somewhere.

Claude can run many of these checks against the preview for you and report back, but a person should look at the pages. Our pre-deploy checklist lists the full set, and Claude Code in GitHub Actions for website QA shows how to run review checks on every pull request.

Previews can also leak unfinished work. Vercel's Standard Protection setting "Protects all deployments except production domains," so with it on, previews need a login. Check your project's Deployment Protection setting before sharing preview links outside the team.

Rollbacks: fast, but read the caveats

When something slips through, both hosts can put the previous version back quickly. Vercel's Instant Rollback docs describe it as "a way to quickly revert to a previous production deployment." Netlify's deploy management docs say publishing an earlier deploy "doesn't trigger a new deploy" and "Rollbacks are instantaneous."

CaveatVercelNetlify
How far backPro and Enterprise: any deployment previously aliased to production. Hobby: only the immediately previous deploymentAny earlier successful deploy still listed
SettingsChanged environment variables aren't updated; you get the previous build as it wasNot stated on the page
Scheduled jobsCron jobs revert to the rolled-back deployment's stateNot stated on the page
Next deployVercel turns off auto-assignment of production domains, so new pushes to the production branch don't replace the rollback until you undo itWith auto publishing on, the next git-triggered production deploy overwrites the rollback. Lock deploys to hold it

A rollback restores the deployed site, not data your site sent elsewhere, such as form submissions or emails. Review before merging, and treat rollback as the backup plan.

Vercel MCP

Vercel's MCP docs call it "Vercel's official MCP server," a remote server with OAuth. Add it to Claude Code with claude mcp add --transport http vercel https://mcp.vercel.com, then run /mcp to sign in and grant access to the teams you choose. Key facts as of October 2026:

  • Plans and clients: available on all plans. Vercel "only supports AI clients that have been reviewed and approved by Vercel," and Claude Code is on its list.
  • Access: "Connecting to Vercel MCP grants the AI system you're using the same access as your Vercel user account." Your existing Vercel permissions still apply.
  • Breadth: Vercel's tools reference covers 217 catalog tools, including deployments, logs, environment variables, domains and DNS, firewall settings and billing and purchases. That's far more than deploys.
  • Deploying: since July 2026, the server "can now deploy code directly to a new or existing project." The deploy_to_vercel tool requires a target, "preview" or "production," and create_deployment goes to production when its target is set to production. Vercel's reference says to prefer the Vercel CLI for local projects.
  • Vercel's own advice: "Always enable human confirmation in your workflows."

Status: Vercel announced the server in public beta in August 2025. The current docs page carries no beta label but still links that announcement, so don't assume either way. Because the server can change domains, settings and billing, start with read-only jobs, like checking a failed build's logs, and keep any write or deploy tool behind an ask rule.

Netlify MCP and CLI

Netlify recommends its remote MCP server. Netlify's Claude Code setup page gives claude mcp add --transport http netlify https://netlify-mcp.netlify.app/mcp, and, if remote servers are blocked, a local option: claude mcp add netlify -- npx -y @netlify/mcp. Netlify's GitHub README says the server can create, manage and deploy projects, modify access controls, install extensions, manage form submissions, and "Create and manage environment variables and secrets."

Two vendor details to note. Netlify's setup page asks for Node 24 or higher, while the MCP server's README says Node.js 22 or higher, so check both before installing. And the setup page describes three CLI deploy types:

  • netlify deploy: a draft deploy, which Netlify calls a "Safe way to test a deploy without deploying to production."
  • netlify deploy --prod: a production deploy.
  • Anonymous deploy: a temporary live URL you must claim within an hour. Netlify recommends it only if your project "doesn't contain sensitive information."

Netlify also offers Agent Runners, which run an AI agent for you from the Netlify dashboard with no local setup. Agent runs that change files build Deploy Previews, so the same review step applies.

A deploy workflow with Claude Code

  1. Claude works on a feature branch, never on main.
  2. It runs the build and your checks locally, then pushes the branch after you approve the push.
  3. The host builds a preview. Claude runs its checks against the preview and reports.
  4. A person reviews the diff and the preview, and fixes go back to step 1.
  5. Claude opens a pull request; required reviews block the merge until a person approves.
  6. A person merges, and the host deploys production from main.
  7. Someone checks the live pages. If something is wrong, roll back first, then fix on a branch.

Hosting a Next.js site? Next.js lists Vercel as a verified adapter and says Netlify offers its own integration while working on a verified adapter. See Claude Code for Next.js sites for the framework side.

Conclusion

Vercel and Netlify make deploying so easy that the main risk is deploying too easily. Let Claude Code work on branches, push only after you approve, and run checks against previews, while a person reviews and merges into the production branch. Put git push, host CLIs and MCP deploy tools behind ask rules, protect main with required reviews, and know your host's rollback limits before you need them. If you'd like a team to set up this pipeline or run it for you, see our Claude Code development services. More guides are in our Claude Code Guide.

Frequently asked questions

Can Claude Code deploy my site to Vercel or Netlify?

Yes: by pushing to a branch the host deploys from, by running the host's CLI, or through the host's MCP server. That's why each of those should require your approval, and why production deploys should come only from a reviewed merge.

Is a preview deployment safe to let Claude create?

Previews don't change your live site, so they're the right place for Claude's work. Check who can see them: on Vercel, Deployment Protection settings decide whether previews need a login.

What happens if a bad change goes live?

Roll back: Instant Rollback on Vercel, or Publish Deploy on an earlier deploy on Netlify. On Netlify with auto publishing on, lock deploys so the next git push doesn't overwrite the rollback. On Vercel, undo the rollback once the fix is merged, so production updates resume. Fix the problem on a branch either way.

Is the Vercel MCP server in beta?

Vercel announced it in public beta in August 2025. Its current docs page shows no label either way. Check the page before relying on it, and treat it as a tool with your full account access.

Should Claude have access to my host's environment variables?

Only if the job needs it. Both MCP servers can manage environment variables, and Netlify's can manage secrets. Keep those tools behind ask rules, and never paste secret values into prompts or CLAUDE.md.

Put this into action with eSEOspace

We help businesses grow with seo, geo & aeo that actually performs. Explore the services behind this guide:

Book a free strategy call →

Get a FREE Audit

We'll perform a comprehensive SEO, AEO, GEO & CRO audit of your website — completely free — and show you exactly how to outrank your competitors.

Don't have a site yet? Get in touch →

Get a FREE GEO/AEO/SEO Audit

We'll analyze your site's SEO, GEO, AEO & CRO — completely free — and show you exactly how to get found across Google and AI answers.

Don't have a site yet? Get in touch →

You Might Also like to Read