Droid · ~/.factory/mcp.json · droid mcp add

Image generation in Droid: MCP server setup

Run droid mcp add imagemcp <endpoint> --type http, or write the entry into ~/.factory/mcp.json yourself — user config takes precedence over the project file here, which is the reverse of most clients. Droid is built for delegated work: you describe an outcome and it goes away and does it. Image tools mean the outcome can include the images, rather than a note explaining which ones are missing.

By the imagemcpserver.com teamPublished Droid docs checked September 2026

Add the server

Where the config lives
~/.factory/mcp.json (user, wins) · .factory/mcp.json (project)
The key it nests under
mcpServers
  1. 1

    Create an API key. Create a key in the imagemcpserver dashboard.

  2. 2

    Run droid mcp add. droid mcp add imagemcp <endpoint> --type http registers the streamable HTTP server.

  3. 3

    Add the key header. Edit mcp.json to add the x-api-key header, referencing an environment variable.

  4. 4

    Restart the CLI. Droid picks up MCP changes on restart rather than live.

droid · recommendeduse this
# The CLI writes the config for you:
$ droid mcp add imagemcp https://mcp.imagemcpserver.com/mcp --type http

# Restart the CLI after adding or changing an MCP server.
Writing mcp.json by hand
// ~/.factory/mcp.json — or .factory/mcp.json for a project,
// remembering that the user file wins on a name collision.
{
  "mcpServers": {
    "imagemcp": {
      "type": "http",
      "url": "https://mcp.imagemcpserver.com/mcp",
      "headers": { "x-api-key": "${IMAGEMCP_API_KEY}" }
    }
  }
}

User config wins, not project config

Most clients on this list let a project file override the global one. Factory does the opposite: ~/.factory/mcp.json takes precedence over .factory/mcp.json. If a project config appears to be ignored, check whether you added the same server name globally months ago. Variable expansion happens in memory at connection time, so a ${VAR} reference never lands on disk or in version control.

The endpoint and the key are identical in every client. The wrapper around them is not, and that wrapper is where almost every “correct” config that does nothing goes wrong. Checked September 2026 against Droid’s own documentation — see the sources below.

Three ways to send the key

The server resolves your API key from any of these, checked in this order. That matters when a client only gives you a URL field and no way to set a header — you are not stuck, and you do not need a bridge process.

Query parameter

?apikey=sk-img-gen-…

Checked first. The fallback for a client whose config is a bare URL field.

x-api-key header

x-api-key: sk-img-gen-…

The documented default, and what every client below uses unless noted.

Authorization header

Authorization: Bearer sk-img-gen-…

Accepted as a bearer token, which is what a client with only a token field will send.

A key in a query string ends up in shell history, process listings and any log the client keeps, so prefer a header where the client allows one. Where it does not, treat the whole URL as the secret and rotate it as freely as you would a password.

What each tool costs

Wherever Droid lets you approve tools individually, the useful line to draw is not between image tools and other tools — it is between calls with a fixed price and calls that route to a model.

get_user_infolist_models

free

Safe to auto-approve wherever the client supports it. These are how the agent finds out what it can afford before it spends anything.

compress_imageconvert_format

1 credit

Deterministic and cheap. Auto-approving these makes an optimisation pass over a whole folder painless.

remove_backgroundtext_to_svgupscale_image

5–15 credits

Fixed prices, no model routing. Auto-approve once you trust the workflow.

generate_imageedit_imagegenerate_transparent_imagemulticall

model-priced

These route to an image model and are the ones that can run up a bill in a loop. Keep approval on.

Droid questions

How do I add an MCP server to Droid?

droid mcp add <name> <url> --type http is the quickest route — it writes the entry for you. Editing ~/.factory/mcp.json or .factory/mcp.json by hand does the same thing.

Which config file wins, project or user?

The user file. ~/.factory/mcp.json takes precedence over a project .factory/mcp.json, which is the opposite of Roo Code and Kiro. Checked September 2026.

Do I need to restart after adding a server?

Yes. Factory documents that MCP changes need a CLI restart to take effect, unlike Zed or Kiro which reload on save.

How do I keep the key out of version control?

Reference it as ${IMAGEMCP_API_KEY}. Droid expands variables in memory at connection time, so the resolved value is never written to disk.

Can Droid run image generation unattended?

It can, which is the reason to think about budget before you start. The free lookups let it check the balance itself; put the model-priced tools behind approval if a long unattended run makes you nervous.