原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

cascade-img

作者:laffeyp版本 0.1.1i★ –i在你的电脑上运行
注册名称io.github.laffeyp/cascade-img

安装

概览

作者提供的说明(英文原文)

LLM-operable Midjourney pipeline: 21 MCP tools to compose, generate, curate with vision, and log.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 设计、图片与音频
  • 你需要填写:DISCORD_USER_TOKEN, MJ_CHANNEL_ID, MJ_IMAGINE_VERSION

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: DISCORD_USER_TOKEN, MJ_CHANNEL_ID, MJ_IMAGINE_VERSION, CASCADE_BRIDGE_URL

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "cascade-img": {
      "command": "uvx",
      "args": [
        "cascade-img"
      ],
      "env": {
        "DISCORD_USER_TOKEN": "your-value",
        "MJ_CHANNEL_ID": "your-value",
        "MJ_IMAGINE_VERSION": "your-value",
        "CASCADE_BRIDGE_URL": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add cascade-img --env DISCORD_USER_TOKEN=your-value --env MJ_CHANNEL_ID=your-value --env MJ_IMAGINE_VERSION=your-value --env CASCADE_BRIDGE_URL=your-value -- uvx cascade-img

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "cascade-img": {
      "command": "uvx",
      "args": [
        "cascade-img"
      ],
      "env": {
        "DISCORD_USER_TOKEN": "your-value",
        "MJ_CHANNEL_ID": "your-value",
        "MJ_IMAGINE_VERSION": "your-value",
        "CASCADE_BRIDGE_URL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "cascade-img": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "cascade-img"
      ],
      "env": {
        "DISCORD_USER_TOKEN": "your-value",
        "MJ_CHANNEL_ID": "your-value",
        "MJ_IMAGINE_VERSION": "your-value",
        "CASCADE_BRIDGE_URL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • DISCORD_USER_TOKEN 机密 必填 env
    Discord user-account token the bridge daemon uses to talk to Midjourney (captured from the Discord desktop app; see RUNBOOK.md).
  • MJ_CHANNEL_ID 必填 env
    Discord channel ID where the Midjourney bot runs.
  • MJ_IMAGINE_VERSION 必填 env
    Version token for Midjourney's /imagine slash command, captured from Discord.
  • CASCADE_BRIDGE_URL env
    URL of the running cascade-mj-bridge daemon that cascade-mcp forwards to.

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 laffeyp 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“设计、图片与音频”中的其他服务器比较i

  • 星标数多于此分类中其他 2751 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 2751 个服务器的 17% 更新
  • 基础检查结果等于或优于此分类中其他 2751 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

cascade-img 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:DISCORD_USER_TOKEN, MJ_CHANNEL_ID, MJ_IMAGINE_VERSION

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.1.1)于4个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:Figma Context MCP, Claude Real Video, Figma MCP Server

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Figma Context MCP

作者:GLips

Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.

在你的电脑上运行★ 16,165MIT5个月前更新
安装

Claude Real Video

作者:HUANGCHIHHUNGLeo

Let any LLM watch a video locally — and search everything it has ever watched.

在你的电脑上运行★ 2,284MIT2个月前更新
安装

Figma MCP Server

作者:figma

The Figma MCP server brings Figma design context directly into your AI workflow.

在云端运行★ 2,15213个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

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.

You: "I need a flat-design mountain icon, centered, simple shapes, transparent background"

Agent: reads prompt log → composes prompt from parts → fires imagine → waits → inspects 2x2 grid with vision → picks best quadrant → crops it → removes background → saves → 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.

Not a programmer? Open an AI assistant that can run commands (Claude Code, Cursor, or Cline), point it at this repo, and say: *"Read RUNBOOK.md and set up cascade-img on this machine, then let me make images by describing them to you."* It does the technical parts. You just need a Midjourney subscription and to copy a few values from Discord.


Quick Start

You need: a paid Midjourney subscription, a Discord account with the MJ bot in a channel, and Python 3.12 or newer.

pip install cascade-img

Or from source:

git clone https://github.com/laffeyp/cascade-img

cd cascade-img/packages/python pip install -e .

This puts three commands for operating cascade-img on your PATH: cascade-mj-bridge (the daemon), cascade-mcp (the MCP server), and cascade-mj (the CLI). Installing also adds a fourth command, cascade-trace-check — a diagnostics validator (not part of the generation loop) that replays a recorded event log and checks it against the vocabulary's declared event ordering and timing rules.

Configure — you need four values from the Discord desktop app (channel ID, server ID, imagine version, and your user token). Takes about five minutes. RUNBOOK.md walks through each one step by step.

cp "$(python -c 'import cascade_img, pathlib; print(pathlib.Path(cascade_img.__path__[0]) / ".env.example")')" .env

Fill in the four values per RUNBOOK.md, then validate:

cascade-mj-bridge --check-env --pretty

Start the daemon in one terminal, then connect from another:

cascade-mj-bridge          # leave running — holds the Discord connection

Connect your AI assistant — add to your MCP config (Claude Desktop, Cursor, Cline):

{

"mcpServers": { "cascade-img": { "command": "cascade-mcp" } } }

Or point your assistant at this repo and ask it to read AGENTS.md — it'll wire everything up.

Or use the CLI:

echo '{

"mountain-icon": { "subject": "a flat-design icon of a mountain, centered, simple shapes", "aspect_ratio": "1:1" } }' > assets.json

cascade-mj mountain-icon --registry assets.json --upscale all --pretty


The 23 Tools

CategoryToolsWhat they do
Onboardingcascade_guideReturns the full operating manual in one call — the loop, every tool, the failure→action table. Call it first; the generation and curation tools are gated until it's read.
Generationimagine, generate_video, wait, status, bridge_health, mj_actionCompose and fire prompts, poll for results, check daemon health, trigger Midjourney actions (upscale, vary, pan)
Catch-upchannel_recent, adopt_messageSee what the human did by hand in Discord and claim those results into the pipeline — adopted messages become normal jobs that curation and mj_action work on
Compositioncompose_prompt, compose_videoBuild prompts from structured parts — subject, moodboard, style refs, aspect ratio, negatives — not freeform text
Curationcrop_grid, alpha_key, auto_trim, palette_quantize, contact_sheet, sprite_sheet, score_grid, video_filmstrip, loop_seam_delta, promoteExtract quadrants from grids, remove backgrounds, trim whitespace, build sprite sheets, score results with vision, promote winners to final output
Working memorylog_append, read_prompt_logAppend-only prompt log the agent reads before every run — what was tried, what worked, what didn't. Persists across sessions.

Every call returns {ok, result} or {ok: false, error: {code, remediation}}. Branch on the stable code, not the message. Full tool reference in AGENTS.md.


How This Differs

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 — prompts built from parts (subject, style, identity, constraints), not raw strings
  • Working memory — append-only log persists across sessions; each run reads what came before
  • Curation pipeline — crop grids, remove backgrounds, build sprite sheets, promote winners
  • MCP-native — 23 tools that plug into Claude, Cursor, Codex, or anything that speaks MCP
  • Pluggable backends — Midjourney now, Flux/DALL-E/Imagen on the roadmap

How It Works

One daemon, two stateless clients, all over local HTTP:

  • `cascade-mj-bridge` — the daemon. Only process that talks to Discord. Holds the live connection and tracks in-flight jobs. Must stay running.
  • `cascade-mcp` — the MCP server. Stdio by default (Claude Desktop / Cursor / Cline); --http for HTTP. Stateless — start and stop freely.
  • `cascade-mj` — the CLI. Takes an asset ID and a registry, composes the prompt, fires, waits, writes to the log.

Prompts are composed from structured parts, not written as raw strings:

from cascade_img.prompt.composer import PromptComposer, Subject, StyleStack, IdentityStack

prompt = PromptComposer().compose( Subject( text="a flat-design icon of a mountain", constraints=["centered", "simple shapes", "transparent background"], ),

Both optional. moodboard is a Midjourney personalization code;

sref/oref are reference-image URLs you'd set up in MJ first.

style=StyleStack(moodboard="abc123def", sref="https://cdn.example.com/style.png"), identity=IdentityStack(oref="https://cdn.example.com/ref.png", ow=1000), aspect_ratio="1:1", version="7", )

All three entry points emit structured JSON and follow the same {ok, result | error: {code, remediation}} envelope. Every failure carries a stable error code (e.g. DISCORD_401, MJ_UUID_MISSING, UPSCALE_BUTTON_FAILED) with a machine-readable remediation — so a caller branches on the code, not the message. The full catalog of log events and error codes is in vocabulary/0.1.json, and a trace checker (cascade-trace-check) enforces event ordering over recorded runs.

Midjourney terminology

prompt — the text + flags you send Midjourney. grid — the 2x2 set of four candidates returned per prompt. quadrant / U1-U4 — the four cells; "U2" means upscale the second. upscale — render one cell at full resolution. aspect ratio (`--ar`) — output shape. sref — an image whose *style* to borrow. oref — an image whose *subject identity* to keep across poses. moodboard (`--p`) — a saved personalization profile. stylize (`--s`) — how strongly MJ applies its own aesthetic.


Documentation

DocWhat it covers
AGENTS.mdThe LLM operator's guide. Read this when handing cascade-img to an agent.
RUNBOOK.mdInstall, env capture, setup, reconnect lifecycle, every failure mode with error codes and fixes.
CAPABILITIES.mdEvery Midjourney feature cascade-img drives — prompt parameters, mj_actions, the V8.1/V7 split.
ARCHITECTURE.mdInternal architecture and design decisions.
examples/Three walkthroughs: single image, batch, video. Read AGENTS.md first.
CHANGELOG.mdRelease history.

Roadmap

VersionWhat's in it
v0.1 (current)MJ backend (V8.1 + V7), prompt composer, curation tools, MCP server, CLI, prompt log
v0.2Channel catch-up + message adoption — landed on main: channel_recent and adopt_message let the agent see what the human did by hand in Discord and act on it (design); still to come: more MJ commands (/describe, /blend, Vary Region inpaint, /tune), retro-U-press on adopted grids, internal refactoring
v0.3TypeScript wrapper; first API backends — Flux via Fal + Flux Kontext, Ideogram
v0.4Google Imagen, Recraft (native vector/SVG)
v0.5OpenAI gpt-image, Stable Diffusion
v1.0API stable, three+ backends in production

Every backend implements one interface, so a later release can chain them — generate on one provider, refine on a second (e.g. Flux Kontext), upscale on a third.


Repository Layout

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, ...


Disclaimer

This tool automates Midjourney through a Discord user account. A paid Midjourney subscription is required. Both Discord and Midjourney's Terms of Service prohibit user-account automation. This is the same mechanism used by every open-source MJ tool (midjourney-proxy, midjourney-api, etc.) — there is no public Midjourney API. Use at your own risk.

The backend interface is pluggable — Flux, DALL-E, and Imagen are on the roadmap.

License

Apache-2.0. See LICENSE.

问 PopNx