Kilo Code · kilo.jsonc · mcp + type: remote

Image generation in Kilo Code: MCP server setup

Kilo Code keeps MCP servers under the mcp key of kilo.jsonc: add the Image MCP Server as "type": "remote" with url and headers, or add it from Settings → MCP Servers. Kilo Code’s current docs keep MCP servers in its main config file, in the shape OpenCode uses — not in the mcpServers block that Roo Code and older Kilo guides show. A config copied from one of those is the usual reason nothing loads.

By the Image MCP Server teamPublished Updated Kilo Code docs verified November 2026

Add the server

Where the config lives
~/.config/kilo/kilo.jsonc (global) · kilo.jsonc or .kilo/kilo.jsonc (project, wins)
The key it nests under
mcp
  1. 1

    Create an API key. Create a key in the Image MCP Server dashboard.

  2. 2

    Open Settings → MCP Servers. Add a remote server there, or edit kilo.jsonc directly; the UI writes to the same file.

  3. 3

    Add it under mcp. Use "type": "remote", the endpoint as url, the key as an x-api-key header, and "oauth": false.

  4. 4

    Pre-approve the cheap tools. Add allow rules for the free and 1-credit tools under permission; leave the model-priced ones prompting.

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.

kilo code · recommendeduse this
{
  "mcp": {
    "imagemcp": {
      "type": "remote",
      "url": "https://mcp.imagemcpserver.com/mcp",
      "headers": { "x-api-key": "sk-img-gen-…" },
      "oauth": false,
      "enabled": true
    }
  }
}
Key from the environment, cheap tools pre-approved
{
  "mcp": {
    "imagemcp": {
      "type": "remote",
      "url": "https://mcp.imagemcpserver.com/mcp",
      "headers": { "x-api-key": "{env:IMAGEMCP_API_KEY}" },
      "oauth": false,
      "enabled": true
    }
  },
  "permission": {
    "imagemcp_get_user_info": "allow",
    "imagemcp_list_models": "allow",
    "imagemcp_compress_image": "allow",
    "imagemcp_convert_format": "allow"
  }
}

mcp and "type": "remote", not mcpServers

Kilo Code puts MCP servers under the top-level mcp key of kilo.jsonc, and a hosted server is "type": "remote" with url, headers and enabled. That is not the mcpServers and "type": "streamable-http" block Roo Code uses, so a config copied from a Roo guide does not match. There is no transport to choose: Kilo tries Streamable HTTP first and falls back to SSE on its own, and this server answers the first attempt.

Check it connected in Kilo Code

Open Settings → MCP Servers: imagemcp should be listed and enabled. The first call to each tool shows an approval prompt unless you added an allow rule for it. 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 Kilo Code

An icon set without approval fatigue

  1. 1

    Allow the cheap calls

    Add allow rules for imagemcp_get_user_info, imagemcp_list_models, imagemcp_compress_image and imagemcp_convert_format under permission.

  2. 2

    Draw the marks as SVG

    Ask for each icon through text_to_svg, a flat 5 credits. It still prompts, because it has no allow rule.

  3. 3

    Check the spend

    Ask for your balance again at the end; get_user_info is free and already allowed.

When Kilo Code will not connect

Kilo Code MCP symptoms, their usual cause and the fix
SymptomUsual causeFix
The server never appearsThe block uses mcpServers, the shape Roo Code and older Kilo guides show.Move it under the top-level mcp key with "type": "remote".
A global server is ignored in one projectThe project kilo.jsonc defines the same name, and project config takes precedence.Edit or remove the project entry.
Every call stops for approvalMCP tools go through the normal permission system.Click Approve Always once per tool, or add imagemcp_<tool> rules under permission.

Once Kilo Code is connected

Kilo Code 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, AI SVG 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 Kilo Code finds these tools and calls them.

Setting up another client too? The Roo Code MCP setup and OpenCode MCP setup guides use the same endpoint and key in a different config shape.

Kilo Code questions

Where does Kilo Code keep its MCP config?

In its main config file: ~/.config/kilo/kilo.jsonc for every project, or kilo.jsonc or .kilo/kilo.jsonc in a project root. Project config takes precedence over global, and servers go under the top-level mcp key.

Is Kilo Code’s config the same as Roo Code’s?

Not any more. Roo Code uses mcpServers with "type": "streamable-http" and an alwaysAllow array. Kilo Code’s current docs use the mcp key with "type": "remote", and approve tools through permission rules instead.

Do I have to choose a transport?

No. "type": "remote" is all Kilo needs; it tries Streamable HTTP first and falls back to SSE automatically. This server speaks Streamable HTTP, so the first attempt is the one that connects.

How do I stop it generating images without asking?

Approve by cost. MCP tool permissions are keyed server_tool, so with the server named imagemcp, allow imagemcp_compress_image and imagemcp_convert_format (1 credit) and the two free lookups. Leave generate_image, edit_image, generate_transparent_image and multicall prompting; they bill at the model’s rate. remove_background (8 credits), text_to_svg (5) and upscale_image (15) are fixed prices but not trivial.

Can I keep the key out of kilo.jsonc?

Yes: write "x-api-key": "{env:IMAGEMCP_API_KEY}" in headers. Kilo resolves {env:NAME} references from the environment, so a project kilo.jsonc can be committed without the key in it.