Documentation

What is Prevu?

Prevu is an ephemeral preview hosting service designed for AI coding agents. When your agent finishes building something, it can instantly deploy a preview and give you a public URL — no login, no config, no CI/CD pipeline needed.

Quick Start

1. Configure MCP

Add Prevu to your agent's MCP configuration:

{
  "mcpServers": {
    "prevu": {
      "command": "npx",
      "args": ["@prevu/mcp-server"],
      "env": {
        "PREVU_API_URL": "https://api.prevu.cloud"
      }
    }
  }
}

2. Deploy a Preview

Just ask your AI agent to deploy. It will use the deploy tool:

> "Build the project and deploy a preview"

Agent: āœ… Preview deployed!
šŸ”— URL: https://abc123.prevu.page
šŸ“‹ Claim code: XYZ789
ā° Expires in 1 hour

3. Claim (Optional)

If you want to manage the preview (extend TTL, view logs), enter the claim code on the Claim page after logging in with GitHub.

API Reference

POST/api/v1/previews

Create a new preview

{
  "name": "my-app",
  "mode": "static",
  "ttl_seconds": 3600,
  "source_type": "mcp"
}
POST/api/v1/previews/:id/upload

Upload artifact (multipart form, field: file)

GET/api/v1/previews/:id

Get preview status

POST/api/v1/previews/:id/extend

Extend TTL (requires admin token)

POST/api/v1/previews/:id/destroy

Destroy preview (requires admin token)

POST/api/v1/claim

Claim a preview (requires login)

{ "claim_code": "XYZ789" }

MCP Tools

prevu.deploy

Deploy a directory as a preview site. Takes a path and optional name.

prevu.get_status

Check the status of a preview deployment.

prevu.delete

Delete a preview deployment.

Limits

  • Max 2 active anonymous previews per IP
  • Default TTL: 1 hour (max 24 hours)
  • Max upload size: 100MB
  • Previews auto-expire and are cleaned up