Midjourney MCP Server & CLI

A free, open source Midjourney MCP server and CLI that lets Claude Code, Codex, Cursor and other AI agents generate images, follow jobs and download the real files.

Navid Moazzezby Navid Moazzez·Updated 30 de set. de 2026·10 min read
~/midjourney-mcp-cli
$ claude
Claude Code v2.1.220
>
Rate this tool

This free Midjourney MCP server and CLI gives your AI real access to your Midjourney account. It generates images, follows jobs until they finish, downloads the real files and builds moodboards that make a style reusable.

It's one install with 2 ways in. Claude, Codex, Cursor or any other MCP app calls its 32 tools for you, and the same tools work as a CLI that agents like Claude Code, Codex and OpenCode run, or that you type yourself.

Here's what the Midjourney MCP server and CLI is, how to set it up in each app, and every tool it has.

What is the Midjourney MCP server & CLI?

The Midjourney MCP server & CLI is a free, open source program that lets AI agents make and manage images in your Midjourney account for you, in 2 ways. The MCP server is what an AI app like Claude, Codex or Cursor connects to, through MCP (Model Context Protocol), the open standard AI apps use to call outside tools.

You ask in plain language. Your AI picks the right tool, and the server makes the call to Midjourney, through a real browser session.

The CLI is the same program as commands. midjourney-cli get-queue runs the same code your AI runs when you ask what's rendering, whether an agent like Claude Code runs it or you do.

What can you ask it?

Once it's set up, you ask the way you'd ask an assistant. These are real prompts it handles:

Try asking
Make me a 16:9 hero image of a red fox asleep in snow, muted palette.
Shoot that campaign in the style of my High Fashion moodboard.
Generate 4 logo concepts at low stylize so they stay literal, and save them.
Upscale that one and turn it into a video.
What is in my Midjourney queue right now?
Download everything I generated today into ./renders.

The last one shows why this is useful. Your AI waits for the render and writes the real image files to disk, so the next step in your work has something to open.

How to install the Midjourney MCP server

Pick your app in the box at the top of this page. You sign in once in a browser window, then add the server to your app with a single command or a pasted block.

Before you start0/3
⚠️

Watch out: This is unofficial, and Midjourney's terms don't permit automated access. Any unofficial tool puts the account at some risk, so read the risks section below before you connect yours.

Sign in to Midjourney

There's no API key. Midjourney doesn't issue one, and this server never handles a password or a token.

It runs Chrome with a profile of its own, at ~/.midjourney-mcp/chrome-profile. You sign in there once, and the session stays, like any browser you use by hand.

npx -y @thenavidm/midjourney-mcp-cli login

A Chrome window opens on midjourney.com. Sign in, and the command notices and finishes.

That profile is separate from your everyday Chrome, so nothing here sees your browsing, your other logins or your history. To disconnect, sign out in that window or delete the profile folder.

Check that it works

Run the doctor. It checks Chrome, the profile, the sign-in and your plan in order, so the first failure is the one to fix.

npx -y @thenavidm/midjourney-mcp-cli doctor

When it passes, restart your app and ask what's in your queue.

Use the Midjourney CLI

The CLI is the same 32 tools as commands. AI agents that run commands, like Claude Code, Codex and OpenCode, use it on their own, and you can type the same commands in a terminal or a script.

Every tool name becomes a command with dashes, so get_queue runs as midjourney-cli get-queue.

npm install -g @thenavidm/midjourney-mcp-cli
midjourney-cli
midjourney-cli get-queue
midjourney-cli list-jobs

The bare midjourney-cli lists every command, and midjourney-cli <command> --help shows what a command takes. Anything that spends GPU time needs --confirm, the terminal's version of the check your AI has to pass.

These flags work on every command:

FlagWhat it does
--jsonPrints JSON
--compactPrints the JSON on one line
--select a,b.cKeeps only those fields, and a dotted path goes deeper
--agentPrints compact JSON, and never counts as a confirm
--confirmLets a tool that spends go ahead

A script can branch on the exit code:

Exit codeWhat it means
0It worked
2The command was typed wrong, or a tool that spends needed --confirm
3The job, folder or image wasn't found
4You're signed out, or a Cloudflare check is waiting in the browser window
5Midjourney or the browser failed
7You hit a rate limit or ran out of fast hours, so wait and try again

MCP server or CLI: which one?

Both are the same program with the same 32 tools. The difference is when your AI pays for them, in the tokens it reads.

Every message, in an app that loads every tool
MCP server
15,200 tokens
CLI
Nothing
Every message, in Claude Code
MCP server
1,000 tokens
CLI
Nothing
When Midjourney comes up
MCP server
Nothing more, or in Claude Code the tools it picks
CLI
3,700 tokens, once
20 messages with Midjourney in 1, every tool loaded
MCP server
305,000 tokens
CLI
3,700 tokens
Works in Claude Desktop's chat
MCP server
Yes
CLI
No, there's no terminal there
Works in a script, a cron job or CI
MCP server
No
CLI
Yes

An app that loads every tool up front sends the full list with every message, whether you mention Midjourney or not. Claude Code doesn't by default: its tool search sends only the tool names and the server's instructions, and loads a tool's full definition when your AI reaches for it.

The CLI costs nothing until Midjourney comes up. Then your agent reads its skill file once and runs the commands it needs. With the skill added, Claude Code also lists its one-line description with every message, about 90 tokens.

When the whole conversation is about Midjourney, the gap closes. Then the MCP server is the better experience, because you ask in plain language and your AI never has to look up a command.

How to spend less

In Claude Code, leave tool search on, which it is unless you've set ENABLE_TOOL_SEARCH=false.

Turn the server off when you aren't making images, with your AI app's own switch. MIDJOURNEY_READ_ONLY=1 cuts it to the 17 reading tools.

Or install the CLI and connect the server later, on the days it earns its place. Every tool stays in reach, and the standing cost drops to nothing.

Every number here was measured on September 27, 2026 in Claude Code 2.1.257 with Claude Opus 5. It's the same one-line prompt with and without the server connected, once with tool search off so every tool loads, and once with Claude Code's default. The skill was measured the same way, and other apps and models count tokens a little differently.

Risks to know first

It's unofficial, and Midjourney's terms don't permit automated access. The server moves at a person's pace and works through a real browser session, which is the honest limit of what any tool can do about that risk.

It spends money. A loop over 20 prompt ideas is 20 charges, and there are no refunds, so use MIDJOURNEY_READ_ONLY=1 for an agent working on its own.

The endpoints it uses are undocumented and can change without notice. The server reads what comes back carefully, but a big enough change on Midjourney's side will still break something.

Every Midjourney tool

All 32 tools, grouped the way the repo groups them. 17 only read, and 15 change something or spend GPU time.

Making images

imagine
What it does
Generate images from a prompt, wait for the job to finish, and return the results with direct image URLs.
Kind
Asks first
submit_imagine
What it does
Submit a generation and return immediately with the job id, without waiting for the images.
Kind
Asks first
rerun_job
What it does
Run an existing job again, which is what the reroll button in the web app does.
Kind
Asks first
vary_image
What it does
Take one image from a finished grid and generate four variations of it.
Kind
Asks first
upscale_image
What it does
Upscale one image from a finished grid to full resolution.
Kind
Asks first
animate_image
What it does
Animate one image from a finished grid into a short video.
Kind
Asks first
pan_image
What it does
Extend one image in a direction, inventing what lies beyond the current frame.
Kind
Asks first
zoom_out
What it does
Pull the camera back, filling the new space around the existing image.
Kind
Asks first
remix_image
What it does
Keep an image's composition and re-render it against different wording.
Kind
Asks first
submit_raw_job
What it does
Send an arbitrary job type to Midjourney's submit endpoint.
Kind
Asks first

Jobs

list_jobs
What it does
List the account's recent Midjourney jobs, newest first, with their status and the URLs of any finished images.
Kind
Reads
get_job
What it does
Look up a single job by id and return its status and image URLs.
Kind
Reads
wait_for_job
What it does
Block until a job reaches a finished, failed or moderated state, then return it with its image URLs.
Kind
Reads
get_queue
What it does
Show the account's current Midjourney queue: what is running, what is waiting, and how much concurrency the plan allows.
Kind
Reads
job_updates
What it does
Poll the feed the web app itself watches while work is in flight.
Kind
Reads

Downloads

download_job
What it does
Download the finished images from a job and write them to disk, returning the local paths and byte counts.
Kind
Writes
download_url
What it does
Download a single Midjourney asset by its direct URL.
Kind
Writes

Moodboards and folders

list_folders
What it does
List the folders in the account's Organise view, the ones used to sort generations in the web app.
Kind
Reads
list_moodboards
What it does
List the account's moodboards with how many reference images each holds.
Kind
Reads
get_moodboard
What it does
Look up a moodboard by name or id and return its reference images.
Kind
Reads
create_moodboard
What it does
Create a new, empty moodboard on the account.
Kind
Writes
add_to_moodboard
What it does
Add images to a moodboard, either from a job you generated or by direct URL.
Kind
Writes
remove_from_moodboard
What it does
Remove images from a moodboard by URL.
Kind
Asks first
get_storage
What it does
Show the storage metadata the web app exposes: how much space the account's generations occupy against what the plan allows.
Kind
Reads
api_get
What it does
Issue a GET against an arbitrary path on midjourney.com and return the JSON.
Kind
Reads

Explore

explore_feed
What it does
Browse Midjourney's public explore feed: what other people are making, with prompts and image URLs where the feed exposes them.
Kind
Reads
explore_style_likes
What it does
Fetch the style-like metadata the explore grid uses, which marks which styles the account has liked.
Kind
Reads

Profile

whoami
What it does
Report which Midjourney account the controlled browser is signed in as, and whether the browser is reachable at all.
Kind
Reads
list_personalized_profiles
What it does
List the account's personalisation profiles, with how many images each was trained on.
Kind
Reads
list_following
What it does
List the Midjourney creators this account follows.
Kind
Reads
list_model_ratings
What it does
List the image-rating tasks Midjourney is offering this account.
Kind
Reads
get_contest_ranking_count
What it does
Show how many contest ranking rounds this account has completed.
Kind
Reads

Is the Midjourney MCP server safe?

Every generation burns GPU time from your plan, and none are refunded. So 11 tools refuse to run until your AI passes confirm: true: everything that spends, plus removing from a moodboard. They're the ones marked Asks first in the tool tables above.

Adding to a moodboard, making one and downloading don't ask, because none of them spends or loses anything.

Make it read-only

Set MIDJOURNEY_READ_ONLY=1 and everything that isn't a read disappears from the tool list, leaving 17 tools. MIDJOURNEY_ALLOW_DESTRUCTIVE=0 is the middle setting: reads and downloads still work, and anything that spends doesn't.

Keep a log of every write

Set MIDJOURNEY_AUDIT_LOG to a file path. The server writes one line per attempted write, allowed or blocked.

⚠️

Watch out: Prompts and job details from the explore feed are text other people wrote, and one can try to give your AI orders. Treat them as data, and use MIDJOURNEY_READ_ONLY=1 for an agent working on its own.

Your data

Nothing leaves your computer except the requests to Midjourney you asked for. There's no tracking, no analytics and no server of ours in between.

The session lives in a Chrome profile on your own disk, and the server never reads a cookie, stores a token or sees a password. Downloads go to ~/Downloads/midjourney unless you choose another folder.

Midjourney MCP server settings

Every setting is optional, as an environment variable in your app's config or your shell. The defaults are what most people want.

MIDJOURNEY_CHROME_PROFILE
Default
~/.midjourney-mcp/chrome-profile
What it does
Sets the browser profile that holds the session
MIDJOURNEY_CHROME_PATH
Default
found for you
What it does
Points at the Chrome app
MIDJOURNEY_DEFAULT_SPEED
Default
fast
What it does
Picks fast, relax or turbo
MIDJOURNEY_DEFAULT_VERSION
Default
7
What it does
Picks the model version
MIDJOURNEY_DOWNLOAD_DIR
Default
~/Downloads/midjourney
What it does
Sets where downloads land
MIDJOURNEY_JOB_TIMEOUT_MS
Default
600000
What it does
Sets how long to wait for a job
MIDJOURNEY_READ_ONLY
Default
0
What it does
1 hides everything that isn't a read
MIDJOURNEY_ALLOW_DESTRUCTIVE
Default
1
What it does
0 blocks anything that spends
MIDJOURNEY_AUDIT_LOG
Default
none
What it does
Logs every attempted change to a file

Troubleshooting

Run the doctor first. It names the step that failed and the fix.

What you seeWhat to do
"Cloudflare served a challenge"Open the window and let the check finish once in that profile
"The browser profile is not signed in"You're signed out, or the session ran out. Run the login again
"No Chrome or Chromium found"Set MIDJOURNEY_CHROME_PATH to your Chrome
"DevTools never answered"Another Chrome is using that profile. Quit it, or set another profile folder
Refused for billing reasonsYou're out of fast hours, or the plan lapsed. Switch to relax speed
"had not finished after 600s"That's normal on relax speed. The job is still running, so raise the timeout
Downloads come back emptyThe file link ran out. Read the job again with get_job for fresh links

If the server doesn't show up in your app at all, run the command your app runs, in a terminal, and read the error.

More free tools for images

Turn a post into an image to share, or build a slide deck from your ideas.

Midjourney MCP Server FAQs

Here are the questions people ask most about the Midjourney MCP server and CLI.

The Midjourney MCP server & CLI is a free, open source program that lets an AI app like Claude, Codex or Cursor make and manage images in your Midjourney account.

It has 32 tools for generating images, variations, upscales, videos, jobs, downloads and moodboards, and the same tools run as a CLI that agents like Claude Code and Codex use, or that you type yourself.

An MCP server is a standard way to give an AI app real access to a tool, so it can act instead of guessing.

MCP stands for Model Context Protocol, and Claude, Codex, Cursor and many other AI apps speak it.

The Midjourney CLI is the same program as the Midjourney MCP server, run as commands.

AI agents like Claude Code, Codex and OpenCode run them for you, and you can type them in a terminal or a script.

Use the Midjourney MCP server in an AI app with no terminal, like Claude Desktop's chat, and the CLI in a terminal, a script or a cron job.

In an AI app that can run commands, like Claude Code, Codex or Cursor, the CLI is the lighter choice, because it costs nothing until it runs.

Yes, the Midjourney MCP server is free and open source under the MIT license.

You still need a paid Midjourney plan, and every generation spends its GPU time.

No, Midjourney doesn't issue an API key.

The Midjourney MCP server works through a real Chrome session you sign in to once, and it never handles your password.

No, Midjourney's terms don't permit automated access, and the Midjourney MCP server is unofficial.

It moves at a person's pace through a real browser, but any unofficial tool puts the account at some risk.

The Midjourney MCP server only spends GPU time once your AI passes a confirm check, and --agent never counts as one.

Read-only mode removes everything that spends.

The Midjourney MCP server saves downloads to ~/Downloads/midjourney unless you set MIDJOURNEY_DOWNLOAD_DIR.

It writes the real image files, not screenshots.

The Midjourney MCP server works with any app that speaks MCP.

That includes Claude Code, Claude Desktop, Codex, Cursor, VS Code, GitHub Copilot CLI, Gemini CLI, OpenCode, OpenClaw, Antigravity and Hermes.

Navid Moazzez built the Midjourney MCP server and maintains it.

The code is on GitHub under the MIT license, and the package is on npm.

Navid Moazzez

AI business strategist & AI OS builder

Navid Moazzez helps creators and founders master AI and build their own AI Operating System (AI OS) to automate their business and life.

Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Learn more.

More MCP servers & CLIs

Free AI newsletter

The most actionable AI newsletter for founders

Every week, get proven AI strategies, curated tools, and step-by-step systems to grow your audience, create better content, and build a profitable creator business.

No fluff, no filler, no BS. Just five minutes each week that might level up your online business and life.

P.S. Sign up now to get free access to my ultimate AI tools guide for creators.

Loved by 10,000+ readers