> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lavendly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install in OpenClaw

> Give your OpenClaw agent the ability to produce finished videos through Lavendly's MCP server.

[OpenClaw](https://openclaw.ai) is an open-source personal agent that runs on
your own machine, talks to you over the chat apps you already use (WhatsApp,
Telegram, Slack, Discord, iMessage, and more), and can act on its own. Wire in
Lavendly and the agent can write a script, generate the shots, narrate, score,
caption, render, and send you the finished video, with no glue code.

## 1. Add the server

OpenClaw reads MCP servers from `~/.openclaw/openclaw.json`. Add a `lavendly`
entry under `mcp.servers`:

```json theme={null}
{
  "mcp": {
    "servers": {
      "lavendly": {
        "command": "npx",
        "args": ["-y", "@lavendly/mcp"],
        "transport": "stdio",
        "env": { "LAVENDLY_API_KEY": "${LAVENDLY_API_KEY}" }
      }
    }
  }
}
```

Or use the CLI:

```bash theme={null}
openclaw mcp add lavendly \
  --command npx --arg "-y" --arg "@lavendly/mcp" \
  --env LAVENDLY_API_KEY='${LAVENDLY_API_KEY}'
```

<Warning>
  Don't paste your key inline, OpenClaw's config gets backed up and synced. Keep
  it in a real environment variable and reference it as `${LAVENDLY_API_KEY}`:

  ```bash theme={null}
  export LAVENDLY_API_KEY=lv_live_…
  ```
</Warning>

## 2. Restart the gateway

```bash theme={null}
openclaw restart
openclaw mcp list      # 'lavendly' should appear with 20 tools
```

Lavendly's tools now sit alongside OpenClaw's built-in ones; the agent calls
them transparently.

## 3. Use it from any channel

Message your OpenClaw agent like you'd text a colleague:

> Make a 15-second video of a sleepy fox discovering an old map in a bookshop.
> Narrate it in a warm voice with captions, lay a cozy ambient track under it,
> and send me the link when it's rendered.

The agent plans the call sequence (status → create workflow → attach voiceover →
attach music → render → poll), uses Lavendly's idempotency keys so a dropped
connection never double-charges, and replies in the same chat with the URL.

## 4. Let it run on its own

OpenClaw's edge is autonomy, it keeps a to-do list, a memory, and can run on a
schedule. Pair that with Lavendly for hands-off pipelines:

> Every Monday at 9am, take the top post from my newsletter, turn it into a
> 30-second vertical video, and DM me the draft for approval before publishing.

Lavendly's [credit ledger](/guides/credits-and-plans) and monthly cost cap keep
an autonomous loop from overspending, the agent checks the balance before each
render and stops if it would blow the cap.

## Pair it with a skill

The MCP server tells OpenClaw **what tools exist**. A Lavendly
[skill](/agent-skills/overview) tells it **how to use them well**, the right
call order, when to set idempotency keys, and how to read the cost preview
before committing. Drop the skill into OpenClaw's skills directory to turn "an
agent that can render videos" into "an agent that produces good videos cheaply."

<Card title="Next: Agent skills" icon="robot" href="/agent-skills/overview">
  The operating manual that makes the agent reliable.
</Card>
