Image generation in Claude Desktop: MCP server setup
Open Settings → Developer → Edit Config, add one mcpServers entry to claude_desktop_config.json, then quit and reopen Claude. Eleven image tools appear in the conversation. Claude is very good at deciding what an image should look like and completely unable to produce one. One server entry closes that gap: generate, edit, cut out, upscale and vectorise, with a URL handed back in the same message.
You
Make a hero image for a page about slow coffee. Wide, warm, no text in the picture.
Claude
→ generate_image({ aspectRatio: "21:9" })
Here it is — hosted at a URL you can drop straight into your markup. Want it cut out, or upscaled for print?
Four steps, once
- 1
Create an API key
Sign in and open the dashboard. Keys start with
sk-img-gen-and are shown once — copy it before you close the dialog. - 2
Open the config file
The quickest route is Settings → Developer → Edit Config, which opens the file for you. The per-platform paths are in the next section if you would rather open it directly.
- 3
Paste the server entry
Use the JSON on the right. If you already have an
mcpServersblock, addimagemcpalongside what is there. - 4
Quit and reopen Claude
A full quit, not just closing the window. On reopening, the image tools appear in the tool list.
{
"mcpServers": {
"imagemcp": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.imagemcpserver.com/mcp",
"--header",
"x-api-key:sk-img-gen-your_key_here"
]
}
}
}Config paths by platform
If the file does not exist yet, create it — the JSON above is a complete file on its own.
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Config file or connector?
Claude Desktop can also add remote MCP servers as custom connectors, which is a nicer flow — paste a URL in Customize → Connectors and you are done. It is a fair question why this page does not use it, and the answer is authentication.
Custom connector
Takes a server URL and, optionally, OAuth client credentials. There is no field for a custom header — so a server authenticated with x-api-key, like this one, has nowhere to put its key.
Config file + mcp-remote
The bridge passes an arbitrary header through, which is exactly what is needed here. Slightly more setup, and it works today with no account tier requirements.
One difference worth knowing either way
Custom connectors are brokered through your Claude account: the connection to the MCP server originates from Anthropic’s infrastructure, not from your machine. A server configured in claude_desktop_config.json uses your own network instead. That distinction matters if you ever point a client at something behind a VPN or a corporate firewall. Checked September 2026.
Check it worked
Ask Claude a question that forces a tool call rather than a guess:
“How many image credits do I have left?”
Claude should call get_user_info and answer with a real number. That call is free, so it costs nothing to test the connection. If it answers from memory or says it cannot, the server is not loaded.
If it is not loading
The JSON is invalid
A trailing comma or a missing brace makes Claude skip the whole file silently — every server disappears, not just the one you edited. Paste it into any JSON validator.
Claude was not fully quit
On macOS, closing the window leaves the app running. Use Quit, then reopen.
Node is missing
The config runs npx. Check with node --version in a terminal.
The key is wrong or revoked
Test it directly: curl the /v1/me endpoint with the key and see whether you get an account back.
Things worth asking once it is connected
“Generate three logo concepts for a bakery as SVG, then show me the code for each.”
text_to_svg × 3
“Take this photo, remove the background, and upscale it 4x for print.”
remove_background → upscale_image
“Make a 9:16 version of this hero image by extending the scene vertically.”
edit_image
“Generate six product shots in the same style — use this one as the reference.”
multicall + referenceImages
“Compress every image in this folder to WebP at quality 75.”
multicall + compress_image
“Which models can I use, and what does each one cost?”
list_models
Claude Desktop setup questions
How do I add an MCP server to Claude Desktop?
Open Settings, go to the Developer section and click Edit Config — that opens claude_desktop_config.json directly, which is easier than hunting for the file. Add an mcpServers entry, save, then quit Claude completely and reopen it. The tools appear in the conversation once the server loads.
Where does the Claude Desktop config file live?
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. Windows: %APPDATA%\Claude\claude_desktop_config.json. Linux builds use ~/.config/Claude/claude_desktop_config.json. If the file does not exist yet, create it — the JSON on this page is a complete file on its own.
Can I add this as a custom connector instead?
Not currently. Claude's custom connector flow takes a server URL and, optionally, OAuth client credentials — there is no field for a custom header, and this server authenticates with an x-api-key header. So the config file is the route. Checked September 2026.
Do I need to install anything first?
Node.js, because the config uses npx to run the mcp-remote bridge. Nothing else — there is no package to install globally and no local server to keep running.
Claude does not see the tools. What went wrong?
Three usual causes: the config file has a trailing comma or other JSON error, Claude was not fully quit and reopened (closing the window is not enough on macOS), or the API key in the header is wrong. Check the developer settings for the server’s status, then ask Claude to list its tools.
Is my API key safe in that file?
It sits in a local config file on your own machine, in plain text, the same way every MCP server credential does. Treat it like an SSH config: do not commit it, and rotate the key from the dashboard if it leaks. Keys can be revoked individually.
Does this cost anything to try?
No. A free account comes with 30 credits a month, which is enough for a handful of generations, a few background removals or thirty compressions.
Sources & references