# Connect your agent to ReelForge

> ReelForge Studio serves an MCP server at `/mcp` (Streamable HTTP) and a REST API at `/v1` on your own machine (default `http://127.0.0.1:4321`). Add it to your agent with an API key, then ask for a reel. Page: https://dev.renderweld.com/agents

## Clients

Only clients with a checked config are listed. Placeholders: `rf_...` is your key.

### Claude Code

Add the studio as an HTTP MCP server, then ask for a reel.

Terminal:

```bash
export REELFORGE_KEY=rf_...   # a key from: reelforge keys create --name agent
claude mcp add --transport http reelforge http://127.0.0.1:4321/mcp \
  --header "Authorization: Bearer $REELFORGE_KEY"
claude mcp list   # reelforge: http://127.0.0.1:4321/mcp (HTTP) - Connected
```

What we checked: Checked on 2026-11-21 with Claude Code 2.1.330: "Connected". In the studio's Docker test, headless Claude Code made a reel over MCP only.

### Codex

One command, or two lines in ~/.codex/config.toml.

Terminal:

```bash
export REELFORGE_KEY=rf_...   # a key from: reelforge keys create --name agent
codex mcp add reelforge --url http://127.0.0.1:4321/mcp --bearer-token-env-var REELFORGE_KEY
```

~/.codex/config.toml (the same, by hand):

```toml
[mcp_servers.reelforge]
url = "http://127.0.0.1:4321/mcp"
bearer_token_env_var = "REELFORGE_KEY"
```

What we checked: Config checked on 2026-11-21 with Codex CLI 0.171.0 (codex mcp get). A full Codex agent run is not recorded yet.

### Any MCP client

Streamable HTTP with a Bearer key. Most clients read this mcpServers shape; check yours for the exact field names.

mcp.json:

```json
{
  "mcpServers": {
    "reelforge": {
      "type": "http",
      "url": "http://127.0.0.1:4321/mcp",
      "headers": { "Authorization": "Bearer rf_..." }
    }
  }
}
```

What we checked: This is the file Claude Code writes for the command in its tab. Other clients are not tested yet.

### REST

Every MCP tool has a REST route under /v1, for scripts, n8n or cron.

Terminal:

```bash
export REELFORGE_KEY=rf_...   # a key from: reelforge keys create --name agent
H="Authorization: Bearer $REELFORGE_KEY"
curl -s -H "$H" http://127.0.0.1:4321/v1/capabilities
curl -s -X POST -H "$H" -H 'content-type: application/json' \
  -d @manifest.json http://127.0.0.1:4321/v1/projects
curl -s -X POST -H "$H" http://127.0.0.1:4321/v1/projects/my-reel/renders    # -> job.id
curl -s -H "$H" "http://127.0.0.1:4321/v1/jobs/JOB_ID?wait=45"               # -> result.renderId
curl -s -H "$H" -o reel.mp4 http://127.0.0.1:4321/v1/renders/RENDER_ID/output
```

manifest.json:

```json
{
  "schemaVersion": "0.2",
  "projectId": "my-reel",
  "title": "My reel",
  "theme": "midnight",
  "output": { "width": 1080, "height": 1920, "fps": 30, "format": "mp4" },
  "scenes": [
    { "id": "hook", "engine": "remotion", "template": "kinetic-title",
      "durationSeconds": 3, "props": { "headline": "Made over REST" } }
  ]
}
```

What we checked: Run in this order on 2026-11-21: it rendered a 1080×1920 H.264 + AAC MP4.

## Keys

Create one per agent on your studio: `docker compose exec reelforge reelforge keys create --name agent --scopes read,write,render`. Shown once, stored hashed.

- `read`: Read capabilities, projects, jobs and renders.
- `write`: Create and edit projects, scenes, themes, assets.
- `render`: Start, cancel and retry renders and previews.
- `admin`: Keys, configuration, licence, storage, audit log.

The studio binds 127.0.0.1 by default; for remote agents put it behind TLS (compose profile `tls`) and use `https://YOUR-HOST/mcp`.

## Prompt cookbook

Real renders. The calls were sent by a script that follows the studio's workflow guide (MCP resource `reelforge://guide/workflow`, prompt `make_reel`).

### Explainer, four engines

- Prompt: "Make a 10-second vertical reel that explains ReelForge: hook first, then three steps, then an end card. Midnight theme. Use all four engines."
- Tools called: get_capabilities -> list_templates -> create_project -> add_scene x3 -> validate_project -> render_project -> get_job -> get_render_output
- Result: 1080x1920, 10 s, Remotion + Motion Canvas + HTML + HyperFrames, rendered in 41.2 s (ReelForge Studio 0.1.0, 2026-11-21; times vary)
- Video: https://dev.renderweld.com/reels/agent-directs.dd14c5ae.mp4

### Tips reel

- Prompt: "Make an 8-second reel with three tips for writing a better hook. Default theme, bold title first, end on a call to follow."
- Tools called: get_capabilities -> list_templates -> create_project -> add_scene x2 -> validate_project -> render_project -> get_job -> get_render_output
- Result: 1080x1920, 8 s, Remotion + Motion Canvas + HTML, rendered in 25.7 s (ReelForge Studio 0.1.0, 2026-11-21; times vary)
- Video: https://dev.renderweld.com/reels/hook-tips.f730b6c7.mp4

### Release notes, custom brand colour

- Prompt: "Turn our release notes into a 7-second reel: a custom HTML title card in our teal brand colour, the three changes as a list, and a HyperFrames end card."
- Tools called: get_capabilities -> list_templates -> create_project -> add_scene x2 -> set_theme -> validate_project -> render_project -> get_job -> get_render_output
- Result: 1080x1920, 7 s, HTML + Motion Canvas + HyperFrames, rendered in 24.3 s (ReelForge Studio 0.1.0, 2026-11-21; times vary)
- Video: https://dev.renderweld.com/reels/release-notes.5ca0ab0d.mp4

## Tools (61, from the studio's generated tool reference (docs/public/mcp/tools.md, ReelForge Studio 0.1.0, commit f79f5c6, read 2026-11-23), which is built from the server's tool registry)

Every REST route has a tool with the same scope. Tool names are experimental until v1.0.

### Discover what this server can do

- `get_capabilities` (read-only): Start here. Returns what this ReelForge server can do right now: installed engines (and whether each can render on this machine), templates, themes, media providers (configured...
- `get_project_schema` (read-only): Returns the JSON Schema of the project manifest (current schemaVersion).
- `list_templates` (read-only): Lists scene templates with their engine, description, supported duration range in seconds, the theme tokens they read, and the JSON Schema of their props.
- `list_themes` (read-only): Lists brand themes (built-in "default" and "midnight" plus custom ones) with their tokens: colours, font family, heading weight, motion speed, caption style.
- `get_theme` (read-only): Returns one theme (built-in or custom) with all its tokens: colours, font, weights, motion speed, caption style.
- `list_providers` (read-only): Media providers (TTS, ...) installed on this server, whether the operator configured them, and their cost notes.

### Build and edit a reel

- `create_project`: Creates a project from a manifest.
- `list_projects` (read-only): Lists projects on this server with title, version, scene count and duration (no manifests; get_project has the manifest).
- `get_project` (read-only): Returns the current manifest, its version number and the computed timing of every scene (start frame, duration in frames and seconds).
- `update_project`: Changes a project. Give either patch (a JSON merge patch, RFC 7396: objects merge, null deletes a key, arrays replace) or manifest (a full replacement).
- `delete_project`: Deletes a project with all its versions and renders.
- `list_project_versions` (read-only): Every update saves a new version.
- `add_scene`: Adds a scene at index (default: the end).
- `update_scene`: Changes one scene with a JSON merge patch, e.g. { "props": { "headline": "New" } } or { "durationSeconds": 4 }.
- `remove_scene`: Removes one scene (a project keeps at least one).
- `reorder_scenes`: Sets the scene order. order must list every scene id exactly once.
- `validate_project` (read-only): Full validation report: errors (block rendering) and warnings (e.g. missing licence, rounding of durationSeconds, captions not rendered yet), plus a summary (scenes, total frame...

### Look, sound and assets

- `set_theme`: Sets the theme: a theme id (see list_themes) or inline tokens on top of a base theme, e.g. { "base": "midnight", "tokens": { "colors": { "accent": "#ff8800" } } }.
- `create_theme`: Creates a reusable brand theme. tokens needs colors {background, surface, text, mutedText, accent, accent2} as #rrggbb and fontFamily (a CSS font-family list); optional headingW...
- `update_theme`: Replaces a custom theme (built-in themes cannot be changed).
- `delete_theme`: Deletes a custom theme. Projects that use it fail validation until they pick another theme.
- `set_audio`: Merges into the project audio: { music: { asset, volume 0..1, fadeOutSeconds }, voice: { asset, volume, startFrame }, sfx: [{ asset, atFrame, volume }] }.
- `add_asset_from_url`: Downloads an image, audio, video or font from a public https URL into the server asset store (size-limited, private networks refused, type checked from the bytes) and, with proj...
- `upload_asset`: Uploads a small file you already have (image, audio, video, font) as base64, for example generated audio.
- `list_assets` (read-only): Lists assets: with projectId, all of that project's manifest entries (one page, nextCursor null); otherwise the server asset store.
- `get_asset` (read-only): Metadata of an asset in the store: content type, media type, size, sha256, source, licence, provider metadata (e.g. TTS word timestamps).
- `generate_voice`: Creates a voice-over audio asset with a configured TTS provider (e.g. "elevenlabs") and returns word timestamps.
- `run_provider`: Runs any configured provider with its own parameters (see list_providers) and stores the result as an asset.

### Render and deliver

- `preview_scene`: Starts a low-resolution preview render (default 1/3 size) of one scene, or of the whole project when sceneId is omitted.
- `render_project`: Validates the project and starts the final render (every scene with its engine, assembled with audio, checked with ffprobe and a full decode).
- `get_job` (read-only): Status of a render/preview job: queued, running (with progress stage and fraction), succeeded (result has renderId and output URLs), failed (error with code and stage) or cancel...
- `list_jobs` (read-only): Lists render and preview jobs, optionally only those of one project (projectId) and/or the units and the join of one fanned-out render (parentId: the render job's id; each unit...
- `cancel_job`: Cancels a queued or running job.
- `retry_job`: Starts a new job with the same parameters as a failed or cancelled one (same project version).
- `get_job_logs` (read-only): Log lines of a job (use when a job failed to see the failing stage and tool output).
- `get_render_output` (read-only): Returns the output of a finished render: downloadUrl (a signed link to the MP4 that works WITHOUT a key until downloadUrlExpiresAt, about 1 hour; give this to the user or to cur...
- `list_renders` (read-only): Lists finished renders and previews of a project, newest first, with output URLs, size, fps, frames and duration.

### Run the server (admin keys)

- `configure_provider`: Sets or clears a provider setting such as ELEVENLABS_API_KEY (see list_providers for each provider's setting names).
- `get_config` (read-only): Returns every server setting with its effective value and where it comes from: source "default", "file" (REELFORGE_CONFIG), "env" (origin names the variable) or "runtime" (set w...
- `update_config`: Changes runtime settings at once and stores them in the database (they survive restarts and override the config file and environment). settings maps dotted keys from get_config...
- `get_licence` (read-only): Returns the licence status of this server: status "valid" (full use), "grace" (the licence server is unreachable; renders keep working until graceUntil), "invalid" (renders and...
- `activate_licence`: Stores the licence key (encrypted; needs REELFORGE_SECRET_KEY on the server) and activates it for this server with the licence server, then returns the status (see get_licence).
- `deactivate_licence`: Frees this server's activation of the licence key at the licence server, so the key can be activated on another server.
- `get_storage` (read-only): Returns where asset and render files are stored: driver ("local", "s3", "azure", "gcs"), location (bucket/container, endpoint, prefix, credential source; never secrets), how dow...
- `run_storage_cleanup`: Deletes renders the retention policy no longer keeps (older than storage.retention.renderDays; the newest keepLastRendersPerProject of each project and renders of running jobs a...
- `list_keys` (read-only): Lists API keys: id, name, scopes, prefix, status (active, expired, revoked), created, last used, expiry, limits, quotas, IP allowlist and, after a rotation, until when the old s...
- `get_key` (read-only): One API key (as list_keys shows it) with its render usage today and this month (UTC).
- `create_key`: Creates an API key with the given scopes (read, write, render, admin) and optional expiry, per-key rate limit, render quotas (per UTC day / month) and IP allowlist (CIDR).
- `update_key`: Changes a key's name, expiry, rate limit, render quotas or IP allowlist (null clears one).
- `rotate_key`: Gives a key a new secret (returned once) and keeps the old secret working for graceHours (default: the server setting keys.rotationGraceHours, 24 h), so clients can switch witho...
- `revoke_key`: Revokes a key: it (and any old secret still in its rotation grace window) stops working at once.
- `delete_key`: Deletes an API key; it stops working immediately and disappears from list_keys (prefer revoke_key, which keeps it listed for the audit trail).
- `list_audit_events` (read-only): The audit trail, newest first: who (API key id and name), action (e.g. "key.rotate", "project.create", "config.update"), target, result (success, failure, denied), client IP, us...

### Webhooks and notifications (admin keys)

- `list_webhooks` (read-only): Lists outbound event endpoints: signed webhooks (Standard Webhooks), Slack, Discord and Microsoft Teams incoming webhooks, and email channels (SMTP, Resend, Postmark, Amazon SES...
- `get_webhook` (read-only): One endpoint as list_webhooks shows it, with its delivery counts (pending, delivering, succeeded, dead).
- `create_webhook`: Sends server events to an endpoint so automations (n8n, Zapier, Make, your backend) or people react without polling. type "webhook" (default): an HTTPS POST of {id, type, timest...
- `update_webhook`: Changes an endpoint's name, description, url, email recipients, events or enabled flag (enabling clears a "disabled by the server" reason, e.g. after a 410 Gone). rotateSecret:...
- `delete_webhook`: Deletes an endpoint; its pending deliveries are abandoned (kept in the delivery log as dead).
- `test_webhook`: Sends a "webhook.test" event to one endpoint through the normal outbox (signed, retried).
- `list_webhook_deliveries` (read-only): Deliveries of one endpoint, newest first: event type, webhook-id (messageId), status (pending, delivering, succeeded, dead), attempts, next attempt, last HTTP status and error,...
- `replay_webhook_delivery`: Sends a finished delivery (dead or succeeded) again: a new outbox entry with the same payload and the same webhook-id, so receivers that already processed it can ignore it.
