# CozyClay

> Browser-based previs studio: block the set, move the cast and cut the camera in 3D, then hand each shot to an AI video model

- Category: Multimodal Generation / Video Generation
- Language: JavaScript
- Licence: AGPL-3.0
- Repository: https://github.com/HaD0Yun/CozyClay
- Website: https://cozyclay.org
- Canonical page: https://ai-tldr.dev/tools/cozyclay/

## In short

CozyClay is open-source previsualisation software that runs in a browser tab. It sits in the Video Generation category of the Multimodal Generation tools and is open-source, written in JavaScript and licensed AGPL-3.0. To get started: start the studio.

## Overview

CozyClay is open-source previsualisation software that runs in a browser tab. Its premise is that an AI video model is paid per take and a text prompt cannot hold a whole scene — where everyone stands, how they move, where the camera is and when it cuts — so those decisions are made first in 3D, where they are cheap to change. The video model then receives the shot as a first frame, a greybox reference clip and a prompt that describes the real framing, and follows the blocking instead of guessing it.

The studio is organised as Stage, Move, Shoot and Export. You build the set from primitives and add rigged characters or capsule stand-ins; describe an action and an agent writes a motion spec that a deterministic in-browser compiler bakes frame by frame, with QA checks for collisions, foot slide, reach and hand contact; put shots on a timeline with dolly rails and a look-through lens, each aware of the limits of the video model you target; and export a keyframe pack, mp4, depth and normal passes, a contact sheet or an OTIO cut list. A Storyboard project type covers stills-first work with panels, captions and an animatic.

The same scene can be driven from three places while you watch the viewport: an Agent panel inside the studio (sign in with ChatGPT or bring a key for Anthropic, OpenAI, Gemini, MiniMax, OpenRouter or CLIProxyAPI), an MCP server for Claude Desktop, Claude Code, Cursor and other MCP clients, and a `cclay live` terminal interface that speaks JSON for coding agents. Every edit, including each change the agent makes, is one undo step. A sculpt mode lets an agent turn a single reference image into a clay prop described as a recipe of parts — plain data the editor renders, not code it executes. CozyClay is written in JavaScript on three.js and licensed AGPL-3.0-or-later.

## What it does

- Stage, Move, Shoot and Export workflow for blocking a scene before any video is generated
- Agent-written motion specs compiled deterministically in the browser, with QA for collisions, foot slide, reach and hand contact
- Shot timeline with dolly rails and look-through camera, each shot checked against the target video model's limits
- Exports a keyframe pack (first and last frame, greybox clip, camera, prompt), mp4, depth and normal passes, contact sheet and OTIO cut list
- Drive the scene live from the in-studio Agent panel, an MCP server, or the `cclay live` terminal interface
- Sculpt mode turns one reference image into a clay prop built from a validated recipe of parts

## Getting started

CozyClay needs Node.js 22.19 or newer and a Chromium browser. It does not need a GPU, Python or a model download.

1. Start the studio

   One command installs and launches it; the studio opens at http://127.0.0.1:5180/app/.

```bash
npx cozyclay
```

2. Block the shot

   Build the set from primitives in Stage, add characters, describe the action so the agent can write and compile the motion, then lay out shots and camera moves on the timeline. Open the Agent panel with Cmd/Ctrl+B to direct the scene in chat.

3. Connect an MCP client

   To drive the studio from Claude Desktop, Claude Code, Cursor or another MCP client, register the bundled MCP server.

```json
{ "mcpServers": { "cozyclay": { "command": "npx", "args": ["-y", "cozyclay", "mcp"] } } }
```

4. Or drive it from a terminal

   Coding agents can talk to a running studio through the `cclay live` commands, JSON in and out.

```bash
cclay live status --wait
```

5. Run from source

   Clone the repository to develop on it or run the test suite.

```bash
git clone https://github.com/HaD0Yun/CozyClay.git && cd CozyClay
npm install
npm run dev     # http://127.0.0.1:5180/app/
npm test
```

## When to use it

- Locking staging, timing and camera for an AI video shot before paying for generation takes
- Handing a video model a first frame, greybox reference clip and framing prompt so repeated takes keep the same camera
- Letting a coding agent or MCP client build and adjust a 3D scene while you watch the viewport
- Producing storyboards, animatics and OTIO cut lists for a sequence without a desktop 3D suite
