Skip to main content
MCP server CX Codex

Kokon — Claude Code MCP server: what it does, how to install

Generates and edits images offline via Qwen-Image 2.1 right from your coding assistant. Keeps all graphics rendering on your local GPU without cloud subscriptions.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env QLS_MCP_ALLOWED_DIRS=<QLS_MCP_ALLOWED_DIRS> --transport stdio mcp -- npx -y kokon-mcp
Open on GitHub

What Kokon does

This package serves as a bridge between MCP clients and the Kokon desktop application to process graphics locally via Qwen-Image 2.1. Available tools cover text-to-image synthesis, masked inpainting, canvas expansion, and upscaling up to 8192 px. Every request stays on 127.0.0.1. No data leaves your machine.

Execution requires Node.js 22 or higher. Without the desktop Kokon software installed and configured, this server cannot operate. You must complete the initial desktop setup to fetch the neural network weights. Hardware demands at least 12 GB VRAM on Windows or 16 GB on Apple Silicon. Initial model initialization takes around one minute.

File operations never overwrite existing files. Read and write permissions remain confined to the active project folder or paths defined in QLS_MCP_ALLOWED_DIRS.

What it helps with

  • render graphics from prompts and references directly into the repository
  • modify masked regions or extend borders on local image assets
  • upscale illustrations up to 8192 px without sending data to external APIs
  • inspect current GPU memory allocation and active task queues

Example prompts for the agent

  • Generate a hero banner for this README.md and save the result into docs/
  • Clean up the background details in screenshot.png using inpaint_image
  • Double the resolution of logo.png with upscale_image

How to install Kokon

Platform CLI

claude mcp add --env QLS_MCP_ALLOWED_DIRS=<QLS_MCP_ALLOWED_DIRS> --transport stdio mcp -- npx -y kokon-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Kokon

How to install Kokon in Claude Code?

Run claude mcp add kokon -- npx -y kokon-mcp. If you need to authorize extra project paths, execute claude mcp add --env QLS_MCP_ALLOWED_DIRS=<QLS_MCP_ALLOWED_DIRS> --transport stdio mcp -- npx -y kokon-mcp.

What does Kokon do?

It acts as a local bridge connecting coding assistants to an offline Qwen-Image 2.1 model for creating, inpainting, and enlarging images without internet access.

What are the prerequisites for running Kokon?

You need the Kokon desktop application installed to fetch the model weights, alongside Node.js 22 or newer. The host machine requires at least 12 GB VRAM on Windows or 16 GB unified memory on Apple Silicon.

Similar MCP servers

All MCP servers for AI and ML →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor