mcp: Claude Code paints with a ChatGPT subscription by default; local agents and endpoints

#5
by yycc - opened
Files changed (2) hide show
  1. mcp/README.md +11 -4
  2. mcp/examples/claude_mcp.json +1 -1
mcp/README.md CHANGED
@@ -14,11 +14,13 @@ budgets. The rules the agent follows are in [`AGENTS.md`](viggle_remake_mcp/data
14
 
15
  **What you need:**
16
  - **an agent**: Claude Code, codex, or any MCP client;
17
- - **a painter** for the keyframes: either a codex login with a ChatGPT subscription (`REMAKE_PAINT=pool`, no API
18
- spend), or a key for an OpenAI-compatible images API (the default; see [Cost](#cost));
 
19
  - **render workers**: `viggle-remake-worker` on a card with 96 GB or more, or the
20
  [ComfyUI worker](#one-32-gb-card-the-comfyui-worker) on one 32 GB card such as an RTX 5090 (Linux, about 60 GB of
21
- RAM). The server itself needs no GPU. Cards below 32 GB are not tested with the agent; use ComfyUI by hand
 
22
  ([`COMFYUI.md`](../COMFYUI.md#smaller-gpus-int8-and-gguf)).
23
 
24
  ## How it fits together
@@ -37,6 +39,9 @@ budgets. The rules the agent follows are in [`AGENTS.md`](viggle_remake_mcp/data
37
  share a directory, so they can run on different machines over a shared filesystem.
38
  - **Keyframes** are painted by an image model, in one of three backends (`REMAKE_PAINT`):
39
  - unset: an OpenAI-compatible images API (`gpt-image-2` by default). The only backend with API spend.
 
 
 
40
  - `codex`, *codex image mode*: the agent must be codex. An image tool's first call returns a CODEX IMAGE STEP, codex
41
  paints with its own `image_gen` tool, and the second call of the same tool imports the picture.
42
  - `pool`, *pool image mode*: the server starts a helper `codex exec` per picture (its own codex home, no MCP,
@@ -262,8 +267,10 @@ face detector and recognizer you are licensed to use.
262
  1. Register the server. Copy [`examples/claude_mcp.json`](examples/claude_mcp.json) to `.mcp.json` in your project,
263
  or run:
264
  ```bash
265
- claude mcp add viggle-remake -e REMAKE_HOME=$HOME/.viggle-remake -e OPENAI_API_KEY=$OPENAI_API_KEY -- viggle-remake-mcp
266
  ```
 
 
267
  2. Give the agent the rules: put `@AGENTS.md` in the project's `CLAUDE.md`, or copy the file in.
268
  3. Raise the tool timeout. `wait` blocks for up to 30 minutes and `paint` can take a few, so start Claude Code with
269
  `MCP_TOOL_TIMEOUT=4200000` (milliseconds).
 
14
 
15
  **What you need:**
16
  - **an agent**: Claude Code, codex, or any MCP client;
17
+ - **a painter** for the keyframes: `codex` logged in with a ChatGPT subscription (`REMAKE_PAINT=pool`: no API key,
18
+ no API spend; the Claude Code and codex setups below use it), or an OpenAI-compatible images API
19
+ (`OPENAI_API_KEY`, billed per image; see [Cost](#cost));
20
  - **render workers**: `viggle-remake-worker` on a card with 96 GB or more, or the
21
  [ComfyUI worker](#one-32-gb-card-the-comfyui-worker) on one 32 GB card such as an RTX 5090 (Linux, about 60 GB of
22
+ RAM). The server itself needs no GPU, but a worker uses nearly all of its card's memory, so a local model as the
23
+ agent needs another GPU or another machine. Cards below 32 GB are not tested with the agent; use ComfyUI by hand
24
  ([`COMFYUI.md`](../COMFYUI.md#smaller-gpus-int8-and-gguf)).
25
 
26
  ## How it fits together
 
39
  share a directory, so they can run on different machines over a shared filesystem.
40
  - **Keyframes** are painted by an image model, in one of three backends (`REMAKE_PAINT`):
41
  - unset: an OpenAI-compatible images API (`gpt-image-2` by default). The only backend with API spend.
42
+ `OPENAI_BASE_URL` points it at another server that implements `images.edit` with several input images and
43
+ returns `b64_json`, such as one you host (not tested with local models). A server that reports no usage is counted
44
+ at $0.15 a picture against `REMAKE_MAX_USD`.
45
  - `codex`, *codex image mode*: the agent must be codex. An image tool's first call returns a CODEX IMAGE STEP, codex
46
  paints with its own `image_gen` tool, and the second call of the same tool imports the picture.
47
  - `pool`, *pool image mode*: the server starts a helper `codex exec` per picture (its own codex home, no MCP,
 
267
  1. Register the server. Copy [`examples/claude_mcp.json`](examples/claude_mcp.json) to `.mcp.json` in your project,
268
  or run:
269
  ```bash
270
+ claude mcp add viggle-remake -e REMAKE_HOME=$HOME/.viggle-remake -e REMAKE_PAINT=pool -- viggle-remake-mcp
271
  ```
272
+ Both paint in pool image mode: `codex` on `PATH`, logged in with a ChatGPT subscription, and no API key. To paint
273
+ through an images API instead, drop `REMAKE_PAINT` and pass `-e OPENAI_API_KEY=$OPENAI_API_KEY`.
274
  2. Give the agent the rules: put `@AGENTS.md` in the project's `CLAUDE.md`, or copy the file in.
275
  3. Raise the tool timeout. `wait` blocks for up to 30 minutes and `paint` can take a few, so start Claude Code with
276
  `MCP_TOOL_TIMEOUT=4200000` (milliseconds).
mcp/examples/claude_mcp.json CHANGED
@@ -3,7 +3,7 @@
3
  "viggle-remake": {
4
  "command": "viggle-remake-mcp",
5
  "args": [],
6
- "env": {"REMAKE_HOME": "${REMAKE_HOME:-~/.viggle-remake}"}
7
  }
8
  }
9
  }
 
3
  "viggle-remake": {
4
  "command": "viggle-remake-mcp",
5
  "args": [],
6
+ "env": {"REMAKE_HOME": "${REMAKE_HOME:-~/.viggle-remake}", "REMAKE_PAINT": "pool"}
7
  }
8
  }
9
  }