Kokon
io.github.GabrieleLozupone/kokon · 464 stars · Rust · AGPL-3.0
MCP server Generate and edit images offline with Qwen-Image 2.1 on your GPU. Needs the Kokon desktop app.
Install
The repo has no one-line install. Follow its README.
Published as
- npm
kokon-mcpstdio
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
QLS_MCP_ALLOWED_DIRSOptional | Env var | Extra folders the server may read and write, separated by semicolons. The project folder and Kokon's output folder are always allowed. |
Files
kokon-mcp
MCP server for Kokon. It lets Claude Code, Cursor, Claude Desktop and other
MCP clients generate and edit images with Qwen-Image 2.1, running offline on your own GPU.
No API key, no cloud. Everything stays on 127.0.0.1.
Requires the Kokon desktop app (Windows with a 12 GB+ GPU: NVIDIA, or AMD/Intel in beta; or an Apple Silicon Mac, beta, 16 GB+). Download it from kokon.app, open it once and finish the setup so the model is downloaded. This package is only the bridge between your AI agent and the app. The app doesn't need to be open: the server starts the engine on demand.
Setup
Claude Code:
claude mcp add --scope user kokon -- npx -y kokon-mcp
Any client that takes the standard JSON config (.mcp.json, Claude Desktop, Cursor...):
{
"mcpServers": {
"kokon": {
"type": "stdio",
"command": "npx",
"args": ["-y", "kokon-mcp"]
}
}
}
Needs Node.js 22 or newer. The Kokon installer also ships the same server as a standalone
executable (kokon-mcp.exe / kokon-mcp inside the app), if you prefer not to use Node. See the
main README.
Then ask: "Generate a hero image for this README and save it in docs/" or "Remove the background clutter from screenshot.png". The first call takes about a minute while the model loads.
Tools
Prompts are used exactly as your assistant writes them: Kokon's own prompt writer (Prompt+) does not run for MCP, so the assistant writes the full description. The tool descriptions tell it how.
| Tool | What it does |
|---|---|
generate_image |
Text to image, optionally with up to 10 reference images (a person, a product, a style) in a new scene. Size chosen automatically, or set width/height or aspect ratio. |
edit_image |
Edit an image with an instruction. Keeps its size; never overwrites the input. |
edit_images |
Edit image 1 with the help of up to 9 more images ("image 1", "image 2"...). |
inpaint_image |
Change only a masked area: edit, remove, replace or add something. |
outpaint_image |
Extend an image beyond its borders. |
upscale_image |
Enlarge an image (default 2x, up to 8192 px). |
get_image_info |
Size, type and, for Kokon images, the prompt, seed and settings. |
get_generator_status |
Engine state, GPU, VRAM and job queue. |
Behavior and safety
- Every result returns the absolute path of the saved file, its size, seed and metadata.
- Reads and writes are limited to the project folder (
CLAUDE_PROJECT_DIRor the working directory), Kokon's output folder and folders listed inQLS_MCP_ALLOWED_DIRS(separated by semicolons). Existing files are never overwritten. - Images are not sent back to the model by default. Pass
include_preview: truefor a small JPEG. - Progress is reported through MCP progress notifications.
License
AGPL-3.0-only. The Qwen-Image 2.1 model weights the app downloads are under the Qwen Research License (non-commercial). Source: github.com/GabrieleLozupone/kokon.
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 464
- License
- AGPL-3.0
- Language
- Rust
- Last push
- 2026-10-29
- Forks
- 33
- MCP Registry
- io.github.GabrieleLozupone/kokon
- Homepage
- kokon.app
- Topics
- image-editing, image-generation, local-ai, macos, mcp, mcp-server, offline, privacy, qwen-image, qwen-image-2-1, stable-diffusion-cpp, vulkan, windows, ai-photo-editor, comfyui-alternative, generative-fill, inpainting, linux, photo-editor, nano-banana-alternative
Next on this shelf
- 495中国股票数据elsejj/mcp-cn-a-stock这是一个为大模型提供 A 股数据的的 MCP(Model Content Protocol) 服务。462
- 496小红书自动搜索评论工具(MCP Server 2.0)chenningling/Redbook-Search-Comment-MCP2.0这是一款基于 Playwright 开发的小红书自动搜索和评论工具,作为 MCP Server,可通过特定配置接入 MCP Client(如Claude for Desktop),帮助用户自动完成登录小红书、搜索关键词、获取笔记内容及发布AI生成评论等操作。460
- 497Airtabledomdomegg/airtable-mcp-server🗂️🤖 Airtable Model Context Protocol Server, for allowing AI systems to interact with your Airtable bases456
- 498Accessibility Agentsio.github.Community-Access/accessibility-agentsWCAG 2.2 scanners for web pages, Office, PDF, ePub and Markdown: contrast, axe, veraPDF and more.455
- 499Beever Atlasbeever-ai/beever-atlasYour First LLM-Wiki Conversation Knowledge Base454
- 500gflow-cliio.github.ffroliva/gflow-cliDrive Google Flow from an agent: Veo video and Imagen image generation450