comfyui-local-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@comfyui-local-mcpgenerate an image of a cat, photorealistic, cinematic lighting, 1024x1024"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
comfyui-local-mcp
Drive your local ComfyUI from MCP clients (Hermes, Claude Code, Cursor, any MCP agent) — with ready-made FLUX.2 Klein text-to-image workflows tuned for Apple Silicon (MLX + MPS).
Built and tested on: Mac mini M4 · 24GB unified memory · macOS 26 · ComfyUI 0.33 · mflux 0.19
Features
🖼️ generate_image — text-to-image with auto model discovery:
mflux:<name>— FLUX.2 Klein 4B / 9B, 4-bit MLX (fast, low memory)bf16— ComfyUI-native bf16 (MPS, best quality)auto— picks the best model automatically (9B preferred)
📦 list_models — list installed models (auto-scans
models/mflux/, add models without code changes)🗂️ list_outputs — recent generated images
🩺 system_status — one-call diagnosis (ComfyUI service, models, disk)
Related MCP server: comfyui-mcp
Quickstart
# 1. Install the server files into your ComfyUI + register the hermes MCP
./install.sh # optional; also fine to just copy files
# 2. Register the MCP server manually (or via install.sh) — e.g. in ~/.hermes/config.yaml:
# mcp_servers:
# comfyui-local:
# command: /path/to/python-with-mcp
# args: [/path/to/comfyui-local-mcp/mcp_comfyui_server.py]
# enabled: true
# 3. Test the server (stdio MCP handshake)
python mcp_comfyui_server.py
# 4. Ask your agent: "generate an image of ..." or "check my ComfyUI status"Requirements
macOS with Apple Silicon (MLX / Metal)
ComfyUI running locally (default
127.0.0.1:8188)Python env with
mcppackage (the server itself only needs stdlib +mcp)Optional: mflux +
ComfyUI-mflux-AnyModelcustom node for the MLX pathOptional: FLUX.2 Klein bf16 weights + Qwen3-4B text encoder for the bf16 path
Model setup (Apple Silicon, 24GB friendly)
Model | Path (under | Notes |
FLUX.2 Klein 4B · 4bit MLX |
| ~4.3GB, ~12.7s/step @1024² |
FLUX.2 Klein 9B · 4bit MLX |
| ~9.5GB, higher quality |
FLUX.2 Klein 4B bf16 |
| MPS path, best quality |
Qwen3-4B text encoder |
| required by bf16 path |
FLUX.2 VAE |
|
Download mflux MLX models with HF cache and symlink them into models/mflux/
(see HF caching / symlinks) — the server auto-discovers them.
Apple Silicon notes
fp8 weights don't work on MPS — convert to bf16 first (a CPU-side dequantize).
flux-2-klein-4b-bf16.safetensorsis a bf16 conversion of the official fp8 checkpoint.HF downloads can stall in some networks —
export HF_HUB_DISABLE_XET=1fixes it.Performance (M4 10-core GPU, 1024×1024): 4B-4bit ~12.7s/step (peak ~11GB), bf16 ~12.1s/step (peak ~15GB).
HF caching and symlinks
HuggingFace snapshot_download stores real data in ~/.cache/huggingface/hub/models--<org>--<name>/blobs/
and exposes symlinks under snapshots/<rev>/. This project keeps symlinks in
models/mflux/<Model-Name>/ pointing at those snapshots — zero duplicate disk usage,
and list_models picks them up automatically.
Troubleshooting
./check_system.sh # one-shot diagnosis
tail -50 ~/comfyui_run.logComfyUI not responding? Make sure it runs on
127.0.0.1:8188(kill stale instances first).Model missing from
list_models? Symlink (or copy) it intomodels/mflux/with atransformer/subdir.MCP not visible in the agent? Restart the agent session after editing
config.yaml.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Flux AI image generation
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Official FLUX MCP server. Generate, edit, vary, and browse images from Black Forest Labs.
Generate AI images and videos from any compatible MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to generate images through a local ComfyUI instance using Stable Diffusion and SDXL models via natural language. Users can trigger image generation, list available checkpoint models, and monitor the ComfyUI queue status directly from their MCP client.MIT
- AlicenseAqualityDmaintenanceMCP server for ComfyUI — text-to-image, variations, img2img refine, upscale, image proxy, and workflow runner.1584 npm1MIT
- FlicenseNot gradedqualityCmaintenanceProvides multi-model AI image generation via MCP tools, supporting Seedream, SDXL, and FLUX models with GPU acceleration.-
- AlicenseAqualityDmaintenanceMCP server for Krea.ai enabling AI image and video generation using models like Flux, Hailuo, Runway, Kling, and others via natural language prompts.913 npm9Apache 2.0