Free local image generation for Claude Code and MCP clients

Most image MCP servers forward your prompt to a paid cloud API. Kokon's runs Qwen-Image 2.1 on your own GPU: no API key, no cost per image, nothing uploaded.

my-website
> Make a hero image for my landing page: a blue morpho butterfly on a silk cocoon, 16:9
● kokon · generate_image
aspect_ratio: "16:9" · quality: "quality"
⎿ Saved public/hero.png · 2752×1536 · 39 s
A blue morpho butterfly on a silk cocoon, generated locally by Kokon for an AI agent

What your agent can do

ToolWhat it does
generate_imageCreate an image from a prompt; aspect ratio from the prompt ("16:9 hero") or explicit
edit_imageEdit a photo with an instruction, keeping its size
edit_imagesCombine several images ("put the product from image 1 on the table in image 2")
inpaint_imageChange only a masked area: edit, remove, replace or add
outpaint_imageExtend an image beyond its borders, in pixels or percent
upscale_imageEnlarge up to 8192 px
get_image_infoSize, format and the generation metadata of an image
get_generator_statusGPU, VRAM, whether the model is loaded, the queue

Set it up

Install Kokon and run its first-time setup once (it downloads the model). Then register the MCP server.

Claude Code on Windows

claude mcp add --scope user kokon -- "$env:LOCALAPPDATA\Kokon\kokon-mcp.exe"

Claude Code on Mac

claude mcp add --scope user kokon -- /Applications/Kokon.app/Contents/MacOS/kokon-mcp

Cursor and other MCP hosts

Any host that takes the standard JSON config (on a Mac the command is /Applications/Kokon.app/Contents/MacOS/kokon-mcp):

{
  "mcpServers": {
    "kokon": {
      "type": "stdio",
      "command": "C:\\Users\\<you>\\AppData\\Local\\Kokon\\kokon-mcp.exe",
      "args": []
    }
  }
}

The desktop app does not need to be open: the server starts the engine on demand. The first call takes about a minute while the model loads.

Prompts to try

Safe by default

Requirements

A Windows PC with a 12 GB NVIDIA, AMD or Intel Arc GPU, or an Apple Silicon Mac (32 GB recommended). On an RTX 5070 Ti a new image takes 22 to 46 s and an edit 25 to 55 s. Details in the setup guide.

Give your agent a GPU

Kokon is free and open source.