MCP server: One MCP server.

LeClap

@leclapRun by its publisher: served from their own domain, namespace checked by the registry.MCP server · External

Compose and render video from one JSON template. Deterministic, runs locally, no generative model.

Video generationv0.3.4MITTypeScript
Freeno charge per call

Runs on your machine from its package; the steps are below.

The builder
From the README

What it does

  1. Reads
  2. Writes
  3. High impact

At most: moves money, runs code or commands, deletes data, or sends messages for you.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

npm@leclap/mcpv0.3.4

Run

npx -y @leclap/mcp

MCP client config

{
  "mcpServers": {
    "leclap": {
      "command": "npx",
      "args": [
        "-y",
        "@leclap/mcp"
      ]
    }
  }
}
README8 min read
Clappy, the LeClap mascot

LeClap

Deterministic, on-device, agent-callable video — composed by prompt or by hand.

Describe a video in one JSON template — sections, filters, music, overlays — then render that same template on a phone (React Native, on-device) or in the browser (WebAssembly). No upload, no server, no generative model: the render is deterministic and reproducible, not sampled.

CI Node.js Version pnpm TypeScript License: MIT Trademark: LeClap

Quick start · Templates · Library API · Architecture · Docs


✨ What is LeClap?

One JSON template. It renders on Node, in the browser via WebAssembly, and natively on-device on React Native — same template, same pipeline, reproducible run after run on a given platform. No upload, no server, no generative model.

🎥 Demo

https://github.com/user-attachments/assets/e5e6f7a1-3c84-479b-b6d7-83209e83017d

🤔 Why LeClap?

Generative tools can't reproduce a result twice. Cloud renderers can't run in your user's pocket. Remotion renders without a server, but needs a browser engine to do it — LeClap links FFmpeg into the app itself.

LeClapRemotionShotstackGenerative video
Renders in a native app, no browser✅ React Native, FFmpeg linked in❌ needs a WebCodecs browser❌ cloud API❌ cloud API
Runs with no server✅✅ in the browser, since 4.0.491❌ cloud API❌ cloud API
Same input → same output✅ per platform¹✅ if you avoid randomness⚠️ not documented❌ sampled, not rendered
Authored by an AI agent✅ MCP⚠️ an LLM writes React code✅ MCP (cloud)✅ prompt

¹ Per platform, not across them: Node and the browser encode with libx264, Android with libopenh264, iOS with h264_videotoolbox, and the on-device build drops boxblur and rewrites eq→lutyuv. Same composition, different pixels.

LeClap vs Remotion → — the reasoning behind each row, the full caveats, every claim sourced to vendor docs, and when to pick Remotion instead.

🧰 Highlights

HighlightWhat it means
🧩 Template-drivenOne JSON descriptor → a complete video. No imperative FFmpeg wrangling.
🌍 Runs everywhereNode.js, browser (WASM), and React Native — one shared core, reproducible on each (the encoder differs per platform, see above).
📹 Capture → compose → renderRecord from the camera, trim/crop, mix music, add transitions, and render — captured, edited, and composed on-device.
🤖 Agent-callableAn MCP server lets an AI agent author & render a template — no LLM in the output path, so it's rendered, not sampled.
🧭 Browser agentsThe web builder registers 23 WebMCP tools with the agent built into your browser — every edit undoable, nothing consequential without your OK.
🎨 Premium out of the boxA bundled creative kit of polished, on-device-safe templates — by prompt or in the visual builder.
🧱 Typed & validatedZod-validated templates, strict TypeScript, dependency-injected architecture.

🎬 Don't describe the change. Show it.

LeClap can sit inside an agentic development loop. After implementing a change, an agent collects a short screen recording and a precise review focus, authors a reusable template, validates it, and renders a deterministic MP4. The resulting clip can be attached to a pull or merge request beside the diff, so the reviewer sees the behavior before digging into the implementation.

The workflow is explicit: implement → collect evidence → author template → validate → render → attach to PR/MR. LeClap creates the video artifact; the surrounding workflow decides when and where to upload it.

See the use case → · Run the example · Copy the agent skill

🧭 Let your browser's agent drive the builder

In a browser with WebMCP, the web template builder registers its tools with the browser's own agent: 9 read, 9 edit (each lands as one undo step; undo reverts the agent's own last one) and 5 consequential ones. Replacing the draft, opening a sample, rendering a preview and saving never run until you allow them in the page; capturing stills only reads a preview you already allowed. An Agent drawer turns it on or off, can ask before every edit, and logs each call with an Undo. The page holds no API key, and the tool names the builder shares with @leclap/mcp mean the same on both surfaces.

The builder's Agent drawer: recent agent activity, with Undo on the edit that is still current

Watch the 70 s walkthrough · Read the guide

🚀 Quick start

💡 Recommended: mise. mise install provisions Node 24, pnpm 12, FFmpeg 8.1.1, and stable Rust. Node/pnpm release lines and Rust stable can advance; packageManager pins pnpm to 12.6.0. Managing versions yourself? Bring Node ≥ 24.11.0 and pnpm 12.6.0.

bash
git clone https://github.com/heristop/leclap.git
cd leclap
mise install     # Node 24, pnpm 12, FFmpeg 8.1.1 + Rust
pnpm install

Build the shared core, then pick an app:

bash
pnpm --filter ffmpeg-video-composer build
pnpm app:web      # web app — compiles videos in-browser (no server)
pnpm app:expo     # Expo mobile app — compiles fully on-device (no server)

Or use the CLI — @leclap/cli is the leclap dev tool:

bash
npx @leclap/cli samples list          # discover the packaged showcase
npx @leclap/cli samples show web-app-promo
npx @leclap/cli samples export native-timing --output timing.json
npx @leclap/cli init my-video         # scaffold a starter project
npx @leclap/cli render template.json  # render it (`leclap diagnose` checks your FFmpeg)

Or drive it from an AI agent: the @leclap/mcp server exposes the engine as MCP tools — sample discovery → customize → validate → render — with no LLM in the output path.

To hand a template to a person, leclap studio template.json (or the MCP open_in_builder tool) prints a leclap.dev/studio/builder#t=… link that opens it in the web builder. The template travels in the URL fragment, which browsers never send to a server: nothing is uploaded.

The installed CLI and MCP expose all 51 showcase samples (41 native, 10 Remotion), including creative direction and required clips, copy, fonts and assets. Exported descriptor JSON embeds referenced partials; supply your own media before rendering. Registered Remotion effects require the configured MCP Node/Chromium backend and, where indicated, a trusted operator catalog. Discovery itself needs neither FFmpeg nor Remotion. See CLI sample commands and MCP discovery.

📦 Monorepo

pnpm workspaces (apps/*, packages/*, plus examples/llm-remotion-title) — no turbo/nx. The root is a private orchestrator (leclap); ffmpeg-video-composer, @leclap/cli, and @leclap/mcp are published to npm. The web and mobile apps both run the same core — the mobile app drives it fully on-device via the embedded native engine (no server), the web app in-browser via WASM.

PackageDescription
ffmpeg-video-composerThe library — cross-platform composition engine (Node, browser, WASM).
@leclap/cliThe CLI — the leclap dev tool: scaffold (init), render, diagnose.
@leclap/creative-kitShared creative catalog — templates, partials, fonts, media, bundled assets.
@leclap/mcpMCP server — the engine as agent-callable tools (schema/validate/compose/probe).
@leclap/webReact 19 + Vite + Tailwind — in-browser FFmpeg via WASM (reference).
@leclap/expoExpo / React Native — on-device compiles via the native engine (reference).
ffmpeg-engineRust engine embedding FFmpeg fftools for on-device compiles.

🧩 Templates & library

A template is a Zod-validated JSON descriptor — a global block plus an ordered list of sections, each a clip with its own inputs → maps → filters pipeline and {{ variable }} placeholders. Start from a creative-kit template and tweak text, colors, and media — by prompt (MCP) or in the visual builder.

📚 Documentation

Creative direction

Record the visual brief in meta.creativeDirection, then implement it with explicit JSON settings or registered Remotion props. The CLI starter and MCP authoring prompt accept the same direction. See the guide and distinct example treatments.

🤝 Contributing & License

Issues and PRs welcome. Keep changes formatted (pnpm fmt) and lint-clean (pnpm lint) before committing. The code is licensed under the MIT License.

Brand & trademark. The MIT License covers the code, not the brand. The LeClap name and logo are trademarks of Alexandre Mogère — you can fork and reuse the code freely, but please give your fork a different name and don't imply endorsement. See TRADEMARK.md for details.

Similar modules

Browse Video generation