midjourney-mcp-cli
AGENTS.md10 starsChanged 41 days agoMITView on GitHub
Read SKILL.md for how to use the server. This file is about changing it. src/tools/index.ts exports one ALL_TOOLS array. tools/kit.ts turns each spec into a Slipway tool, and Slipway serves it as an MCP tool and as a shell command from src/app.ts. Add a tool to that array and it exists on both surfaces, with flags, help, validation and the write guard already applied. A tool that spends GPU time is risk: "spend", which Slipway confirms, and which MIDJOURNEY_ALLOW_DESTRUCTIVE=0 refuses.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- midjourneySkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
Read SKILL.md for how to *use* the server.
- Very specific: line 14
Never add a shell command by hand.
- Very specific: line 34
When you need an endpoint that does not exist here yet, do not guess it.
- Very specific: line 45
Every environment variable the code reads goes in ENV_VARS in config.ts, in --help, and in the README.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working on this repo
Read SKILL.md for how to use the server. This file is about changing it.
The one rule that shapes everything
src/tools/index.ts exports one ALL_TOOLS array. tools/kit.ts turns each
spec into a Slipway tool, and Slipway
serves it as an MCP tool and as a shell command from src/app.ts. Add a tool to
that array and it exists on both surfaces, with flags, help, validation and the
write guard already applied. A tool that spends GPU time is risk: "spend",
which Slipway confirms, and which MIDJOURNEY_ALLOW_DESTRUCTIVE=0 refuses.
Never add a shell command by hand. If a tool needs a nicer shell spelling, that
is a FLAG_ALIASES entry in src/vocabulary.ts, not a second code path; a word
people type when looking for it is a SYNONYMS entry there.
Where the risk lives
Everything reaches Midjourney through CdpBrowser.apiFetch, which runs fetch()
inside a real logged-in page. There is no credential in this process and there
must never be one. If a change introduces cookie handling, token storage or TLS
impersonation, it is the wrong change: the browser is the credential.
src/api/client.ts is the only place that talks to the transport. Pacing,
retries and error classification live there so an upstream change is one file.
Shapes are not contracts
Midjourney publishes nothing. format/jobs.ts reads what it recognises, keeps
the untouched record alongside, and never throws because a field moved. Keep
that discipline in anything new: prefer returning a partial answer over failing.
When you need an endpoint that does not exist here yet, do not guess it. Run
midjourney-cli capture --seconds 60 --out capture.json, use the site, and read
the real request out of the file.
Before shipping
npm run typecheck && npm test && npm run buildTests use a faked transport and never touch the network. tests/cli.test.ts
holds the seam between the two surfaces; if it fails, they have drifted.
Every environment variable the code reads goes in ENV_VARS in config.ts, in
--help, and in the README. A test checks all three agree.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

