# Foldline

The Foldline MCP server for Claude Code turns HTML canvas animations into MP4 and gives an agent tools for film styles and rendering. It works with pages that expose a render(t) function.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8 repo stars
- Author: alireza12t
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/alireza12t/foldline
- Updated: 2026-11-14
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/foldline

## What it does

Foldline converts an animated HTML page into an H.264 MP4. An agent can choose from 66 film styles, render stills for review, and produce the finished video. The server also exposes sound tools.

On a Mac, the page can encode through WebCodecs and the hardware encoder when its canvas setup is supported. Otherwise, Foldline switches to other encoding paths, including x264. Rendering needs an HTML page with a visible `<canvas>` and `render(t)`, plus headless Chrome; the MCP server starts with `npx -y foldline-mcp`. The package also includes a local Qwen3-TTS engine for Apple silicon.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `FOLDLINE_PYTHON`, `PLAYWRIGHT_CHROME` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env FOLDLINE_PYTHON=<FOLDLINE_PYTHON> --env PLAYWRIGHT_CHROME=<PLAYWRIGHT_CHROME> --transport stdio foldline -- npx -y foldline-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add foldline --env FOLDLINE_PYTHON=<FOLDLINE_PYTHON> --env PLAYWRIGHT_CHROME=<PLAYWRIGHT_CHROME> -- npx -y foldline-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "foldline": {
            "command": "npx",
            "args": [
                "-y",
                "foldline-mcp"
            ],
            "env": {
                "FOLDLINE_PYTHON": "<FOLDLINE_PYTHON>",
                "PLAYWRIGHT_CHROME": "<PLAYWRIGHT_CHROME>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "foldline": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "foldline-mcp"
            ],
            "env": {
                "FOLDLINE_PYTHON": "<FOLDLINE_PYTHON>",
                "PLAYWRIGHT_CHROME": "<PLAYWRIGHT_CHROME>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e FOLDLINE_PYTHON=<FOLDLINE_PYTHON> -e PLAYWRIGHT_CHROME=<PLAYWRIGHT_CHROME> foldline npx -y foldline-mcp
```
Replace <…> with your own values

## When to use it
- render an HTML animation as an MP4
- choose a film style from the library
- preview rendered stills before making the video
- add a soundtrack to a rendered film

## Example prompts
- Render this HTML animation with `render(t)` as an MP4.
- Choose a Foldline style and render review stills.
- Make the video and add `music.wav` as its soundtrack.

## Similar
- [qwen3-tts](https://affpapa.org/en/nevibecode/skills/qwen3-tts.md) — skill · 148 installs
- [Keeploop](https://affpapa.org/en/nevibecode/mcp/keeploop.md) — MCP server
- [wiggle-claude-skill](https://affpapa.org/en/nevibecode/skills/wiggle-claude-skill.md) — skill · 211 installs
- [Rubiic](https://affpapa.org/en/nevibecode/mcp/rubiic.md) — MCP server
- [apple-fleet](https://affpapa.org/en/nevibecode/mcp/apple-fleet.md) — MCP server · 254 installs
- [ffmpeg](https://affpapa.org/en/nevibecode/skills/ffmpeg.md) — skill · 16500 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
