zimage-mcp
A local MCP server for generating web-dev images using the Z-Image Turbo model on ComfyUI, with presets and exact pixel dimensions.
README
zimage-mcp
A local MCP server for generating web-dev images with the
Z-Image Turbo model running on the ComfyUI box. It hard-codes the verified Z-Image graph
(UNETLoader + CLIPLoader lumina2 + ModelSamplingAuraFlow shift 3 + KSampler 8/cfg1/res_multistep/simple),
downloads the result, and saves it to a local path at exact pixel dimensions.
It runs alongside the existing @peleke.s/comfyui-mcp (which stays for SDXL/FLUX); tools are
namespaced mcp__zimage__*.
Tools
generate_image(prompt, output_path, size="square", width?, height?, seed?, steps?=8, negative?="", n?=1)
Generates and saves image(s).
output_path— local path, e.g../public/img/hero.png. Parent dirs are created. Format follows the extension (.png/.jpg/.jpeg/.webp).size— a preset (below), or pass exactwidth+height. Because Z-Image needs dimensions that are multiples of 16, any exact size is generated at the nearest valid size (≥ requested, matching aspect) then resize-cover + center-crop to your exact pixels.seed— omitted = random; echoed back in the result for reproducibility.n— 1–4 variants. Files get_1,_2, … suffixes; seeds arebase, base+1, ….- Returns
{ images, seed, gen_size, output_size, seconds }.
list_presets()
Returns the preset table (name → WxH).
health()
ComfyUI pre-flight: reachable, comfyui_version, gpu, vram_free_mb.
Size presets
| preset | output | use |
|---|---|---|
square |
1024×1024 | cards, avatars, icons |
landscape |
1216×832 | general content images |
portrait |
832×1216 | tall cards |
hero |
1280×720 | 16:9 hero/banner |
wide |
1536×640 | wide banner (12:5) |
og |
1200×630 | OpenGraph/social share |
mobile |
768×1344 | mobile-first portrait |
Z-Image is tuned around ~1 MP. Very large custom dimensions (>~1.3 MP) may reduce quality or slow down; for big hero art, generate at a preset and upscale separately (a 2K upscaler template exists on the box). Note: text-in-image is weak — use FLUX/Qwen for legible baked-in text.
Configuration (env vars)
| var | default |
|---|---|
COMFYUI_URL |
http://10.0.0.109:8188 |
ZIMAGE_UNET |
z_image_turbo_bf16.safetensors |
ZIMAGE_CLIP |
qwen_3_4b.safetensors |
ZIMAGE_VAE |
ae.safetensors |
ZIMAGE_DEFAULT_STEPS |
8 |
ZIMAGE_TIMEOUT_S |
180 |
Run / register
Requires uv. Add to ~/.claude.json under mcpServers:
"zimage": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/Users/jaimie/projects/zimage-mcp", "server.py"],
"env": { "COMFYUI_URL": "http://10.0.0.109:8188" }
}
Restart Claude Code; the tools appear as mcp__zimage__generate_image, etc.
Develop / test
uv sync
uv run pytest -q # unit tests (no network)
ZIMAGE_TEST_LIVE=1 uv run pytest -q # + live tests against the box
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。