# MCP server

Connect any MCP client to Cliphi with one URL and your API key.

Cliphi hosts a remote MCP server that exposes the Agent API as tools:

```
https://www.cliphi.com/api/mcp
```

- **Transport**: Streamable HTTP, stateless, JSON responses. POST your
  JSON-RPC messages; there is no server-initiated SSE stream (GET returns
  405). Both `/api/mcp` and `/api/mcp/` work.
- **Auth**: send your key as `Authorization: Bearer chp_live_...` (or
  `X-API-Key`). Same keys, same guards, same billing as REST.
- **Tools**: `submit_video`, `get_job_status`, `render_clip` (the billed
  purchase moment), `get_demo` (keyless).

## Claude connector

In Claude, add a connector with the URL above and your key as the bearer
token. Then ask for clips from your video's link in plain words.

## Generic client config

```json
{
  "mcpServers": {
    "cliphi": {
      "url": "https://www.cliphi.com/api/mcp",
      "headers": { "Authorization": "Bearer chp_live_..." }
    }
  }
}
```

Tool errors carry the same human-ready `message` as the REST
[error envelope](/docs/errors), with the stable code in a
`[error_code: ...]` suffix.
