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

# MCP

> One endpoint. Read balance and spend. No Stripe from MCP.

|             |                                                                                 |
| ----------- | ------------------------------------------------------------------------------- |
| Endpoint    | `POST https://api.screencrafter.io/api/v1/mcp` (JSON-RPC). `GET` is SSE listen. |
| Auth        | `X-API-Key: sc_live_…` or `sc_session`. Anon rejected.                          |
| Protocol    | Echo `2025-03-26` (also accepts `2024-11-05`, `2025-06-18`, `2025-11-25`).      |
| Buy credits | **None.** See [Credits](/credits).                                              |

## What MCP may do

* Read balance: tool `credits` (same payload as `GET /api/v1/credits/balance`). Free.
* Spend: billable `tools/call` (Instant Post **submit**, `take_screenshot`, kitchen renders). Deduct on success only.
* Free: Instant Post `poll` / `zip` / `list`, `get_job`, `credits`, `initialize`, `tools/list`.

## What MCP must not do

No `purchase`. No Stripe. No checkout URL in the 402 string. On low balance, tell the user to buy via REST, then retry.

## Instant Post

One tool, `action`: `submit` | `poll` | `zip` | `list`.

* Submit: `url` (website or YouTube / LinkedIn / Instagram / TikTok), or `idea_prompt`, plus existing video inputs. No extra submit fields.
* Poll: pack summary when completed (clips, stills, captions, `studio_url`). `zip.url` is null until you call zip.
* Zip: on-demand CDN JSON (`zip_url`), not bytes through MCP.
* List: recent Instant Post jobs.

YouTube / LinkedIn / Instagram are `from_url` + `platform_video`, not a fifth mode.

## Client configs

**Cursor** — `~/.cursor/mcp.json`

```json theme={null}
{
  "mcpServers": {
    "screencrafter": {
      "url": "https://api.screencrafter.io/api/v1/mcp",
      "headers": { "X-API-Key": "sc_live_YOUR_KEY" }
    }
  }
}
```

**Claude Code**

```bash theme={null}
claude mcp add --scope user --transport http screencrafter https://api.screencrafter.io/api/v1/mcp \
  --header "X-API-Key: sc_live_YOUR_KEY"
```

**Codex** — `~/.codex/config.toml`

```toml theme={null}
[mcp_servers.screencrafter]
url = "https://api.screencrafter.io/api/v1/mcp"
http_headers = { "X-API-Key" = "sc_live_YOUR_KEY" }
```

**Grok** — `~/.grok/config.toml`

```toml theme={null}
[mcp_servers.screencrafter]
url = "https://api.screencrafter.io/api/v1/mcp"
headers = { "X-API-Key" = "sc_live_YOUR_KEY" }
```

Use a merchant key from signup. Never the marketing-site env key.
