> ## 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.

# MCP overview

> Lavendly ships a Model Context Protocol server so any MCP-aware agent can drive the canvas.

## What is the Lavendly MCP server?

A **Model Context Protocol** server that exposes every Lavendly operation as
an MCP tool, so any MCP-compatible agent can drive the whole pipeline end to
end. It is available two ways: a **hosted** endpoint at
`https://mcp.lavendly.ai/mcp` (Streamable HTTP, nothing to install) and a
**local** server (`npx @lavendly/mcp`, stdio). Either way it can:

* Browse and create workflows (describe shots → grouped scenes)
* Estimate cost and get approval **before** spending
* Generate scenes (one or all) and poll narratable status
* Attach voiceovers and music tracks (materialized as real canvas nodes) and configure the mix
* Review with a quality check (ffprobe + vision rubric) and scene thumbnails
* Render the full video (free - it reuses generated clips) and poll until done
* Publish or schedule the result to connected social channels

## Connect

**Hosted (recommended).** Point your agent at the remote endpoint and
authenticate with a Bearer API key. Nothing to install, works from any machine:

```bash theme={null}
https://mcp.lavendly.ai/mcp
```

Claude Code:

```bash theme={null}
claude mcp add --transport http lavendly https://mcp.lavendly.ai/mcp \
  --header "Authorization: Bearer lv_live_xxx"
```

Cursor (`~/.cursor/mcp.json`):

```json theme={null}
{
  "mcpServers": {
    "lavendly": {
      "url": "https://mcp.lavendly.ai/mcp",
      "headers": { "Authorization": "Bearer lv_live_xxx" }
    }
  }
}
```

**Local.** Run the server over stdio via npx instead:

```bash theme={null}
claude mcp add lavendly --env LAVENDLY_API_KEY=lv_live_xxx -- npx -y @lavendly/mcp
```

Get your key from **Dashboard > Settings > API keys**. Per-agent walkthroughs:

## Install it in your agent

<CardGroup cols={2}>
  <Card title="Claude Code" icon="terminal" href="/mcp/install-claude-code">CLI-native install.</Card>
  <Card title="OpenClaw" icon="robot" href="/mcp/install-openclaw">Autonomous, multi-channel agent.</Card>
  <Card title="Claude Desktop" icon="comment-dots" href="/mcp/install-claude-desktop">Two-minute setup.</Card>
  <Card title="Cursor" icon="bolt" href="/mcp/install-cursor">Composer-ready.</Card>
  <Card title="Custom runtime" icon="code" href="/sdks/anthropic-sdk">Tool-use via the SDK.</Card>
</CardGroup>

## What you get out of the box

The MCP server exposes **27 tools** mapped 1:1 to documented API
operations. See the full list in [Tools reference](/mcp/tools-reference).

| Domain       | Tools                                                                                         |
| ------------ | --------------------------------------------------------------------------------------------- |
| Workflows    | `list_workflows`, `get_workflow`, `create_workflow`, `update_workflow`, `delete_workflow`     |
| Assets       | `import_asset`                                                                                |
| Generate     | `estimate_cost`, `generate_scene`, `get_generation_status`                                    |
| Audio        | `get_workflow_audio`, `set_clip_native_audio`, `attach_track`, `update_track`, `detach_track` |
| Render       | `create_render`, `get_render`, `list_renders`, `list_all_renders`                             |
| Review       | `quality_check`, `get_scene_frame`                                                            |
| Publish      | `list_channels`, `publish_video`, `schedule_video`                                            |
| Capabilities | `get_status`, `get_schema`, `get_ledger`, `get_monthly_usage`                                 |

## MCP is the surface, skills are how the agent uses it

The MCP server tells the agent **what tools exist.** It doesn't tell the
agent **how to use them well.**

That's what [Agent skills](/agent-skills/overview) are for: short
operating manuals (markdown files) that the agent reads alongside the
tool catalog. A good Lavendly skill teaches the agent:

* The canonical call sequence (status → ledger → create → estimate → generate → review → render → publish)
* When to use idempotency keys
* How to interpret the cost preview before committing, and that render is free
* When to regenerate a scene from a failed quality check (using the `reroll_hint`)
* Domain-specific recipes (storyteller, multi-clip continuity, localized variants)

You can use the MCP server without a skill, the tool descriptions are
self-explanatory enough that a capable agent will figure it out. But
giving it a skill turns an "agent that can render videos" into "an agent
that produces good videos cheaply."

## Need an MCP-compatible runtime?

Any agent runtime that supports MCP can load the Lavendly server.
Beyond the three first-party guides linked above, see:

* The [Anthropic SDK](/sdks/anthropic-sdk) page for embedding Lavendly
  tools into your own runtime via `tool_use`.
* The MCP spec at <a href="https://modelcontextprotocol.io">modelcontextprotocol.io</a>
  for everything else.

## What the server does *not* do

* It does not store your API key. The key comes from the MCP client: an env
  var for the local server, or the `Authorization: Bearer` header for the
  hosted endpoint.
* It does not cache tool results, every call hits the live API so the
  agent always sees current state.
* It does not advertise resources or prompts (only tools). Resources
  aren't needed for an API wrapper and the absence keeps capability
  negotiation honest.
