Image generation in Kiro: MCP server setup
Put an mcpServers entry for the Image MCP Server, with url and headers, in .kiro/settings/mcp.json for one workspace or ~/.kiro/settings/mcp.json for all of them — Kiro hot-reloads the file on save. Kiro works from specs, which means it tends to know what an image is for before it needs one. That is the best possible input for a generation call, and the reason the tools land well here.
Add the server
- Where the config lives
- .kiro/settings/mcp.json (workspace, wins) · ~/.kiro/settings/mcp.json (user)
- The key it nests under
- mcpServers
- 1
Create an API key. Create a key in the Image MCP Server dashboard.
- 2
Choose workspace or user scope. Use .kiro/settings/mcp.json for one project, ~/.kiro/settings/mcp.json for all.
- 3
Add the remote entry. Set url to the endpoint and pass the key as an x-api-key header.
- 4
Save — no restart needed. Kiro watches the file and reloads the server configuration on save.
The server reads the key from an x-api-key header, an Authorization: Bearer header or a ?apikey= query parameter — see authentication. What each tool costs is on the credits page.
{
"mcpServers": {
"imagemcp": {
"url": "https://mcp.imagemcpserver.com/mcp",
"headers": { "x-api-key": "sk-img-gen-…" },
"autoApprove": [
"get_user_info", "list_models",
"compress_image", "convert_format"
],
"disabled": false
}
}
}{
"mcpServers": {
"imagemcp": {
"url": "https://mcp.imagemcpserver.com/mcp",
"headers": { "x-api-key": "${IMAGEMCP_API_KEY}" },
"disabledTools": ["upscale_image", "multicall"],
"autoApprove": ["get_user_info", "list_models"]
}
}
}Two files, merged, workspace first
Kiro reads both the workspace and the user file and merges them, with the workspace copy taking precedence where they collide. That is convenient until you forget a stale workspace entry is shadowing the global one. A file watcher picks up saves to either, so there is no restart step — but also no obvious signal about which file won.
Check it connected in Kiro
Open Kiro’s MCP panel: imagemcp should be listed as connected with its tools. Then ask for your image credit balance: get_user_info is free, and it is the first call that actually checks the key, because the server lists its tools without one.
Example workflow in Kiro
Images that follow the spec
- 1
Scope it to the workspace
Put the entry in .kiro/settings/mcp.json with ${IMAGEMCP_API_KEY} in the header. Kiro reloads the file on save.
- 2
Keep the expensive tools out
List upscale_image and multicall in disabledTools for this project, and autoApprove get_user_info and list_models.
- 3
Generate from the spec
Ask Kiro to generate the images the spec calls for. It already knows what each one is for, which is the best input a prompt can get.
When Kiro will not connect
| Symptom | Usual cause | Fix |
|---|---|---|
| The user-level server is ignored | A workspace .kiro/settings/mcp.json defines the same name and wins the merge. | Rename or remove the workspace entry. |
| A tool is missing from the list | It is named in disabledTools. | Remove it from disabledTools; the server stays connected either way. |
| Every call stops for approval | The tool is not in autoApprove. | Add the free and 1-credit tools to autoApprove and leave the model-priced ones off it. |
Once Kiro is connected
Kiro 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, Background removal API and Transparent PNG generator 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 Kiro finds these tools and calls them.
- generate_image · 8–30 creditsAI image generation APIText-to-image and image-to-image, any live model
- remove_background · 8 creditsBackground removal APICut the subject out in one call
- generate_transparent_image · 16–38 creditsTransparent PNG generator APIGenerate and cut out in one call
- Use caseAI images for landing pagesThe complete workflow, with the calls in order and what each one costs.
Setting up another client too? The Cursor MCP setup and Windsurf MCP setup guides use the same endpoint and key in a different config shape.
Kiro questions
Where does Kiro store MCP configuration?
Two places. .kiro/settings/mcp.json inside a workspace, and ~/.kiro/settings/mcp.json for your user. Both are read and merged; the workspace file takes precedence when the same server name appears in both.
Does Kiro support remote MCP servers?
Yes. A remote server takes url and headers, plus optional autoApprove, disabledTools and disabled. Local servers use command and args instead. Header values can reference environment variables as ${NAME}.
Do I have to restart Kiro after editing mcp.json?
No. A file watcher monitors the mcp.json files and reloads the configuration when you save, so changes apply to the next message.
Can I hide some of the tools?
disabledTools takes a list of tool names to withhold from the model while leaving the server connected. Useful for keeping the expensive tools out of reach on a given project.
Why is my user-level config being ignored?
Almost always a workspace file shadowing it. If .kiro/settings/mcp.json defines a server with the same name, that one wins and the user entry is never used.
Sources & references