skip to content
Get Clipra

AI First

AI on your device, and AI agents in the build

Every AI feature in Clipra runs on your phone or your computer, never in a cloud. And Clipra Desktop is built to be worked on by AI agents: its MCP server gives an agent every build, test, check and packaging task as a tool, and answers with the errors, the failing tests and the totals.

  • On-device AI
  • MCP server
  • 27 tools
  • Open source

In the app

AI that never leaves your device

The AI features of Clipra for Android and Clipra Desktop run on the device. Nothing you edit is uploaded, and every feature works offline once its model is downloaded.

  • Captions with Whisper

    whisper.cpp transcribes speech in the language spoken, on the phone, and on the GPU through Vulkan on Linux.

  • Edit by text

    Cut filler words, long pauses or any word from the transcript; every layer stays in sync.

  • Voice cleanup

    DeepFilterNet 3 and RNNoise take wind, traffic and room noise out of a voice.

  • Cutout

    People lifted off their background frame by frame, with models built into the app.

  • Follow face and auto-reframe

    A mask that stays on a face, and vertical, square or 4:5 copies that follow the subject.

  • Offline translation

    Captions translated on the device with Mozilla's Firefox Translations models.

  • Models from their sources

    Downloaded once, straight from their official sources, pinned to a version and checked with SHA-256.

In the build

Clipra Desktop's MCP server at a glance

Its cargo xtask mcp command serves the developer tasks of Clipra Desktop to an AI agent over the Model Context Protocol.

  • 27 tools Every Makefile and cargo xtask task, the release checks, the Flatpak and the jobs.
  • 0 new dependencies Written on serde_json alone, inside the repository's xtask.
  • 4 protocol versions MCP 2024-11-05 to 2025-11-25, over standard input and output.
  • 120 lines at most of errors and warnings in an answer; the whole output stays in a log.

The MCP server

The Model Context Protocol is an open standard that lets an AI agent, such as Claude Code, call tools that a program offers. Clipra Desktop is a large Rust project with its own FFmpeg build, GPU tests, license checks and Flatpak packaging. Rather than leave an agent to guess shell commands and wade through thousands of lines of compiler output, cargo xtask mcp gives it one tool per task, and answers with what matters: whether the task passed, the errors, the failing tests and the totals.

The server is part of the repository's xtask (xtask/src/mcp/), written on serde_json alone, with no new dependency. It speaks JSON-RPC 2.0 over standard input and output, one message per line (the stdio transport), accepts MCP versions 2024-11-05, 2025-03-26, 2025-06-18 and 2025-11-25, and offers tools only. It introduces itself as clipra-xtask, "Clipra Desktop developer tasks".

Setting it up

.mcp.json at the root of the repository registers the server as clipra, so Claude Code offers it when you open the checkout and asks once whether to trust it:

json
{
  "mcpServers": {
    "clipra": {
      "command": "cargo",
      "args": ["run", "--quiet", "--package", "xtask", "--target-dir", "target/mcp-server", "--", "mcp", "--wait", "600"]
    }
  }
}
  • The server is built into target/mcp-server, a target directory of its own, so it starts while another build holds the lock of target/, and the tasks it runs never rebuild its own binary. The first start builds it, in seconds.
  • Any other MCP client that starts a local server takes the same command. --wait sets how long a tool call waits for its job. Leave out --wait 600 for a client that gives up on a call after a minute: the default wait is 50 seconds.
  • An agent starts a session with environment, and runs check before it opens a pull request.

Every task is a job

A tool call starts a job: its commands one after another, in the repository root, on a thread of the server. The call waits up to wait_seconds (the server's --wait by default, at most an hour), then answers with:

  • the outcome, and each command with its status, time and exit status;
  • the errors and warnings found in the output: rustc and clippy diagnostics, rustfmt diffs, failed tests with their output, cargo deny, CMake, make, C and C++ compilers and Python tracebacks, errors first, each block once, at most 120 lines;
  • the test totals of every test result: line;
  • the last lines of the output, or all of it when it is short;
  • the path of the log file, which has every line.

A job that is still running when the wait ends keeps running. job_wait waits for it again, job_log reads its output (the last lines, a range, or the lines that contain a text) and job_cancel stops it; wait_seconds: 0 starts a job and answers at once. While a call waits, the server sends a progress notification every 10 seconds to a client that asks for them.

Each command leads a process group of its own. Cancelling sends SIGTERM to the whole group (rustc, the C compiler, make, the app), then SIGKILL after 5 seconds, and skips the commands after it. Cancelling a tool call stops the job it started, and when the client goes away, the server stops its running jobs. Commands get no standard input, CARGO_TERM_COLOR=never and GIT_TERMINAL_PROMPT=0, so nothing waits for a prompt, and every job tool takes env for more variables.

The tools

Tool What it does
environment Reads the checkout, the toolchain, what is built (the app, Clipra's FFmpeg, ONNX Runtime, the packages), the models in the developer cache, the environment switches, the programs each tool needs and the running jobs
build cargo build, by default the app; a release build, chosen packages, the workspace or all targets
run Builds and starts Clipra with files to open; answers once it has run for a few seconds, and keeps it running until its window is closed or the job is cancelled
test cargo test, narrowed by package, test or filter; on a software GPU (lavapipe), as CI runs it; can update snapshots and fetch the test models
fmt, lint, deny Formatting, clippy and cargo deny
check Everything CI runs: formatting, clippy, the license list check, the tests and cargo deny; for a release, also the desktop file and metainfo validation
clean cargo clean, refused while jobs run
theme Generates the UI theme from the design tokens
ffmpeg Builds Clipra's LGPL FFmpeg, with its license checks
package Makes the release packages
desktop Puts the release build in the application menu, with its icons
flatpak_sources Writes the Flatpak's cargo sources from Cargo.lock
licenses Generates the list on the Open source licenses screen, or checks that it matches the dependencies
budgets Measures the performance budgets
onnxruntime Builds ONNX Runtime from its pinned source
models Converts the MediaPipe models, or checks that the committed files reproduce byte for byte
validate_packaging desktop-file-validate and appstreamcli validate
flatpak_build, flatpak_lint Builds the Flatpak with flatpak-builder, and lints its manifest
cargo, xtask Any other cargo command or xtask task
job_list, job_wait, job_log, job_cancel The jobs

Arguments are checked against each tool's JSON schema: a misspelt name is refused with the list of names the tool takes.

What stays with a person

The server runs local commands only. The network is used by the tasks that download: the pinned FFmpeg, ONNX Runtime and model sources, the RustSec advisory database for deny, and budgets with its remote option. Signing and pushing a release tag, publishing a release and submitting to Flathub are not tools: a person does them.

Adding a tool

A new cargo xtask task is reachable at once through the xtask tool. To give it a tool of its own, add an entry to catalog() in xtask/src/mcp/tools.rs, with its name, its description, the JSON schema of its arguments and the function that turns them into commands, and add the name to the serves_the_tasks test. cargo test -p xtask checks the schemas and the command lines.

Questions

About AI in Clipra

Can an AI agent edit my videos through MCP?

Not today. The MCP server serves Clipra Desktop's developer tasks: building, testing, checking and packaging the app. The editor itself has no MCP server and talks to no AI service: its AI runs on your device.

Which agents can use the server?

Any MCP client that starts a local server over standard input and output. Claude Code picks it up from .mcp.json when you open the repository; other clients take the same command in their own configuration.

Does the server send anything over the network?

It runs local commands only. The network is used by the tasks that download pinned sources (FFmpeg, ONNX Runtime, the models), by cargo deny for the RustSec advisory database, and by remote performance budgets.

Can an agent publish a release?

No. Signing and pushing a release tag, publishing a release and the Flathub submission are left out of the tools on purpose: a person does them.

Where is the code?

In xtask/src/mcp/ of Clipra Desktop on GitHub, with its documentation in docs/agents/mcp.md. Both are part of the foundations milestone in pull request #2 until it is merged.

Build Clipra with your agent

Clone Clipra Desktop, open it in Claude Code or another MCP client, trust the clipra server, and start with environment.