mcp: Claude Code paints with a ChatGPT subscription by default; local agents and endpoints
#5
by yycc - opened
Files changed (2)
13 unmodified lines141516171819202122232412 unmodified lines373839404142219 unmodified lines26226326426526626726826913 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 APIspend), or a key for an OpenAI-compatible images API (the default; 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 ofRAM). The server itself needs no GPU. 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 linesshare 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.- `codex`, *codex image mode*: the agent must be codex. An image tool's first call returns a CODEX IMAGE STEP, codexpaints 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:```bashclaude mcp add viggle-remake -e REMAKE_HOME=$HOME/.viggle-remake -e OPENAI_API_KEY=$OPENAI_API_KEY -- viggle-remake-mcp```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).13 unmodified lines1415161718192021222324252612 unmodified lines394041424344454647219 unmodified lines26726826927027127227327427527613 unmodified lines**What you need:**- **an agent**: Claude Code, codex, or any MCP client;- **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 ofRAM). The server itself needs no GPU, but a worker uses nearly all of its card's memory, so a local model as theagent 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 linesshare 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 andreturns `b64_json`, such as one you host (not tested with local models). A server that reports no usage is countedat $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, codexpaints 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:```bashclaude 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 paintthrough 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 lines34567892 unmodified lines"viggle-remake": {"command": "viggle-remake-mcp","args": [],"env": {"REMAKE_HOME": "${REMAKE_HOME:-~/.viggle-remake}"}}}}2 unmodified lines34567892 unmodified lines"viggle-remake": {"command": "viggle-remake-mcp","args": [],"env": {"REMAKE_HOME": "${REMAKE_HOME:-~/.viggle-remake}", "REMAKE_PAINT": "pool"}}}}
mcp/README.md+11-4
mcp/examples/claude_mcp.json+1-1