# ChatGPT + VidMachine MCP

> The desktop app runs VidMachine through the Codex host config.

ChatGPT on the web only offers OAuth (or no auth) for custom MCP servers, so it cannot send a VidMachine API key. The desktop app shares the Codex host config, which supports a bearer token from an environment variable. Add the entry below and VidMachine's tools show up in the app.

Page: https://vidmachine.ai/chatgpt

## ChatGPT on the web needs OAuth

The hosted connector cannot send a bearer API key, and VidMachine does not offer MCP OAuth yet. Use the desktop app, or Claude Code, Cursor, or Codex, until OAuth ships. The [MCP server docs](https://vidmachine.ai/docs/mcp.md) list every header-capable client.

## Connect (desktop app)

Create an API key under [API & MCP](https://vidmachine.ai/api-keys), then add an entry to `~/.codex/config.toml`. `bearer_token_env_var` names the environment variable that holds the key — the file itself never contains a secret.

```toml
[mcp_servers.vidmachine]
url = "https://vidmachine.ai/api/mcp"
bearer_token_env_var = "VIDMACHINE_MCP_KEY"
```

```bash
export VIDMACHINE_MCP_KEY="vidm_..."   # raw key, no "Bearer " prefix
```

- The value is the raw key. The host adds the Bearer header itself.
- The same entry also connects the Codex CLI, since both read `~/.codex/config.toml`.
- The agent gets 28 tools in five groups: find, build, render, post, brand.

## The loop: find, inspect, make, schedule

### 1. Find — find out what's already there

Ask for a project or a video in plain language. The read tools answer with real IDs, statuses, and the first missing stage — and cost nothing.

Tools: `search_documentation`, `get_documentation`, `list_projects`, `list_videos`

### 2. Inspect — inspect before spending credits

Read the script, scenes, and cover, then quote the credits the remaining stages will cost and check the balance. Every paid step is priced before it runs.

Tools: `get_video_content`, `estimate_video_cost`, `get_credit_balance`

### 3. Make — make your version

Rewrite a scene, regenerate just that scene's media, and resume the pipeline. Work that already exists is reused, so a one-scene change does not redo the video.

Tools: `update_scene`, `generate_scene_media`, `generate_video`, `export_video`

### 4. Schedule — schedule it and get the link

Set the post time and status, then have the final URL handed back to you. The scheduler publishes it with the same rules as the dashboard.

Tools: `update_video`, `export_video`

## Three prompts to try

1. List my projects and tell me which videos are waiting on scene media.
2. Quote what it costs to finish the pigeon video, then render the missing scenes.
3. Schedule the finished clip for Friday 9:00 and give me the export link.

## Full tool list

Every tool, input schema, protocol version, and header rule: [MCP server docs](https://vidmachine.ai/docs/mcp.md).

Other guides: [Claude Code](https://vidmachine.ai/claude) · [Cursor](https://vidmachine.ai/cursor) · [Codex](https://vidmachine.ai/codex)
