# MCP & CLI

> Use eroq inside ChatGPT, Claude, Cursor and coding agents — plus the terminal CLI.

eroq is a remote MCP (Model Context Protocol) server: connect https://eroq.ai/mcp to ChatGPT, Claude, Cursor or any MCP client and the generation tools (images, video, speech) appear inside the app. Auth is your normal API key as a Bearer header; clients that cannot send headers use the URL form `https://eroq.ai/mcp/<key>` — that URL is then a secret, and revoking the key kills the link. Same wallet, same flat credit prices as the API; failed renders refund themselves.

## Connect

```bash
# Claude Code
claude mcp add --transport http eroq https://eroq.ai/mcp \
  --header "Authorization: Bearer eroq_sk_YOUR_KEY"
```

```json
// Cursor — ~/.cursor/mcp.json
{ "mcpServers": { "eroq": { "url": "https://eroq.ai/mcp", "headers": { "Authorization": "Bearer eroq_sk_YOUR_KEY" } } } }
```

```toml
# Codex CLI — ~/.codex/config.toml (local stdio server via the eroq CLI)
[mcp_servers.eroq]
command = "npx"
args = ["-y", "eroq", "mcp"]
env = { EROQ_API_KEY = "eroq_sk_YOUR_KEY" }
```

ChatGPT: Settings → Connectors → Create, URL `https://eroq.ai/mcp/<key>`, Authentication: None. Claude web/desktop: Settings → Connectors → Add custom connector, same URL.

## Tools

- `generate_image` — text-to-image, returns the render URL (model price).
- `generate_video` — async render; poll `get_video_status` (free) with the returned job id.
- `generate_speech` — TTS MP3; roster voices, clones, or `char:<id>`.
- `enhance_prompt` — free draft-to-engine-grade prompt rewrite.
- `list_models`, `list_voices`, `list_characters`, `get_account` — free discovery.

## CLI

The `eroq` npm package (Node 18+, zero deps) drives the same API from the terminal; `eroq mcp` runs a local stdio MCP server that saves media as files — ideal for coding agents. `eroq install <client>` prints the connect snippet.

```bash
npm install -g eroq
eroq login
eroq image "portrait of a starship mechanic, warm hangar light, 35mm"
eroq video "slow dolly-in on a neon-lit alley in the rain" -s 8 --aspect 9:16
```

---
Canonical: https://eroq.ai/docs/mcp · Index for agents: https://eroq.ai/llms.txt · OpenAPI: https://eroq.ai/openapi.json
