Comfy MCP Local Server: Run Your Own ComfyUI from AI Agents

ComfyUI Wikinews

Comfy MCP local server: run your own ComfyUI from Claude Code, Claude Desktop and Cursor, with node and model introspection, workflow execution and hardware-aware routing.

On August 11, Comfy Org announced that Comfy MCP now works with your local ComfyUI. The announcement highlights three capabilities the local server unlocks out of the box: hardware checks, model recommendations, and running open-source video models such as LTX and MiniMax H3 on your own GPU.

Comfy MCP driving a local ComfyUI session

Comfy MCP driving a local ComfyUI session (source: Comfy Org announcement)

What is the Comfy MCP local server

The Comfy MCP local server (Comfy-Org/comfy-mcp) is an open-source, stdio-based MCP server that lets any MCP-speaking AI agent drive the ComfyUI installed on your own machine (default target 127.0.0.1:8188). It is built on comfy-cli, which is the engine behind every tool call, and works with Claude Code, Claude Desktop, Cursor, or any other MCP client.

It complements the existing Comfy Cloud MCP: the cloud server executes workflows on Comfy Cloud GPUs over HTTP, while the local server runs workflows on the ComfyUI you control. Running both is supported and normal.

What the agent can do with your local ComfyUI

  • Generate: run a workflow JSON (API format or UI export), or go from a text prompt to an image in one call.
  • Monitor jobs: submit generation asynchronously, then wait, watch or cancel, read failure verdicts and collect the output PNGs.
  • Introspect your live install: search the nodes, models and templates your ComfyUI actually has, custom nodes included, instead of a static catalog.
  • Build workflows: validate a graph, edit a template's slots, and fan one workflow into variants.
  • Manage ComfyUI: launch, stop or restart the server, tail its logs, and stage input assets.
  • Hardware and VRAM checks: system_stats reports per-device vram_free / vram_total from the live ComfyUI, and free_memory unloads models when you need headroom.

Hardware-aware routing

Because local generation only makes sense on a machine that can carry it, the server probes comfy env at startup and appends a Machine snapshot (OS, architecture, RAM, GPU vendor/model/VRAM) to the instructions the MCP handshake carries. The agent then routes based on thresholds:

MachineRouting
Under 8 GB VRAM, or no GPU confirmedUse partner nodes or Comfy Cloud MCP
Apple Silicon under 32 GB unified memoryUse partner nodes or Comfy Cloud MCP
Enough VRAMRun local diffusion on your ComfyUI

The routing figures are in the agent's context from the first message, so it can decide between local generation, hosted partner models (Flux, Ideogram, Kling and more via partner_generate) and cloud execution without guessing.

Local-first, not local-only

A few flows reach beyond your machine: partner_generate runs hosted partner models entirely on partner infrastructure, partner-API nodes let a locally executed workflow call hosted models (Seedream, Veo, Kling and others), and the COMFYUI_URL environment variable points the run and job tools at a ComfyUI on another machine you control.

Getting started

  1. Install the pieces:

    pip install comfy-mcp "comfy-cli>=1.14.0"
    comfy install
  2. Launch ComfyUI and leave it running: comfy launch

  3. Add the server to your client (Claude Code, Claude Desktop or Cursor) using the configuration snippet from the README, then reload the client.

  4. Ask your agent to run a workflow, for example: "Confirm my local ComfyUI is running, then run the workflow at ~/workflows/txt2img.json and show me the image."

Under the hood the agent calls server_info to confirm ComfyUI is up, run_workflow to execute your workflow JSON, and fetch_outputs to collect the result. No hand-authored workflow? The agent can search_templates, fetch_template to write a runnable JSON, and run that instead.

Availability

The server is open source on GitHub (Comfy-Org/comfy-mcp) and published on PyPI as comfy-mcp. The current release is v0.10.0.

Comments

Sign in with GitHub to join the discussion.

Loading comments…
Comfy MCP Local Server: Run Your Own ComfyUI from AI Agents | ComfyUI Wiki