Create a key
Use a user deploy key for password changes, or a workspace service key for deploy automation.
PreviewSend MCP
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.
Setup
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 keysUse a user deploy key for password changes, or a workspace service key for deploy automation.
Put the pvs_ token in your client secret store. Never commit it or paste it into a project file.
Call start_deploy, PUT the archive with the returned headers, then call finalize_deploy.
Endpoint
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.
Deploy flow
create_project when a new project is needed.start_deploy with the ZIP size and SHA-256 digest.finalize_deploy to verify, extract, and publish the version.Claude Code
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 listSuccess 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.
Tool reference
The reference below is generated from the same catalog used by the MCP registry, so names and descriptions stay aligned with the live server.
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 the projects visible to this key, including live preview URLs and active versions.
Arguments: No arguments.
Read one visible project and its last ten versions, with an optional version cursor.
Arguments: Exactly one of projectId or slug, plus optional versionsCursor.
Return the deterministic in-app billing URL for a human owner to review upgrades.
Arguments: No arguments.
Create an active project under the workspace project quota. Requires an idempotency key.
Arguments: name, optional slug, and idempotencyKey.
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.
Verify, safely extract, publish, and activate a completed ZIP deployment.
Arguments: projectId, versionId, and the lowercase sha256 declared at start.
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.
ZIP data goes from the client to R2. The MCP server receives metadata, verifies the object, extracts safe entries, and publishes the result.
Archives use the 100 MB product limit: exactly 100 MiB (104,857,600 bytes) compressed, with bounded extraction and idempotent start and finalize calls.
Keys are workspace-bound. Project allowlists, capability checks, expiry, revocation, and workspace suspension are enforced on every request.