# Callmodels Remote MCP — Agent & Client Guide

> Canonical guide URL: https://callmodels.dev/mcp-guide.md
> Remote Streamable HTTP MCP Endpoint: https://mcp.callmodels.dev/mcp
> Catalog Coverage: 35 public model IDs across 14 commercial image, video, voice cloning, and music model families ($1.00 USD = 100 Credits, $0 charged on failed calls).

## 1. Zero-Install Connection (OAuth 2.1 Recommended)

Callmodels runs a hosted Streamable HTTP MCP server (`2025-03-26` / `2024-11-05`) at `https://mcp.callmodels.dev/mcp`. No local npm/Python package or API key is required for interactive clients:

- **Claude Web / Desktop (1-click pre-filled)**: https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Callmodels&connectorUrl=https%3A%2F%2Fmcp.callmodels.dev%2Fmcp
- **ChatGPT Connectors**: Open `https://chatgpt.com/plugins`, create a connector named `Callmodels` with URL `https://mcp.callmodels.dev/mcp` and keep **OAuth** selected.
- **OpenAI Codex CLI**:
  ```bash
  codex mcp add callmodels --url https://mcp.callmodels.dev/mcp
  codex mcp login callmodels
  ```
- **Anthropic Claude Code**:
  ```bash
  claude mcp add --transport http --scope user callmodels https://mcp.callmodels.dev/mcp
  # Inside Claude Code, run /mcp -> callmodels to complete browser OAuth sign-in
  ```
- **Cursor (1-click installer)**: https://cursor.com/install-mcp?name=callmodels&config=eyJ1cmwiOiJodHRwczovL21jcC5jYWxsbW9kZWxzLmRldi9tY3AifQ==
- **Cursor / VS Code / Google Antigravity (`mcp.json` / `~/.gemini/config/mcp_config.json`)**:
  ```json
  {
    "mcpServers": {
      "callmodels": {
        "url": "https://mcp.callmodels.dev/mcp"
      }
    }
  }
  ```
- **Google Gemini CLI**:
  ```bash
  gemini mcp add --transport http callmodels https://mcp.callmodels.dev/mcp
  # Inside Gemini CLI, run /mcp auth callmodels
  ```
- **Headless CI / Non-Interactive Servers Only**: Pass HTTP header `Authorization: Bearer sk-...` (minted in `https://callmodels.dev/console/api-keys`). Never append `?token=` or `?api_key=` to the URL (`400 token_in_url_forbidden` per RFC 6750 §2.3).

## 2. Mandatory Safe Execution Workflow for Agents

When generating media on behalf of a user, always follow these 5 rules:

1. **Verify Free Connectivity First (`get_balance` / `list_models`, 0 Credits)**: Right after connecting, call `get_balance` or `list_models` to verify authentication and inspect available Credits + sub-key daily/per-task caps.
2. **Discover Exact Schema Before Calling (`get_model`, 0 Credits)**: Never guess model IDs or enum values. Call `get_model` for the chosen model to read exact allowed aspect ratios, resolutions, durations, and reference limits.
3. **Upload Local Reference Assets Safely (`prepare_upload`, 0 Credits)**:
   - **Never pass local disk media as `base64_data` in LLM tool arguments** (use `upload_file` only for public HTTPS `source_url` links).
   - **In local CLI / IDE agents (Codex, Claude Code, Cursor, Antigravity, Gemini CLI)**: call `prepare_upload` (use `files: [{ file_name }, ...]` to prepare up to 10 local reference files in one call), then run `curl_command` (macOS/Linux) or `powershell_command` (Windows PowerShell `curl.exe`). Each `POST /upload/:token` returns `{ id, status: "uploaded", url, duration_seconds }` directly in stdout — use `url` immediately with no extra `get_upload` call! For `indextts-2.0`, if a local voice clip is `.mp3`/`.m4a` or outside `3–30s`, convert/trim locally first via `ffmpeg -y -i "<in>" -t 25 -ac 1 -ar 24000 "<ref.wav>"`.
   - **In cloud chat clients (Claude Web, ChatGPT, Gemini Web)**: call `prepare_upload`, share `upload_page_url` so the user can drag-and-drop their local file (up to 50 MB), then call `get_upload` (`upload_id` or `upload_ids`) to obtain the verified 24h signed `files.callmodels.dev` URL.
4. **Always Quote & Confirm Before Paid Submission (`estimate_cost` -> `quote_token`)**:
   - Call `estimate_cost` (`0 Credits`) first (use `inputs: [...]` for `1..20` batch items on the same model) and clearly tell the user the exact `estimated_credits` and USD equivalent (`$1 = 100 Credits`).
   - Wait for explicit user confirmation, then pass the returned single-use `quote_token` to `generate_image`, `generate_video`, or `generate_audio`. Each `quote_token` is idempotent and can never double-charge on retries.
   - Zero-copy chaining: pass completed `https://files.callmodels.dev/task_...` output URLs directly into downstream `image_urls` / `video_urls` / `audio_urls` without downloading or re-uploading.
   - Only pass `skip_estimate: true` when the user explicitly instructs you to generate without prior confirmation (never allowed on multi-item batches).
5. **Never Resubmit on Timeout — Poll Original Task & Save Locally (`get_task`, 0 Credits)**:
   - Video and full-song generation are asynchronous (typically 30s–180s). Poll `get_task` with `task_id` or `task_ids` (`wait_seconds: 15`..`25`) until `completed` / `failed` (`all_terminal === true`).
   - Never re-run `generate_*` for an already accepted task. Failed tasks automatically release 100% of held Credits (`0 Credits` charged).
   - Deliver the 30-day signed `https://files.callmodels.dev/...` URLs (`delivery_markdown` renders images inline via `![Generated image](url)` + `&download=1` download links). In local CLI/IDE workspaces, also save completed files into the user-specified folder (or `./outputs/<suggested_filename>`) using `local_save_commands` (`curl` / `curl.exe -fsSL`, never sending `Authorization` headers to `files.callmodels.dev`).

## 3. 12 Focused MCP Tools Reference

| Tool | Scope | Billing | Purpose |
| :--- | :--- | :--- | :--- |
| `list_models` | `models:read` | `0 Credits` | Filter image, video, speech, and music models by modality or keyword |
| `get_model` | `models:read` | `0 Credits` | Inspect exact JSON Schema parameters, constraints, and retail Credit rates |
| `estimate_cost` | `models:read` | `0 Credits` | Compute exact/ceiling Credits, affordability, and 24h single-use `quote_token` |
| `generate_image` | `tasks:write` | Metered | Generate or edit commercial images (Nano Banana, GPT Image 2.6, Seedream 5.5, Grok) |
| `generate_video` | `tasks:write` | Metered | Text/image/reference-to-video, edit, extend & draft-upgrade clips (Seedance, Grok Video 1.5) |
| `generate_audio` | `tasks:write` | Metered | Zero-shot voice cloning (IndexTTS 2.0) or 2 full vocal/instrumental songs per call (Suno V6) |
| `get_task` | `tasks:read` | `0 Credits` | Poll 1 `task_id` or up to 50 `task_ids` inline (`wait_seconds` up to 25s) |
| `list_tasks` | `tasks:read` | `0 Credits` | Cursor-paginated task history filtered by status, modality, model, or channel |
| `get_balance` | `credits:read` | `0 Credits` | Read wallet available/held Credits and sub-key daily/per-task remaining caps |
| `upload_file` | `uploads:write` | `0 Credits` | Ingest `base64_data` (<= 10 MB) or public HTTPS `source_url` with 48h SHA-256 dedup |
| `prepare_upload` | `uploads:write` | `0 Credits` | Mint 15m zero-key session returning browser `upload_page_url` + CLI `curl_command` (<= 50 MB) |
| `get_upload` | `uploads:write` | `0 Credits` | Verify upload completion and retrieve 24h signed `files.callmodels.dev` URL + media duration |

## 4. Sample Retail Anchor Rates ($1.00 USD = 100 Credits)

- **Nano Banana Pro (4K Poster, up to 14 reference images)**: 5.8 Credits ($0.0580)
- **Grok Imagine Video 1.5 (5s 720p with native synced audio)**: 17.5 Credits ($0.175)
- **IndexTTS 2.0 (10s 24 kHz zero-shot cloned voiceover)**: 1.2 Credits ($0.012)
- **Suno V6 (up to 2 full songs + cover art & lyrics per call)**: 7 Credits ($0.0700) standard / 14 Credits ($0.1400) Max

Full interactive docs: https://callmodels.dev/docs/mcp | Full catalog: https://callmodels.dev/models
