Image generation in Cline: MCP server setup
Open the MCP Servers panel, add the endpoint through the Remote Servers tab or the config JSON with "type": "streamableHttp", and eleven image tools join the plans Cline executes. Cline breaks a request into steps and runs them. Without image tools, every step that needs artwork becomes a note in the summary. With them, it becomes a step like any other.
Add the server
In the Cline panel, click the MCP Servers icon in the top toolbar, open the Configure tab, and click Configure MCP Servers near the bottom. That opens the settings JSON the extension uses.
You do not need the marketplace
Cline’s MCP Marketplace is a convenience for popular servers, not a requirement. For a hosted endpoint you can skip JSON entirely: open the Remote Servers tab, enter a name and the URL, choose Streamable HTTP, and click Add Server.
Using the Cline CLI instead? It reads ~/.cline/mcp.json, and cline mcp opens a wizard that can list, add, edit, enable, disable and delete servers without you touching the file.
{
"mcpServers": {
"imagemcp": {
"type": "streamableHttp",
"url": "https://mcp.imagemcpserver.com/mcp",
"headers": { "x-api-key": "sk-img-gen-…" },
"disabled": false,
"autoApprove": [
"get_user_info", "list_models",
"compress_image", "convert_format"
]
}
}
}{
"mcpServers": {
"imagemcp": {
"command": "npx",
"args": ["-y", "mcp-remote",
"https://mcp.imagemcpserver.com/mcp",
"--header", "x-api-key:sk-img-gen-…"],
"disabled": false,
"autoApprove": []
}
}
}The transport field people miss
This is the single most likely reason a correct-looking Cline config does not work, and it is invisible because the entry looks complete without it.
Omitting type
Cline falls back to the legacy sse transport for backward compatibility. A streamable HTTP server configured without the field is being talked to in the wrong dialect.
Setting it explicitly
"type": "streamableHttp" is what this server speaks and what Cline recommends. Only use "sse" for genuinely legacy servers.
If a server connects but calls hang rather than fail, that is usually a different problem — raise the request timeout in MCP settings, where you can also restart an unresponsive server without deleting it. Checked September 2026.
Auto-approve by cost, not by convenience
autoApprove is a per-tool array, not a per-server switch — which means the useful line to draw is not between “image tools” and “other tools”, but between calls with a fixed price and calls that route to a model. The config above auto-approves the first two rows.
get_user_infolist_modelsfree
Safe to auto-approve. These are how the agent finds out what it can afford before it spends anything.
compress_imageconvert_format1 credit
Deterministic and cheap. Auto-approving these makes optimisation passes painless.
remove_backgroundtext_to_svgupscale_image5–15 credits
Fixed prices, no model routing. Auto-approve once you trust the workflow.
generate_imageedit_imagegenerate_transparent_imagemulticallmodel-priced
These are the ones that can run up a bill in a loop. Keep approval on.
Give it a budget in words
Cline follows written constraints well. This is the block worth keeping in your custom instructions.
Image work uses the imagemcp MCP server. 1. Call get_user_info before any batch of image work and report the balance. 2. If the plan needs more than 100 credits, stop and ask me first. 3. Draft on a fast model. Only re-run on a premium model once I approve the draft. 4. Compress everything to WebP before writing it into the repository. 5. Never call upscale_image on an image that still has a background — cut it out first.
Cline questions
How do I add an MCP server to Cline?
In the Cline panel, click the MCP Servers icon in the top toolbar, open the Configure tab, and click Configure MCP Servers near the bottom — that opens the settings JSON. For a hosted endpoint you can skip the JSON entirely and use the Remote Servers tab instead: enter a name, the URL, pick Streamable HTTP, and click Add Server.
Can I add an MCP server that is not on the marketplace?
Yes, and you do not need the marketplace at all. The marketplace is a convenience for popular servers; anything with a URL goes in through the Remote Servers tab or straight into the config JSON. This server is added that way.
Why does my remote server fail to connect?
Most often the transport. Omitting the type field makes Cline fall back to legacy SSE for backward compatibility, so a streamable HTTP server configured without it will not work properly. Set "type": "streamableHttp" explicitly. Checked September 2026.
Where is the Cline MCP config file?
It depends which Cline you mean. The IDE extension keeps a settings JSON that the Configure MCP Servers button opens for you — editing it by hand is equivalent. The Cline CLI reads ~/.cline/mcp.json instead, and has a cline mcp wizard for listing, adding, editing and disabling servers.
Cline runs autonomously — how do I stop it burning credits?
Three things. Put the free account tools in autoApprove so it can check the balance without prompting, keep approval on for anything model-priced, and write a budget into your custom instructions. Every call is recorded in the request log with its exact cost.
Can Cline chain image tools without me approving each step?
That is what the autoApprove array is for, and it is per tool rather than per server. A sensible middle ground is auto-approving the cheap deterministic tools and keeping approval on for the ones that call a model.
Does it work with the local server instead of the hosted one?
Yes. Point Cline at a local node process with IMAGEMCP_API_KEY in its env instead of the remote endpoint. The tools are identical; only the transport changes.
What happens if a call fails mid-plan?
The tool returns a structured error rather than throwing, so Cline can read the message and adapt — most commonly by retrying with a different model or stopping to tell you the credit balance ran out. If calls are timing out rather than erroring, raise the request timeout in MCP settings.
Sources & references