shiply.now
Guides

How to Deploy a Static Site From an AI Agent (MCP & CLI Guide)

Skip the dashboards and build pipelines. Learn the two real ways to deploy a static site directly from Claude, Cursor, or ChatGPT using MCP or CLI—and get a permanent live URL in seconds.

You just finished building a site with Claude, Cursor, or ChatGPT. The code is clean, the design looks sharp, and you are ready to show it to the world. Then comes the friction: you copy files into a dashboard, click through a setup wizard, connect a Git repo you never wanted to create, and wait for a build pipeline that fails on a missing semicolon. Or worse, you get a preview URL that expires in 48 hours and a surprise bill when someone actually visits the page. There is a better way. This is exactly how to deploy a static site from an AI agent, without leaving your terminal or chat window. I have shipped dozens of sites this way and I will walk you through the two methods that actually work, the gotchas nobody talks about, and how to pick a host that does not punish you for shipping.

Table of Contents

Why Deploying From the Agent Changes the Game

The traditional deploy flow looks like this: write code, commit to Git, push to a remote, wait for CI/CD to build, wait for the deploy to finish, and finally get a URL. That is five or six steps after you already considered yourself done. For a solo builder shipping three client sites in a week, that friction adds up fast.

AI agents flip the script. Your agent already built the site inside the conversation. If you set it up right, the agent can also deploy it in one command and hand you a live URL before you finish your coffee. No dashboard, no repo, no waiting on a build pipeline you did not configure.

A modern computer screen displaying web design work, showcasing creative visuals in a workspace.
Photo by Tranmautritam on Pexels

The catch is that most "AI deployment" tools give you a temporary preview URL. That might work for showing a friend a prototype, but it is useless for handing a finished site to a paying client. You need a permanent URL that stays live, loads fast, and looks professional.

There is also a bigger distinction that gets glossed over: static-only versus full-stack. A static HTML site is easy to deploy. But if your AI agent built a site with a contact form, a comments section, user authentication, or any kind of server-side logic, you need a host that supports those features. Dropping those files into a static bucket breaks the functionality your agent just built. One call from any AI agent can publish your site, static or SSR, with a per-site SQL database, edge functions, transactional email, and a custom domain, all on flat pricing with no usage meter.

What You Need Before You Start

You need an AI agent that supports MCP or can run CLI commands. Claude Code, Cursor, and ChatGPT with the code interpreter all qualify. If your agent can execute shell commands in your terminal, you are good to go.

You need a deployment target that accepts API calls or CLI pushes. Vercel, Netlify, Render, and DigitalOcean all work, but each has quirks I will cover later. The important thing is that your host has a programmatic interface your agent can talk to.

Monochrome image of a laptop, camera, lens, and coffee cup on a wooden desk
Photo by Pixabay on Pexels

Know where your build output lives. Most frameworks dump compiled files into dist/, build/, out/, or _site/. Your agent needs to know which folder to upload. If you are not sure, check your framework's docs or just ask your agent to list the project structure.

A custom domain is optional but recommended if you are shipping to a client. You can point it later, but having it ready saves a step. Some hosts let you deploy first and add the domain after, no account required to start.

Method 1: Deploy via MCP

What MCP Means for Deployment

MCP, the Model Context Protocol, lets your AI agent talk directly to a deployment service as if it were a built-in tool. No copy-paste, no switching windows, no dashboard clicks. The agent sends your build output files to the MCP server, the server processes them, and you get a live URL back in the chat. This is the closest thing to deploying by thinking about it. One sentence in your conversation and the site is live.

The magic is that MCP turns deployment into a function call. Your agent does not need to know the internals of your host's API. It just knows there is a tool called "deploy" that takes a folder path and returns a URL. The MCP server handles authentication, file uploads, and DNS configuration behind the scenes.

Step-by-Step MCP Deploy

First, install the MCP server for your host. If your host has a dedicated MCP integration, follow their setup instructions. If not, you can use a generic file-upload MCP server that pushes files to any S3-compatible bucket or static host. The setup usually involves adding a configuration block to your agent's MCP settings file.

Second, in your agent conversation, tell it to deploy. The exact phrasing does not matter much. Something like "Deploy the contents of the dist folder to my host" works. The agent will call the MCP tool, upload the files, and return the URL. You can be more specific if you want: "Deploy the dist folder to production with the custom domain myclientproject.com."

Third, verify the site loads. Open the URL in a browser and click through the pages. If your site is purely static, you are done. If it has forms, a database, or server functions, check that those features work too. A static-only deploy will silently break anything that needs a backend.

What MCP Can't Do (Yet)

Most MCP deployment tools are static-only. They upload files to a bucket and serve them over HTTP. That is fine for a landing page or a blog, but it falls apart the moment your site needs a database, edge functions, or form handling. If your AI agent built a site with a contact form, a user login, or a comments section, a static-only MCP deploy will break those features and you will not know until a client complains.

The MCP integration that handles the full stack does exist. It deploys static files, provisions a SQL database, sets up edge functions, and captures form submissions, all in one call. The agent deploys everything the site actually needs, not just the HTML files. That is the difference between shipping a complete product and shipping a broken one.

Method 2: Deploy via CLI

Why CLI Still Wins for Control

MCP is slick, but CLI gives you full visibility into what is happening. There is no black box. You see every file being uploaded, every configuration being applied, and every error message in real time. When something goes wrong, and it will, you can read the output and fix it immediately.

You can also script the deploy, add error handling, and roll back if something breaks. For client work, this repeatability matters. You want a deploy process you can document in a README and hand off, not a magic chat command that only works on your machine.

Most AI agents can run CLI commands natively. You just tell the agent to run a command and it executes in your terminal. The agent reads the output, detects errors, and can retry with fixes, all inside the same conversation.

Step-by-Step CLI Deploy

Install the CLI tool for your host. If you are using Shiply, that is npm install -g shiply-cli. For Vercel, it is npm install -g vercel. Most hosts publish their CLI on npm and the install command is one line.

Navigate to your project root in your agent's terminal session. Run the build command first if your framework needs it: npm run build for most Node projects, or whatever your framework uses. The build step compiles your site into the output folder.

Run the deploy command pointing to your output folder. For a production deploy with Shiply, that is shiply deploy ./dist --prod. The CLI uploads your files, configures the server, and returns a live URL in seconds. If you want a custom domain, add it in the same command: --domain yoursite.com. The CLI handles DNS configuration automatically through Cloudflare, so you do not need to mess with A records or CNAMEs manually.

Test the live URL immediately. Click through every page, submit every form, and check that images load. If something fails, the agent can read the CLI output, identify the problem, and fix it. Maybe the build output folder was named differently. Maybe a file path was wrong. The agent adjusts and redeploys.

Handling the "Oops" Moment

Deploy failed? The agent reads the error, fixes the config, and retries, all in chat. You do not need to open a dashboard or Google an error code. Wrong files uploaded? Most CLIs support flags like --force or --clear-cache to overwrite the previous deploy. Need a database? Some CLIs let you provision one in the same command. Shiply's CLI, for example, supports shiply deploy --db postgres to spin up a Neon Postgres database alongside your static files. One command, one deploy, one working site.

What Most Hosts Get Wrong About AI Deployments

Expiring URLs are the biggest sin. Vercel preview links die after a while. Render's free tier puts sites to sleep after inactivity, and waking them up takes several seconds. Your client cannot use a URL that disappears or takes ten seconds to load on first visit. A permanent, always-on URL is table stakes for professional work.

Surprise bills are the second sin. Metered hosting charges per request, per compute second, per database row read. The pricing looks cheap until one of your client's posts goes viral and you wake up to a $200 bill. Flat-rate pricing exists for a reason. You know exactly what you will pay every month, whether the site gets ten visits or ten thousand.

Static-only traps are the third sin. Your AI agent built a site with a contact form, a comments section, or a login page. The host only serves HTML files. Now you are patching in third-party services, wiring up form handlers, and explaining to your client why the site they approved does not actually work. A host that provisions databases, edge functions, and form capture automatically saves you hours of retrofitting.

No ownership transfer is the fourth sin. You built the site, you deployed it, and now your credit card is on file for the hosting bill. When you hand the site to the client, you are still financially on the hook. A clean handoff means transferring the site and its billing to the client in one atomic action. Shiply does this through Stripe Connect payouts: you transfer ownership, the client takes over billing, and you get paid without friction.

Real Alternatives (Honest Comparison)

Vercel is great for Next.js projects and has a generous free tier, but it is metered. Static hosting is free, but serverless functions, edge middleware, and database reads all count against usage limits. For a simple static site, Vercel works fine. For anything with a backend, the costs add up.

Render offers a free tier with dev and prod environments, which is nice for small projects. But free-tier sites sleep after inactivity and cold starts annoy clients. The paid tier removes the sleep, but you are still on metered pricing.

DigitalOcean's App Platform is solid for production workloads. They have an A2A-compliant deployment tool, but it is early-stage with minimal community adoption. Their static site offering uses Spaces, which is an S3-compatible bucket, static-only.

here.now is instant, free, and requires no account. It is perfect for throwaway prototypes and quick experiments. But there is no database, no form handling, and no custom domain support yet. It is a great tool for what it does, just do not confuse it with a production host.

Shiply takes a different approach: flat pricing at $0, $8, $24, or $49 per month, no usage meter, and full-stack support out of the box. One deploy command publishes static files, provisions a database, sets up edge functions, and captures form submissions. Permanent URLs, custom domains with auto-DNS, and atomic ownership transfer are built in. It is designed for the workflow where an AI agent builds the site and you ship it to a paying client the same day. You can run the numbers yourself with the hosting bill calculator to see how flat pricing compares to metered alternatives for your specific traffic patterns.

Pro Tips for Shipping Clean to Clients

Always deploy to a custom domain before sharing the link. A subdomain URL like shiply-abc123.now looks unprofessional and makes clients nervous. Custom domains take five minutes to set up and they signal that this is a real, finished product.

Use a hosting bill calculator to compare flat versus metered costs before choosing a host. Show the numbers to your client so they understand what they are paying for and why. Transparency about hosting costs builds trust and prevents awkward conversations later.

Set up form capture or a database from the start, even if the MVP does not need it. Adding backend features later means redeploying and potentially breaking something. If your host provisions these automatically on deploy, you get them for free with no extra work.

Transfer ownership when you hand off. Shiply's Stripe Connect integration lets you move the site and its billing to the client in one atomic action. You get paid, they take over, and your credit card is no longer on the line. This is how professional client handoffs should work.

Document the deploy command in a README.md file in the project root. Something like "To deploy, run shiply deploy ./dist --prod --domain example.com" is enough. Your client or a future developer can redeploy without the AI agent, and you look like a pro who thinks about maintainability.

The Bottom Line

Deploying a static site from an AI agent is fast, but fast does not mean complete. Make sure your host supports everything your site actually needs: databases, edge functions, form handling, and custom domains. If your host only serves static files, you are shipping a broken product.

MCP is the future. One sentence in your chat window and the site is live. CLI is the present. Full control, full visibility, and easy to script and document. Both methods work, and the best choice depends on how much visibility you want into the process.

Do not let your client's site live on a temporary URL or a metered plan. Flat pricing and permanent URLs are table stakes for professional work. You built something real. Deploy it somewhere that treats it that way.

Pick a host that works with your agent, deploy something small, and see how it feels. Shiply's free tier costs nothing, requires no account and no credit card. Just a deploy command and a live URL. That is how shipping should work.

Publish a site in one call.

No account needed. Live at a real URL in a single request.