Image generation in Windsurf (Devin Desktop): MCP server setup
Add one entry to ~/.config/devin/mcp_config.json (or .devin/mcp_config.json in the repo) and Devin Desktop’s agent gains the Image MCP Server’s 8 image tools; the legacy Cascade agent reads ~/.codeium/windsurf/mcp_config.json instead. The agent already reads your codebase and edits across files. Add the server and it can also produce the artwork those files need — no tab switch, no download folder, no forgotten asset.
Devin Desktop (default agent): mcp_config.json
New tabs in Devin Desktop run Devin Local, which shares its harness with the Devin CLI and reads MCP servers from the Devin CLI config files. There are three, and they all take the same mcpServers block with a url and headers.
| Scope | File | Shared with the team? |
|---|---|---|
| User | ~/.config/devin/mcp_config.json | No — every project on this machine. %APPDATA%\devin\mcp_config.json on Windows. |
| Project | .devin/mcp_config.json | Yes — checked into version control, so keep the key out of it. |
| Local override | .devin/mcp_config.local.json | No — gitignored. Where a personal key goes in a team project. |
~/.config/devin/mcp_config.jsondefault agent{
"mcpServers": {
"imagemcp": {
"url": "https://mcp.imagemcpserver.com/mcp",
"headers": {
"x-api-key": "sk-img-gen-your_key_here"
}
}
}
}From a terminal instead: devin mcp add imagemcp https://mcp.imagemcpserver.com/mcp -s user writes the entry to the user file — then add the headers object. Without -s it lands in the gitignored local override.
Approvals: Devin Local asks before every MCP tool call by default. Its permissions config can allow individual tools, named mcp__imagemcp__compress_image and so on.
An existing Windsurf config may already be picked up
The Devin CLI imports MCP servers from ~/.codeium/windsurf/mcp_config.json by default, unless read_config_from.windsurf is set to false in ~/.config/devin/config.json. The dedicated mcp_config.json above is still the documented home for Devin Local, and the one to check first when a correct entry is invisible to the agent.
Legacy Cascade agent: ~/.codeium/windsurf/mcp_config.json
Tabs still running the legacy Cascade agent read their own file. Cascade’s MCP page has since been removed from the Devin docs; the Cascade details on this page are as checked against it in September 2026.
~/.codeium/windsurf/mcp_config.jsonpaste and refresh{
"mcpServers": {
"imagemcp": {
"serverUrl": "https://mcp.imagemcpserver.com/mcp",
"headers": {
"x-api-key": "sk-img-gen-your_key_here"
}
}
}
}Remote servers are shaped differently. They take serverUrl (or url) rather than command and args. A config copied from a stdio example will not connect.
If your build wants a command instead: use "command": "npx" with "args": ["-y", "mcp-remote", "https://mcp.imagemcpserver.com/mcp", "--header", "x-api-key:sk-img-gen-…"]. Same tools, one local bridge process.
Keeping the key out of the file
Devin Local: define the server in the committed .devin/mcp_config.json without a key if the team should share it, and let each person add theirs in .devin/mcp_config.local.json, which is gitignored. That is the pattern Devin’s docs recommend; a solo setup can simply keep the whole entry in the user file.
Legacy Cascade: mcp_config.json supports interpolation inside serverUrl, url and headers, so the key never has to sit in the file as plain text.
${env:IMAGEMCP_API_KEY}Reads an environment variable. Note that an unset variable resolves to an empty string rather than erroring — which looks exactly like a bad key.
${file:~/.secrets/imagemcp.txt}Reads the trimmed contents of a file, tilde paths included. This is the one to reach for when a GUI launch does not inherit your shell environment.
{
"mcpServers": {
"imagemcp": {
"serverUrl": "https://mcp.imagemcpserver.com/mcp",
"headers": {
"x-api-key": "${env:IMAGEMCP_API_KEY}"
}
}
}
}11 MCP tools, and Cascade’s ceiling of 100
8 image tools and 3 utility tools. Each arrives with its full JSON schema, so the agent knows the parameters, the enums and which fields are required without you explaining any of it.
generate_imagetext-to-image and image-to-image
generate_transparent_imagegenerate + cut out in one call
edit_imageedit or restyle from a text instruction
remove_backgroundalpha cutout
upscale_imageenlarge to high resolution (no scale setting)
text_to_svgreal vector paths
compress_imagequality-controlled re-encode
convert_formatsix raster formats
multicallrun the above in parallel
get_user_infocredits and plan · free
list_modelslive model catalogue · free
Legacy Cascade caps out at 100 tools in total
That ceiling is across every MCP server you have connected, not per server. This one takes 11 of it. If you run several large servers you can genuinely hit the limit, and the fix is to toggle individual tools off on each server’s settings page rather than removing a whole server — turning off convert_format and list_models costs you very little here.
Confirm it is live
In Devin Desktop, open Customize from the Agents window, click MCPs and look for imagemcp under This computer — refresh the list after editing the file. In a legacy Cascade tab, refresh the MCP panel. Then ask something only the server can answer:
“Check my image credit balance and list the models I can use.”
Both calls are free. If the agent returns real numbers and a real model list, the connection is good and you have spent nothing to find out.
Four fixes that cover most failures
The entry is in the other agent’s file
Devin Local reads ~/.config/devin and .devin; Cascade reads ~/.codeium/windsurf. Check which agent the tab is running before editing anything else.
The entry uses command instead of url
A remote server configured in the stdio shape will never connect. This is the most common copy-paste failure.
Server shows but tools error
The key is wrong, revoked, or an interpolated variable resolved to nothing. The server lists its tools before it checks the key, so a listed server proves only the config.
Tools appear but never get called
The agent will not reach for a tool it has no reason to use. Say “generate an image with the imagemcp tools” explicitly the first time.
Team allowlists
On an enterprise team, Devin Desktop’s admin settings carry an MCP allowlist and MCP registries under MCP & ACP, and a server that is not allowed will not connect however correct your file is. Cascade’s allowlist had one behaviour worth knowing before it catches you out:
One entry blocks everything else
By default everyone can add their own servers. The moment an admin allowlists a single server, every server not on the list is blocked for the whole team. Adding one entry is not an additive change — it switches the policy from open to closed.
The server ID is case-sensitive
The ID in the allowlist has to match the key name in each user’s mcp_config.json exactly. If the allowlist says imagemcp, a user with imageMCP is blocked.
Once Windsurf is connected
Windsurf gets the server’s 8 image tools, plus 3 utility tools for the credit balance, the model list and batching: 11 MCP tools in all. The ones most setups reach for first are the AI image generation API, Transparent PNG generator API and Image compression API; each page covers what the tool does and what a call costs. If the protocol itself is new to you, what is MCP explains how a client like Windsurf finds these tools and calls them.
- generate_image · 8–30 creditsAI image generation APIText-to-image and image-to-image, any live model
- generate_transparent_image · 16–38 creditsTransparent PNG generator APIGenerate and cut out in one call
- compress_image · 1 creditImage compression APIRe-encode smaller with a quality dial
- Use caseAI Open Graph imagesThe complete workflow, with the calls in order and what each one costs.
Setting up another client too? The Antigravity MCP setup and Cursor MCP setup guides use the same endpoint and key in a different config shape.
Windsurf & Devin Desktop questions
How do I add an MCP server to Windsurf?
Windsurf is now Devin Desktop, and its default agent is Devin Local. Add the server to ~/.config/devin/mcp_config.json for every project, or .devin/mcp_config.json in a repository — or open Customize from the Agents window, click MCPs and open the config file from there. From a terminal, devin mcp add imagemcp <url> -s user writes the entry for you. The legacy Cascade agent keeps its own file at ~/.codeium/windsurf/mcp_config.json.
Where is the Windsurf MCP config file?
It depends on the agent. Devin Local, the default agent in Devin Desktop, reads ~/.config/devin/mcp_config.json for your user (%APPDATA%\devin\mcp_config.json on Windows), .devin/mcp_config.json in a project, and a gitignored .devin/mcp_config.local.json for personal overrides. The legacy Cascade agent reads ~/.codeium/windsurf/mcp_config.json.
Why does my remote server entry not work?
Most often it is in the file the other agent reads: Cascade never looks in the Devin Local files, and Devin Local only sees a Cascade entry through its Windsurf import, which can be switched off. Beyond that, a remote server needs a url (Cascade also accepts serverUrl) and headers rather than command and args, so an entry copied from a stdio example will not connect.
Is there a limit on how many MCP tools Cascade can use?
The legacy Cascade agent has a ceiling of 100 tools in total across every MCP server you have connected. This server contributes 11: 8 image tools and 3 utility tools. If you are running several large servers you can hit it, and the fix is to toggle individual tools off on each MCP’s settings page rather than removing whole servers.
Can I keep the API key out of the config file?
For Devin Local, put the entry with the key in ~/.config/devin/mcp_config.json or in .devin/mcp_config.local.json, which is gitignored — Devin’s docs recommend exactly that for personal keys in team projects. For the legacy Cascade agent, mcp_config.json supports ${env:IMAGEMCP_API_KEY} and ${file:~/.secrets/imagemcp.txt} interpolation in url, serverUrl and headers.
My build only accepts command-based servers. What then?
Use the npx mcp-remote form. It spawns a local bridge that speaks stdio to the editor and HTTP to the endpoint, which works regardless of what remote transports your build supports.
Can the agent run several image operations at once?
Yes, through the multicall tool. It takes a list of tool calls and executes them concurrently, which matters when a single request needs a dozen assets.
What does it cost to try?
$5. New accounts start with 0 credits and the Testing plan adds 100, once, with no subscription — and the two account tools, get_user_info and list_models, never deduct credits at all.
Sources & references
Using a different editor?