mcp

Deploy a Static Site from Claude Code, Codex, or Cursor

By PreviewSend Team · Jul 14, 2026 · 3 min read

Your AI coding client just finished the site. The code is done, the preview in the editor looks right, and now comes the part that has nothing to do with coding: find a host, create a project, upload the build, copy the URL, paste it back to whoever asked for the site.

PreviewSend's MCP server hands that errand to the client that already did the work. You ask for a deploy in plain language, and the site comes back as a stable hosted URL. The MCP surface is still rolling out, so a 503 response saying MCP is temporarily unavailable. means it isn't enabled in this environment yet - the rest of this guide will be waiting.

Create a deploy key

Open API keys in workspace settings and create a deploy-capable key. Which kind depends on who's driving:

  • A user key when it's you in the editor - it can also set or change a preview password.
  • A workspace service key for CI or shared automation that needs deploy and read access but should not be able to change preview passwords.

The full pvs_ token is shown exactly once. Put it in the client's secret configuration, not in the site repository.

Point your client at the server

Add the PreviewSend endpoint to your MCP client's remote server configuration:

https://previewsend.com/api/mcp

Pass the API key as a bearer token, in whatever shape your client's config expects. The connection uses Streamable HTTP, and the server keeps its surface small on purpose: eight tools that cover projects, deploys, and passwords, so the model doesn't have to guess its way through a sprawling API.

Say "deploy this"

With a finished static export in the project, ask for it directly - "deploy this site to PreviewSend" is enough. Under the hood, the client walks through four steps:

  1. Create a PreviewSend project if one doesn't exist yet.
  2. Hash the ZIP and call start_deploy with its size and digest.
  3. Upload the archive straight to the returned presigned URL.
  4. Call finalize_deploy, which verifies, extracts, and activates the version.

Back comes a stable preview URL. Deploy again after the next round of edits and the same URL serves the new version, with the old ones kept in history.

Why the ZIP never touches the model

The archive doesn't travel through the model's context or the MCP request body - the client sends the bytes directly to object storage, and PreviewSend checks the declared size, checksum, archive contents, and key scope before anything goes live. Uploads are capped at 100 MB compressed, and idempotency keys make retries safe when a response gets lost mid-conversation.

Close the loop with client feedback

Deploying is half the story. The URL you just produced is also a review surface: send it to your client, and they can pin comments directly on the page - no account, no extension, no screenshots of screenshots.

When the round is done, PreviewSend can turn those pinned comments into a structured change list you can paste straight back into Claude Code, Cursor, or whichever client built the site. The same tool that deployed version three is the one that reads the feedback and builds version four.

Preview URLs are long and unlisted by default. Add a project password from the web app or with a user deploy key before sharing unpublished or access-restricted preview material. When the site is ready for a durable public address, connect a custom domain from the web settings on paid Starter and above. Custom domains are not included in the Pro trial. Keep credentials, private keys, and production customer records out of any static bundle. For key scope rules, request arguments, and the full deployment contract, the MCP setup and tool reference has the complete picture.

FAQ

Does the site ZIP pass through the MCP server?

No. The MCP server returns a short-lived presigned object-storage URL, and the client uploads the ZIP directly before asking PreviewSend to verify and publish it.

Which clients can connect?

PreviewSend uses Streamable HTTP, so Claude Code, Codex, Cursor, and other compatible MCP clients can connect to the same endpoint with a bearer API key when the MCP surface is enabled in their environment.

What does a deploy key allow?

A deploy key can create and publish projects within its workspace scope. User keys can also change a project password, while workspace service keys cannot change preview access controls.

Have a site to host? Upload it and get a live link in seconds.

Get it free

← Back to the blog