Tutorial7 min readUpdated · Published

Deploy to Vercel With an AI Agent

To deploy to Vercel with an AI agent, connect the official Vercel MCP to your agent client over OAuth, approving one team. The agent can then list deployments, read build output, audit environment variables and domains, create a preview or production deployment from Git or from files, and attach a domain. Production is the one call to keep behind your confirmation — the server itself does not ask.

Before you start

You need a Vercel project (or files to deploy), a team or hobby account, and a client Vercel has reviewed (Claude Desktop, Claude Code, ChatGPT, Cursor, VS Code and others). The only setup decision is which team to approve on the consent screen — and the answer is always the one team that owns the project.

Step by step

1

Connect the Vercel MCP over OAuth

Add https://mcp.vercel.com to your agent client — in Claude Code, claude mcp add --transport http vercel https://mcp.vercel.com, then /mcp to sign in — and approve access for the one team that owns the project, not every team you belong to. Adding the server does not complete authorization; the consent screen does.

2

Ask the agent to inspect the project

Have the agent list deployments and read the latest build output (list_deployment_events) so you both share the same picture of current state before changing anything.

3

Deploy to a preview

Ask the agent to create a preview deployment: create_deployment from the project's Git source, or from files for a site with no repository. Previews are the default; production needs target: "production", which is the call to keep behind your confirmation.

4

Attach the domain if the site needs one

add_project_domain puts a domain on the project, and if Vercel manages the DNS the agent can write the records too. For a name registered elsewhere, the agent needs that registrar's server for the DNS half.

5

Promote and roll back as needed

After smoke-testing the preview, ask for a production deployment; if a release regresses, list_deployments with the rollback-candidate filter shows what you can go back to, and the agent redeploys the last-known-good one.

What the agent can read and do

ToolEffect
list_projects / list_deploymentsRead — overview of projects and recent deploys
list_deployment_events / get_runtime_logsRead — build output and runtime logs to debug a failure
list_project_domainsRead — domains attached to a project and their verification state
create_deploymentWrite — from Git or files; preview by default, production with target
add_project_domainWrite — attaches a domain to the project
get_purchase_quote / buy_domainRead, then write — a quote first, then a purchase at the quoted price

Three settings that keep the agent safe

Approve one team on the consent screen, not every team you belong to. Keep production deployments behind your client's confirmation prompt — the server does not gate them itself. And sanitize build output — the MCP masks env values, but a build that echoes a secret to the log will leak it regardless.

Frequently asked questions

How do I deploy to Vercel with an AI agent?

Connect the official Vercel MCP at mcp.vercel.com to your agent client — Claude Code, Claude Desktop, ChatGPT, Cursor or VS Code — over OAuth, approving one team. The agent can then list deployments, read build output, audit environment variables and domains, create a preview or production deployment from Git or from files, and attach a domain. The MCP wraps the Vercel REST API; Vercel still does the build and hosting.

Does the Vercel MCP let an agent deploy without my approval?

It can, if you let it. create_deployment with target: "production" moves live traffic, and the server has no confirmation layer of its own. Most clients prompt before a tool call that writes — leave that on — and tell the agent in the prompt to deploy previews only unless you say otherwise. Since July 2026 the server is no longer read-first: it deploys, buys domains and edits DNS.

Can the agent see my production secrets?

No. The Vercel MCP returns environment variable names, scopes, and update times, but masks the values — it intentionally does not expose secret values to the model context. The one residual risk is that build logs can leak secrets if your application echoes them, so sanitize on the build side.

Which clients does the Vercel MCP work with?

Only clients Vercel has reviewed: Claude Code, Claude.ai and Claude Desktop, ChatGPT, Codex CLI, Cursor, VS Code with Copilot, Devin, Raycast, Goose, Windsurf, Gemini Code Assist and CLI, OpenCode and Pi as of September 2026, plus a Vercel team or hobby account. It is a hosted server at mcp.vercel.com; there is no local install.

How is this different from deploying through the Vercel dashboard?

The operations are identical — both call the Vercel API. The difference is the interface: the agent reads your intent, creates the deployment, reads the build output, and reports back in the conversation, so you stay in chat instead of switching to the dashboard.

Continue reading

Compare Vercel against the other hosting MCPs, or read the cross-platform deploy loop.

Related guides

Browse all 64 guides