Skip to content
nodemode-ai edited this page Nov 28, 2026 · 2 revisions

MCP

FormRig has an MCP server over stdio. An agent such as Claude Code, Codex, Cursor or Antigravity can rig a character with the same commands the window uses. The server reads the engine's one command catalogue, so there is no second list to keep in step.

Start it

./formrig mcp

This runs python -m app.mcp_stdio in the backend venv and speaks JSON-RPC, one message per line, on stdin and stdout. Logs go to stderr. Install first (./formrig install) so the venv and the engine exist.

In the installed app

The installed desktop app carries the same server in its engine program. Run it with the mcp argument and no port is opened:

formrig-engine mcp

It answers on stdin and stdout exactly as ./formrig mcp does and needs no Python or venv. The client owns the lifetime: closing stdin ends the server. Any other first argument that is not an option exits with code 2 and a message on stderr. The program is the formrig-engine file beside the app's executable (Linux and Windows) or inside the app bundle's Contents/Resources/engine folder (macOS). /api/capabilities reports agents.mcp as true. Windows and macOS signing for an outside client starting it have not been checked yet.

Use the full path of that file as the command, with mcp as the only argument:

Client Form
Claude Code (.mcp.json) "formrig": {"type": "stdio", "command": "/path/to/formrig-engine", "args": ["mcp"]} under mcpServers
Codex (.codex/config.toml) [mcp_servers.formrig] with command = "/path/to/formrig-engine", args = ["mcp"], tool_timeout_sec = 600
Cursor (.cursor/mcp.json) "formrig": {"command": "/path/to/formrig-engine", "args": ["mcp"]} under mcpServers

In the repository

The repository carries ready configuration:

Client File
Claude Code .mcp.json
Codex .codex/config.toml
Cursor .cursor/mcp.json

Antigravity reads one file for every project, ~/.gemini/config/mcp_config.json. Run ./formrig agents install to add formrig to it and to install the two skills; it also writes .mcp.json, .codex/config.toml and .cursor/mcp.json in the folder you ran it from, keeps every other server already in those files and saves a .bak copy of a file before it changes it. ./formrig agents install --dry-run shows what it would do without writing anything, and ./formrig agents sync refreshes the skill copies and agents/manifest.json (add --check to only report drift). On Windows the Antigravity entry starts the backend venv's Python on app/mcp_stdio.py directly.

Each of the repository files starts ./formrig mcp from the repository root. Two skills teach an agent how to work: formrig-harness (changing FormRig's own source) and formrig-rigging (rigging a character end to end), in both .claude/skills/ and .agents/skills/.

The MCP server holds its own document in its own process. An open window has a separate document; load the same file in both, or save a .frig and open it in the window.

Tools

One tool per engine command, named in snake case from the command id (file.import is file_import, rig.guess is rig_guess). Every tool has the command's input schema and annotations from its hints: readOnlyHint, destructiveHint, idempotentHint and openWorldHint. All file paths must be absolute.

A result is in structuredContent as {ok, tool, elapsedMs, result}. A failure is {ok:false, error:{code, message, hint}} where the hint says what to call next (for example no_skeleton: build the skeleton first with rig_template, rig_guess, rig_build). A failed call changes nothing.

Long operations (mesh check and fix, skin bind, face fit, AI apply) are marked formrig/long in the tool's _meta. Send _meta.progressToken and the server answers with progress notifications: at the start, every 2 seconds while the command runs, and at the end. A result larger than 60000 characters is saved under <data>/mcp/ and the result names the file. Requests run one at a time in arrival order. Joint matrices are left out of document summaries; anim_pose gives world joint positions.

Resources

URI Content
formrig://catalogue every tool with group, hints, long flag and required arguments
formrig://document/summary the live document summary
formrig://library/clips the bundled motion clips with absolute paths for anim_retarget
formrig://guide/rigging the standard order of work

The order of work

  1. file_import, doc_summary, mesh_check.
  2. mesh_fix for each issue (facing, origin, scale, up, merge, degenerate).
  3. rig_template, rig_guess, rig_state to read marker confidence, rig_build.
  4. skin_bind, skin_report, and weights tools only where the report points.
  5. helpers_add, control_build, control_state.
  6. face_build, face_landmarks, face_fit, face_shapes_generate, face_qa.
  7. anim_retarget with a library clip, anim_list.
  8. export_check, then export_run per profile (vrm_state before VRM).

The formrig-rigging skill has the details, the arguments that matter and what to check after each step. For a model that already has a rig, call rig_detect and rig_convert instead of building a skeleton.

Limits

  • Commands run one at a time in arrival order; ping and resource lists are still answered while one runs.
  • notifications/cancelled drops a request that is still queued. A command that is already running finishes.
  • The configuration files start the Unix script ./formrig. On Windows point the client at formrig.bat mcp.
  • There are no prompts, no logging capability and no resource subscriptions.
  • Before ./formrig install has built the engine, the server still starts and lists one tool, formrig_setup, that tells the agent to ask you to run ./formrig install (the first run builds the engine and takes several minutes) and then restart the server.

Some work is window only and cannot be done over MCP today: USD export, AI rigging models and cloud services, MediaPipe face landmarks, Rhubarb lip sync, and sending to Unity or Unreal. face_landmarks over MCP is the geometric one. Do these in the window; an agent works on its own document, separate from the open window, so save a .frig from the agent and open it there.

Safety

The server runs as you, on your computer, and only reads and writes the files you name. It makes no network call: model downloads, add-on installs and cloud rigging are window features that are governed by Local only. history_undo returns to the last good step after a mistake.

Clone this wiki locally