comfyui-local-mcp
comfyui-local-mcp
ローカル ComfyUI を MCP クライアント(Hermes、Claude Code、Cursor、任意の MCP エージェント)から操作できるようにします — Apple Silicon(MLX + MPS) 向けに調整済みの FLUX.2 Klein テキスト→画像ワークフローが同梱されています。
ビルド・テスト環境:Mac mini M4 · 24GB ユニファイドメモリ · macOS 26 · ComfyUI 0.33 · mflux 0.19
機能
🖼️ generate_image — モデルを自動検出してテキストから画像を生成:
mflux:<name>— FLUX.2 Klein 4B / 9B、4 ビット MLX(高速、低メモリ)bf16— ComfyUI ネイティブ bf16(MPS、最高品質)auto— 最適なモデルを自動選択(9B 優先)
📦 list_models — インストール済みモデルを一覧表示(
models/mflux/を自動スキャン、コード変更なしでモデル追加可能)🗂️ list_outputs — 最近生成された画像の一覧
🩺 system_status — ワンコール診断(ComfyUI サービス、モデル、ディスク)
Related MCP server: comfyui-mcp
クイックスタート
# 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"必要条件
Apple Silicon(MLX / Metal)搭載の macOS
ローカルで動作している ComfyUI(デフォルト
127.0.0.1:8188)mcpパッケージを含む Python 環境(サーバー自体は stdlib +mcpのみが必要)オプション:MLX パス用の mflux +
ComfyUI-mflux-AnyModelカスタムノードオプション:bf16 パス用の FLUX.2 Klein bf16 重み + Qwen3-4B テキストエンコーダー
モデルセットアップ(Apple Silicon、24GB 対応)
モデル | パス( | 備考 |
FLUX.2 Klein 4B · 4bit MLX |
| ~4.3GB、~12.7秒/ステップ @1024² |
FLUX.2 Klein 9B · 4bit MLX |
| ~9.5GB、より高品質 |
FLUX.2 Klein 4B bf16 |
| MPS パス、最高品質 |
Qwen3-4B テキストエンコーダー |
| bf16 パスに必要 |
FLUX.2 VAE |
|
mflux MLX モデルは HF キャッシュを使用してダウンロードし、models/mflux/ にシンボリックリンクを張ってください
(HF キャッシュ / シンボリックリンク を参照)— サーバーが自動検出します。
Apple Silicon に関する注意事項
fp8 重みは MPS では動作しません — 最初に bf16 に変換してください(CPU サイドでの逆量子化)。
flux-2-klein-4b-bf16.safetensorsは公式 fp8 チェックポイントを bf16 に変換したものです。一部のネットワークでは HF ダウンロードが停止することがあります —
export HF_HUB_DISABLE_XET=1で修正できます。パフォーマンス(M4 10コアGPU、1024×1024):4B-4bit ~12.7秒/ステップ(ピーク ~11GB)、bf16 ~12.1秒/ステップ(ピーク ~15GB)。
HF キャッシュとシンボリックリンク
HuggingFace の snapshot_download は実際のデータを ~/.cache/huggingface/hub/models--<org>--<name>/blobs/ に保存し、
snapshots/<rev>/ 以下にシンボリックリンクを公開します。このプロジェクトでは models/mflux/<Model-Name>/ に
シンボリックリンクを保持し、それらのスナップショットを指すようにします — ディスク使用量の重複はゼロで、
list_models が自動的に認識します。
トラブルシューティング
./check_system.sh # one-shot diagnosis
tail -50 ~/comfyui_run.logComfyUI が応答しない?
127.0.0.1:8188で動作していることを確認し、まず古いインスタンスを強制終了してください。list_modelsにモデルが表示されない?models/mflux/にtransformer/サブディレクトリを含む形でシンボリックリンク(またはコピー)を配置してください。エージェントに MCP が表示されない?
config.yamlを編集した後、エージェントセッションを再起動してください。
ライセンス
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables 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
- AlicenseAqualityCmaintenanceMCP server for ComfyUI — text-to-image, variations, img2img refine, upscale, image proxy, and workflow runner.15731MIT
- Flicense-qualityCmaintenanceProvides 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.9208Apache 2.0
Related MCP Connectors
MCP server for Flux AI image generation
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Producer/Riffusion AI music generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aiden-yanzy/comfyui-local-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server