Deploy a static site from your coding agent.

When enabled for your environment, the PreviewSend MCP server gives Claude Code, Codex, Cursor, and compatible clients a small, secure deploy surface. Your client uploads the ZIP directly to object storage, so site bytes never pass through the MCP request.

Connect once, deploy repeatedly.

Create a deploy-capable API key in workspace settings, then add the endpoint and bearer token to your MCP client. The complete token is shown only once.

Manage API keys

Create a key

Use a user deploy key for password changes, or a workspace service key for deploy automation.

Store it safely

Put the pvs_ token in your client secret store. Never commit it or paste it into a project file.

Ship a ZIP

Call start_deploy, PUT the archive with the returned headers, then call finalize_deploy.

https://previewsend.com/api/mcp

The endpoint uses Streamable HTTP and supports the stable MCP protocol negotiated by the client. Requests must include the bearer token and a JSON-RPC message.

  1. 1. Call create_project when a new project is needed.
  2. 2. Call start_deploy with the ZIP size and SHA-256 digest.
  3. 3. Upload directly to the returned presigned URL using its exact headers.
  4. 4. Call finalize_deploy to verify, extract, and publish the version.

Connect from the terminal.

Create a deploy-capable key, then add PreviewSend with Claude Code's built-in MCP command. Paste the key when read waits for input; it is not written to your shell history.

Claude Code stores the Authorization header in its user configuration. Use a scoped key and revoke it in PreviewSend whenever that machine should lose access.

1. Add the server

read -s PREVIEWSEND_API_KEY
claude mcp add --scope user --transport http previewsend https://previewsend.com/api/mcp \
  --header "Authorization: Bearer $PREVIEWSEND_API_KEY"
unset PREVIEWSEND_API_KEY
claude mcp list

Success looks like previewsend ... Connected. A 401 means the key is missing, invalid, expired, or revoked. A 503 means MCP is not yet enabled for that PreviewSend environment.

2. Verify read-only access

Use the PreviewSend MCP server to call get_account and list_projects.
Do not create or deploy anything. Report the workspace and project count.

3. Run a real deployment

Build this static site and deploy the output through PreviewSend MCP.
Create a project if needed, ZIP the output directory, call start_deploy,
upload with every returned header, call finalize_deploy, then fetch the
returned preview URL and confirm it responds with HTTP 200.

A complete deployment returns a stable preview URL. Keep the project ID to reuse the same PreviewSend page for later versions.

Eight focused tools.

The reference below is generated from the same catalog used by the MCP registry, so names and descriptions stay aligned with the live server.

get_account

read · user / workspace key

Read workspace identity, plan limits, live project count, and the in-app billing URL. Limits that are unlimited on the plan are reported as the string "unlimited".

Arguments: No arguments.

list_projects

read · user / workspace key

List the projects visible to this key, including live preview URLs and active versions.

Arguments: No arguments.

get_project

read · user / workspace key

Read one visible project and its last ten versions, with an optional version cursor.

Arguments: Exactly one of projectId or slug, plus optional versionsCursor.

get_billing_url

read · user / workspace key

Return the deterministic in-app billing URL for a human owner to review upgrades.

Arguments: No arguments.

create_project

deploy · user / workspace key

Create an active project under the workspace project quota. Requires an idempotency key.

Arguments: name, optional slug, and idempotencyKey.

start_deploy

deploy · user / workspace key

Start a presigned ZIP deployment. Upload the returned archive to R2 with the exact headers, then finalize it.

Arguments: projectId, sizeBytes, lowercase sha256, optional message, and idempotencyKey.

finalize_deploy

deploy · user / workspace key

Verify, safely extract, publish, and activate a completed ZIP deployment.

Arguments: projectId, versionId, and the lowercase sha256 declared at start.

set_password

deploy · user key

Set or clear a project preview password. Requires a user-level deploy key, never a workspace service key.

Arguments: projectId and password, or null to clear the password.

Presigned-only uploads

ZIP data goes from the client to R2. The MCP server receives metadata, verifies the object, extracts safe entries, and publishes the result.

Bounded deploys

Archives use the 100 MB product limit: exactly 100 MiB (104,857,600 bytes) compressed, with bounded extraction and idempotent start and finalize calls.

Scoped access

Keys are workspace-bound. Project allowlists, capability checks, expiry, revocation, and workspace suspension are enforced on every request.