PluginBench
MCP Server
Active
MIT

LeClap MCP Server

dev.leclap/video

Deterministic, on-device video composition from JSON templates — no server, no generative model.

What is the LeClap MCP server?

LeClap is a deterministic video composition engine that renders videos from JSON templates on Node.js, in the browser via WebAssembly, and natively on React Native devices. It produces reproducible output without relying on cloud services or generative models, making it ideal for agentic workflows and on-device video creation.

LeClap lets you describe a complete video in JSON — sections, filters, music, overlays, transitions — and render that same template deterministically across platforms (Node, browser, React Native). Unlike generative video tools, LeClap produces identical output every run on a given platform, runs entirely locally with no server, and integrates with AI agents via MCP to author and validate templates programmatically.

How to install LeClap

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • LECLAP_MCP_OUTPUT_DIR

    Directory rendered videos are written to. Defaults to ~/.leclap/renders.

  • LECLAP_MCP_MEDIA_DIR

    Allowlisted directory the server may read source media from. Defaults to ~/.leclap/media.

  • LECLAP_MCP_RENDER_TIMEOUT_MS

    Per-render timeout in milliseconds. Defaults to 600000.

  • LECLAP_MCP_ALLOW_REMOTION

    Opt in to the Remotion clip renderer, which executes local JavaScript. Off by default.

  • LECLAP_MCP_REMOTION_ENTRY

    Path to a Remotion entry point used by render_remotion_clip when it is enabled.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "video": {
      "command": "npx",
      "args": [
        "-y",
        "@leclap/mcp"
      ],
      "env": {
        "LECLAP_MCP_OUTPUT_DIR": "<YOUR_LECLAP_MCP_OUTPUT_DIR>",
        "LECLAP_MCP_MEDIA_DIR": "<YOUR_LECLAP_MCP_MEDIA_DIR>",
        "LECLAP_MCP_RENDER_TIMEOUT_MS": "<YOUR_LECLAP_MCP_RENDER_TIMEOUT_MS>",
        "LECLAP_MCP_ALLOW_REMOTION": "<YOUR_LECLAP_MCP_ALLOW_REMOTION>",
        "LECLAP_MCP_REMOTION_ENTRY": "<YOUR_LECLAP_MCP_REMOTION_ENTRY>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • schema — Retrieve the JSON schema for LeClap video templates
  • validate — Validate a video template against the LeClap schema
  • compose — Compose and render a video from a JSON template
  • probe — Probe media files for metadata and properties

Use cases

  • Generate deterministic video clips from AI-authored JSON templates for pull request reviews and documentation
  • Capture, edit, and render short videos entirely on-device in React Native apps without server infrastructure
  • Create reproducible video artifacts in agentic workflows where the same input must produce identical output
  • Build template-driven video composition tools with a visual builder or programmatic API
  • Render videos in the browser using WebAssembly without requiring a backend service

LeClap MCP server FAQ

What is LeClap?

LeClap is a deterministic video composition engine that renders videos from JSON templates. Unlike generative video tools, it produces identical output every time on a given platform, runs locally with no server, and works on Node.js, in browsers (via WASM), and natively on React Native devices.

Is LeClap free?

Yes, LeClap is open-source under the MIT License. The code is free to use and modify, though the LeClap name and logo are trademarks of Alexandre Mogère.

How do I install the MCP server in Cursor or Claude?

Install the npm package `@leclap/mcp` and configure it in your MCP settings. The server exposes tools for schema validation, template composition, and video rendering that AI agents can call directly.

Does LeClap require authentication or API keys?

No. LeClap runs entirely locally — no authentication, API keys, or cloud services required. All rendering happens on your device or in your browser.

What platforms does LeClap support?

LeClap runs on Node.js (server-side), in web browsers via WebAssembly, and natively on React Native (iOS and Android) with FFmpeg embedded in the app.

Can I use LeClap to generate videos from text prompts?

LeClap itself is not generative — it renders from JSON templates. However, an AI agent (via the MCP server) can author a template from a prompt, then LeClap renders it deterministically without any generative model in the output path.

README (reference)

Source of truth, from the repository.

<div align="center"> <img src=".github/media/clappy.png" alt="Clappy, the LeClap mascot" width="126" height="120" />

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

</div>

✨ 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

<sub>¹ 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.</sub>

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.
🎨 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

🚀 Quick start

💡 Recommended: mise. mise install provisions the exact pinned toolchain — Node 24, pnpm 12, FFmpeg 8.1.1, and Rust — so every contributor and CI run identical versions. Managing versions yourself? Bring Node ≥ 24 and pnpm 12.

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

Then pick an app:

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:

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 — schema → validate → render — with no LLM in the output path.

📦 Monorepo

pnpm workspaces (apps/*, packages/*) — 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

🤝 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.

Related MCP servers

LELegalize logo

Legalize

Active

Official MCP connector for Legalize: read and search its whole open corpus, at any point in time.

2
MIT
View repository →

Audits how AI answer engines read a page and grades it A+ to F across four measured layers.

Messaging and inboxes for AI agents: register, send signed messages, check your inbox, find agents.

LILibraryAPI logo

US public libraries and branches near any address, with collections from the IMLS survey

0
Python
View repository →

Lingo.dev MCP Server - World-class i18n implementation with ICU MessageFormat.

Xiaohongshu, Douyin, TikTok, YouTube, X links to text: transcript, on-screen text, images described