mcp: Claude Code paints with a ChatGPT subscription by default; local agents and endpoints
#5
by yycc - opened
Files changed (2)
13 unmodified lines1415161718171819202121222324252612 unmodified lines394041424344454647219 unmodified lines26726826926527027127227327427527613 unmodified lines
**What you need:**- **an agent**: Claude Code, codex, or any MCP client;- **a painter** for the keyframes: either a codex login with a ChatGPT subscription (`REMAKE_PAINT=pool`, no API spend), or a key for an OpenAI-compatible images API (the default; see [Cost](#cost));- **a painter** for the keyframes: `codex` logged in with a ChatGPT subscription (`REMAKE_PAINT=pool`: no API key, no API spend; the Claude Code and codex setups below use it), or an OpenAI-compatible images API (`OPENAI_API_KEY`, billed per image; see [Cost](#cost));- **render workers**: `viggle-remake-worker` on a card with 96 GB or more, or the [ComfyUI worker](#one-32-gb-card-the-comfyui-worker) on one 32 GB card such as an RTX 5090 (Linux, about 60 GB of RAM). The server itself needs no GPU. Cards below 32 GB are not tested with the agent; use ComfyUI by hand RAM). The server itself needs no GPU, but a worker uses nearly all of its card's memory, so a local model as the agent needs another GPU or another machine. Cards below 32 GB are not tested with the agent; use ComfyUI by hand ([`COMFYUI.md`](../COMFYUI.md#smaller-gpus-int8-and-gguf)).
## How it fits together12 unmodified lines share a directory, so they can run on different machines over a shared filesystem.- **Keyframes** are painted by an image model, in one of three backends (`REMAKE_PAINT`): - unset: an OpenAI-compatible images API (`gpt-image-2` by default). The only backend with API spend. `OPENAI_BASE_URL` points it at another server that implements `images.edit` with several input images and returns `b64_json`, such as one you host (not tested with local models). A server that reports no usage is counted at $0.15 a picture against `REMAKE_MAX_USD`. - `codex`, *codex image mode*: the agent must be codex. An image tool's first call returns a CODEX IMAGE STEP, codex paints with its own `image_gen` tool, and the second call of the same tool imports the picture. - `pool`, *pool image mode*: the server starts a helper `codex exec` per picture (its own codex home, no MCP,219 unmodified lines1. Register the server. Copy [`examples/claude_mcp.json`](examples/claude_mcp.json) to `.mcp.json` in your project, or run: ```bash claude mcp add viggle-remake -e REMAKE_HOME=$HOME/.viggle-remake -e OPENAI_API_KEY=$OPENAI_API_KEY -- viggle-remake-mcp claude mcp add viggle-remake -e REMAKE_HOME=$HOME/.viggle-remake -e REMAKE_PAINT=pool -- viggle-remake-mcp ``` Both paint in pool image mode: `codex` on `PATH`, logged in with a ChatGPT subscription, and no API key. To paint through an images API instead, drop `REMAKE_PAINT` and pass `-e OPENAI_API_KEY=$OPENAI_API_KEY`.2. Give the agent the rules: put `@AGENTS.md` in the project's `CLAUDE.md`, or copy the file in.3. Raise the tool timeout. `wait` blocks for up to 30 minutes and `paint` can take a few, so start Claude Code with `MCP_TOOL_TIMEOUT=4200000` (milliseconds).2 unmodified lines345667892 unmodified lines "viggle-remake": { "command": "viggle-remake-mcp", "args": [], "env": {"REMAKE_HOME": "${REMAKE_HOME:-~/.viggle-remake}"} "env": {"REMAKE_HOME": "${REMAKE_HOME:-~/.viggle-remake}", "REMAKE_PAINT": "pool"} } }}mcp/README.md+11-4
mcp/examples/claude_mcp.json+1-1