cascade-img
An MCP server for LLM-operable Midjourney image generation. 23 tools: compose prompts, generate, self-inspect with vision, curate, log. Agent-first.
How it works
DAEMON · MCP · CLIcascade-mj-bridge is the daemon. The only process that talks to Discord. Holds the live connection and tracks in-flight jobs. Must stay running.
cascade-mcp is the MCP server. Stdio by default for Claude Desktop / Cursor / Cline; --http <port> for HTTP. Stateless — start and stop freely.
cascade-mj is the CLI. Takes an asset ID and a registry, composes the prompt, fires, waits, writes to the log.
Generate Midjourney images by conversation instead of by hand. You describe what you want; your AI assistant composes the prompt, fires it, inspects the grid with vision, crops the best quadrant, cleans it up, and logs what worked.
cascade-img is an MCP server with 23 tools that plugs into Claude, Cursor, Codex, or anything that speaks MCP. Midjourney is the first backend; Flux, DALL-E, and Imagen are on the roadmap. There's also a CLI.
cascade-img/ ├── packages/python/ # the Python package (cascade_img) │ ├── src/cascade_img/ # prompt/, interfaces/, backends/, curation/, vocabulary/ │ ├── tests/ # behavior tests │ └── tools/ # live smoke walk ├── examples/ # three walkthroughs of the operating loop ├── vocabulary/0.1.json # event log-line catalog └── *.md # README, ARCHITECTURE, RUNBOOK, AGENTS, CAPABILITIES, ...
Other open-source Midjourney tools focus on the generation step — fire the prompt, hand back the image. cascade-img does the work around that: vision-based self-curation (the agent inspects its own output and picks the best quadrant), structured prompt composition (built from parts — subject, style, identity, constraints — not raw strings), an append-only working-memory log that persists across sessions, a curation pipeline (crop grids, remove backgrounds, build sprite sheets, promote winners), MCP-native tools that plug into anything that speaks MCP, and pluggable backends (Midjourney now, Flux / DALL-E / Imagen on the roadmap).
Onboarding: cascade_guide returns the full operating manual in one call — the loop, every tool, the failure→action table. Generation: imagine, generate_video, wait, status, bridge_health, mj_action compose and fire prompts, poll for results, check daemon health, trigger Midjourney actions (upscale, vary, pan). Catch-up: channel_recent, adopt_message see what the human did by hand in Discord and claim those results into the pipeline. Composition: compose_prompt, compose_video build prompts from structured parts — subject, moodboard, style refs, aspect ratio, negatives — not freeform text. Curation: crop_grid, alpha_key, auto_trim, palette_quantize, contact_sheet, sprite_sheet, score_grid, video_filmstrip, loop_seam_delta, promote extract quadrants, remove backgrounds, trim whitespace, build sprite sheets, score results with vision, promote winners. Working memory: log_append, read_prompt_log — append-only prompt log the agent reads before every run; persists across sessions.
Every call returns {ok, result} or {ok: false, error: {code, remediation}}. Branch on the stable code, not the message.
