npm @leclap/mcpstdioMITupdated 13d ago
Deterministic, on-device, agent-callable video β composed by prompt or by hand.
What can you do with LeClap?
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.
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
Two looks at LeClap β a finished clip rendered from a single JSON template, and the mobile app composing one fully on-device.

π€ 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.
| LeClap | Remotion | Shotstack | Generative 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
| Highlight | What it means |
|---|---|
| π§© Template-driven | One JSON descriptor β a complete video. No imperative FFmpeg wrangling. |
| π Runs everywhere | Node.js, browser (WASM), and React Native β one shared core, reproducible on each (the encoder differs per platform, see above). |
| πΉ Capture β compose β render | Record from the camera, trim/crop, mix music, add transitions, and render β captured, edited, and composed on-device. |
| π€ Agent-callable | An 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 box | A bundled creative kit of polished, on-device-safe templates β by prompt or in the visual builder. |
| π§± Typed & validated | Zod-validated templates, strict TypeScript, dependency-injected architecture. |
π Quick start
π‘ Recommended: mise.
mise installprovisions the exact pinned toolchain β Node 24, pnpm 11, FFmpeg 8.1.1, and Rust β so every contributor and CI run identical versions. Managing versions yourself? Bring Node β₯ 24 and pnpm 11.
git clone https://github.com/heristop/leclap.git
cd leclap
mise install # Node 24, pnpm 11, 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.
| Package | Description |
|---|---|
ffmpeg-video-composer |
The library β cross-platform composition engine (Node, browser, WASM). |
@leclap/cli |
The CLI β the leclap dev tool: scaffold (init), render, diagnose. |
@leclap/creative-kit |
Shared creative catalog β templates, partials, fonts, media, bundled assets. |
@leclap/mcp |
MCP server β the engine as agent-callable tools (schema/validate/compose/probe). |
@leclap/web |
React 19 + Vite + Tailwind β in-browser FFmpeg via WASM (reference). |
@leclap/expo |
Expo / React Native β on-device compiles via the native engine (reference). |
ffmpeg-engine |
Rust 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.
- π Template configuration reference β global config, sections, the FFmpeg pipeline, placeholders.
- π₯ Use it as a library β install, the
compile()API, entry points (Node / browser / RN), and automatic FFmpeg detection.
π Documentation
- π Descriptor reference (web) β the full, schema-driven descriptor reference, one page per topic (sections, transitions, looks, grade, motion, audio, captions, filters, examples, JSON Schema).
- π§© Template Configuration β the template JSON reference.
- π Architecture β system architecture and design patterns.
- π§ FFmpeg Fallback Strategy β how automatic FFmpeg detection works.
- π± On-Device Compilation β the serverless Expo compile pipeline.
- π€ AGENTS.md β repo layout, commands, and conventions for contributors and AI agents.
π€ 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.
Install
Add LeClap to your client. Pick the one you use.
claude mcp add mcp -- npx -y @leclap/mcpcodex mcp add mcp -- npx -y @leclap/mcpamp mcp add mcp -- npx -y @leclap/mcp{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@leclap/mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@leclap/mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp","command":"npx","args":["-y","@leclap/mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@leclap/mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@leclap/mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@leclap/mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@leclap/mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@leclap/mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @leclap/mcpRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance19/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 5 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 0.3.4Latest | Aug 24, 2026 |