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
/api/v1/previewsCreate a new preview
{
"name": "my-app",
"mode": "static",
"ttl_seconds": 3600,
"source_type": "mcp"
}/api/v1/previews/:id/uploadUpload artifact (multipart form, field: file)
/api/v1/previews/:idGet preview status
/api/v1/previews/:id/extendExtend TTL (requires admin token)
/api/v1/previews/:id/destroyDestroy preview (requires admin token)
/api/v1/claimClaim 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