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

# MCP for AI Agents (Beta)

> Drive the Video API from Claude, Cursor, or any MCP-capable agent — every capability as a native tool.

<Note>
  **Beta.** The Video API MCP server is in beta. Tool names and schemas are stable for the beta (additions may land; nothing is removed without notice). Jobs are billed to the organization you approve (hosted) or your API key's account (headless): see [Billing & Limits](/video/billing-limits).
</Note>

## What you get

An MCP server that exposes the full Video API as native agent tools — all 44 capabilities in the [capabilities reference](/video/capabilities), with client-side schema validation, automatic submit-and-poll, and results returned as artifact URLs or structured analysis JSON. Your agent edits video by calling tools; you connect with one OAuth login (or an API key in [headless environments](#headless-and-ci-api-key)).

## Connect your agent

One OAuth login — approve access in the browser and your agent is ready. No API key to create or paste. Jobs bill to the organization you approve on the consent page.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={"dark"}
    claude mcp add --transport http eachlabs-video https://mcp.eachlabs.ai/mcp
    ```

    Then run `/mcp` inside Claude Code and log in when prompted.
  </Tab>

  <Tab title="Codex">
    ```bash theme={"dark"}
    codex mcp add eachlabs-video --url https://mcp.eachlabs.ai/mcp --oauth-resource https://mcp.eachlabs.ai/mcp
    ```

    The `add` command opens the OAuth flow in your browser. If you need to re-authenticate later:

    ```bash theme={"dark"}
    codex mcp login eachlabs-video --scopes predictions:create,predictions:read
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for all projects), then approve the login prompt in Cursor's MCP settings:

    ```json theme={"dark"}
    {
      "mcpServers": {
        "eachlabs-video": { "url": "https://mcp.eachlabs.ai/mcp" }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    **Settings → Connectors → Add custom connector**, set the URL to `https://mcp.eachlabs.ai/mcp`, then connect and approve with your eachlabs account.
  </Tab>

  <Tab title="Kimi Code">
    Add to `~/.kimi-code/mcp.json`, then log in when prompted:

    ```json theme={"dark"}
    {
      "mcpServers": {
        "eachlabs-video": { "url": "https://mcp.eachlabs.ai/mcp" }
      }
    }
    ```
  </Tab>
</Tabs>

## Headless and CI (API key)

Environments without a browser (CI runners, servers) run the same MCP server locally over stdio, authenticated with an API key from **Settings → API Keys** in your [eachlabs dashboard](https://eachlabs.ai); jobs bill to the key's account. The local server is named `video` so it can coexist with the hosted `eachlabs-video`. Add the `mcpServers` entry to your client's stdio config — for Claude Code, `.mcp.json` in the project root:

```json theme={"dark"}
{
  "mcpServers": {
    "video": {
      "command": "npx",
      "args": ["-y", "@eachlabs/video-api-mcp"],
      "env": { "EACHLABS_API_KEY": "YOUR_API_KEY" }
    }
  }
}
```

Codex uses the TOML equivalent in `~/.codex/config.toml`:

```toml theme={"dark"}
[mcp_servers.video]
command = "npx"
args = ["-y", "@eachlabs/video-api-mcp"]
env = { EACHLABS_API_KEY = "YOUR_API_KEY" }
```

For reproducible CI, pin the version (`npx -y @eachlabs/video-api-mcp@X.Y.Z`) instead of tracking latest.

<Note>
  **npm rollout:** the `@eachlabs/video-api-mcp` package is rolling out during the beta. If `npx` cannot find the package yet, use the hosted connection above.
</Note>

<Note>
  The server targets the `eachlabs-video-api` model slug by default — no extra configuration is needed. `EACHLABS_VIDEO_MODEL` exists only to override that default.
</Note>

## Use it

Ask your agent to do video work with any publicly downloadable media URL — inputs are staged automatically (see [Quickstart — inputs](/video/quickstart#2-provide-your-input-video)); `s3://` URIs from onboarding also work:

> "Trim the first 12 seconds of `YOUR_INPUT_URL`, burn the captions from this SRT, and give me the result URL."

The agent chains the `trim` and `captions` tools; each tool call returns the hosted artifact URL (or JSON for the [analysis capabilities](/video/capabilities#response-shapes)) plus the billed cost. Local files: ask the agent to call `upload_file` with the file's path — it uploads the file to eachlabs storage and returns the `public_url` to pass as input (the underlying REST endpoint is [upload-file](/storage/upload-file)).

## Tool inventory

One tool per wrapped capability — same names and parameters as the [capabilities reference](/video/capabilities) (the `keep_ranges`/`silence_remove` pair is exposed under its original wire name, `silence_remove`) — plus `run_ffmpeg` (raw ffmpeg for beta organizations; contract and safety boundary in [run\_ffmpeg](/video/capabilities#run_ffmpeg)), `get_job` for checking a long-running job later, and `upload_file` for uploading a local file to eachlabs storage and returning the `public_url` to pass as input. Parameters are validated client-side before submit and again by the engine. A call that doesn't match the tool's schema — including a parameter the tool doesn't declare — is rejected before anything is submitted: nothing reaches the engine and nothing bills.

## Notes for agent builders

* Long jobs: the server polls with backoff; if a job outlives the polling budget — the hosted server holds up to \~4 minutes, the local stdio server defaults to 5 minutes (configurable via `EACHLABS_POLL_TIMEOUT_MS`) — the tool returns the prediction ID and your agent resumes with `get_job`.
* Billing semantics are identical to the REST surface: [Billing & Limits](/video/billing-limits).

Policies: [Acceptable Use](/video/acceptable-use) · [Abuse & Takedown](/video/abuse-and-takedown) · [Versioning & Deprecation](/video/versioning)
