Trae · .trae/mcp.json · Add Manually

Image generation in Trae: MCP server setup

In Trae’s Agents settings, open MCP → Add Manually and paste the Image MCP Server block, or create .trae/mcp.json in the project root — Trae uses the conventional mcpServers / url / headers shape. Trae is one of the more forgiving clients on this list: the config is the shape most people already have in their clipboard. The setup is correspondingly short.

By the Image MCP Server teamPublished Updated Trae docs verified September 2026

Add the server

Where the config lives
.trae/mcp.json (project) · Agents → MCP → Add Manually (global)
The key it nests under
mcpServers
  1. 1

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

  2. 2

    Open Agents → MCP. In Trae’s Agents settings, pick MCP and choose Add Manually.

  3. 3

    Paste the JSON. Use the mcpServers block, or create .trae/mcp.json in the project root.

  4. 4

    Attach the server to an agent. Trae scopes tools per agent, so add the server to the agent you actually use.

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.

trae · recommendeduse this
{
  "mcpServers": {
    "imagemcp": {
      "url": "https://mcp.imagemcpserver.com/mcp",
      "headers": { "x-api-key": "sk-img-gen-…" }
    }
  }
}
If the header field is unavailable
Paste this as the server URL when the Add Manually
dialog offers only a URL field. The server also reads
the key from a query parameter:

https://mcp.imagemcpserver.com/mcp?apikey=sk-img-gen-…

Treat that URL as a secret: it carries the key.

The Raw Config button is the fast path

Trae has an explicit import route for configs written for another editor: the Raw Config (JSON) button opens the underlying mcp.json and takes a pasted block directly. If you already have this server working in Cursor or Cline, that is a copy and paste rather than a retype — the url and headers keys mean the same thing in all three.

Check it connected in Trae

Open Agents → MCP and check imagemcp is listed, then make sure it is attached to the agent you are talking to. 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 Trae

Move a working config over, then make icons

  1. 1

    Paste the block you already have

    If the server works in Cursor or Cline, paste the same mcpServers block through Raw Config (JSON).

  2. 2

    Attach it to your agent

    Add imagemcp to the agent you actually talk to, because Trae scopes tools per agent.

  3. 3

    Generate the marks

    Ask for icons through text_to_svg at 5 credits each, or through generate_transparent_image (16–38 credits) when you need a transparent raster.

When Trae will not connect

Trae MCP symptoms, their usual cause and the fix
SymptomUsual causeFix
The agent has no image toolsThe server is added but not attached to this agent.Add imagemcp to the agent in its settings.
There is no header fieldSome Trae builds show only a URL field in Add Manually.Use the ?apikey= URL form above, with a key issued just for Trae.
A pasted block does nothingIt is wrapped in another client’s key, such as servers or context_servers.Trae uses mcpServers, url and headers.

Once Trae is connected

Trae 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 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 Trae finds these tools and calls them.

Setting up another client too? The Cursor MCP setup and ChatGPT connector setup (also URL-only, ?apikey=) guides use the same endpoint and key in a different config shape.

Trae questions

How do I add an MCP server to Trae?

In the Agents settings, select MCP and choose Add Manually, then paste the JSON configuration. Alternatively create an mcp.json in a .trae/ directory at the project root.

Can I reuse a config from another IDE?

Yes — that is what the Raw Config (JSON) button is for. Trae uses the conventional mcpServers, url and headers keys, so a block from Cursor or Cline transfers unchanged.

What if I can only enter a URL, with no headers?

Append the key as a query parameter: the endpoint accepts ?apikey=… and checks it before the headers. The resulting URL contains your key, so treat it like a password.

Do the tools appear for every agent?

No — Trae scopes MCP servers to agents. Adding the server is only half the job; it also has to be attached to the agent you are actually talking to.

Is there a tool limit?

Nothing this server will run into. It exposes 11 MCP tools in total (8 image tools + 3 utility tools), which is a small addition to any agent’s surface.