Foldline — Claude Code MCP server for rendering HTML animation
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.
no license ★ 8 updated 2026-11-14
claude mcp add --env FOLDLINE_PYTHON=<FOLDLINE_PYTHON> --env PLAYWRIGHT_CHROME=<PLAYWRIGHT_CHROME> --transport stdio foldline -- npx -y foldline-mcpWhat Foldline 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.
What it helps with
- 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 for the agent
- Render this HTML animation with
render(t)as an MP4. - Choose a Foldline style and render review stills.
- Make the video and add
music.wavas its soundtrack.
How to install Foldline
Platform CLI
claude mcp add --env FOLDLINE_PYTHON=<FOLDLINE_PYTHON> --env PLAYWRIGHT_CHROME=<PLAYWRIGHT_CHROME> --transport stdio foldline -- npx -y foldline-mcpReplace <…> with your own values
Platform CLI
codex mcp add foldline --env FOLDLINE_PYTHON=<FOLDLINE_PYTHON> --env PLAYWRIGHT_CHROME=<PLAYWRIGHT_CHROME> -- npx -y foldline-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"foldline": {
"command": "npx",
"args": [
"-y",
"foldline-mcp"
],
"env": {
"FOLDLINE_PYTHON": "<FOLDLINE_PYTHON>",
"PLAYWRIGHT_CHROME": "<PLAYWRIGHT_CHROME>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"foldline": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"foldline-mcp"
],
"env": {
"FOLDLINE_PYTHON": "<FOLDLINE_PYTHON>",
"PLAYWRIGHT_CHROME": "<PLAYWRIGHT_CHROME>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e FOLDLINE_PYTHON=<FOLDLINE_PYTHON> -e PLAYWRIGHT_CHROME=<PLAYWRIGHT_CHROME> foldline npx -y foldline-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Foldline
How do I install Foldline in Claude Code?
Run claude mcp add foldline -- npx -y foldline-mcp.
What does Foldline do?
Foldline gives a coding agent tools to select a film style, render preview stills, and turn an HTML animation into an MP4. Its library contains 66 styles.
What does Foldline need to run?
It needs a Mac, an HTML page with a visible <canvas> and render(t), and headless Chrome. The MCP server runs through npx; video encoding can use WebCodecs, VideoToolbox, or x264.