# comfyui-mcp

An MCP server that hands your agent the keys to ComfyUI: image, video and audio generation, graph edits, model and VRAM management.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 861
- Author: artokun
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/artokun/comfyui-mcp
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/comfyui-mcp

## What it does

Setup is one command, and the server runs through `npx` — no repo to clone. Once connected, the agent gets a set of ComfyUI tools: it builds and edits the graph node by node, runs workflows, frees VRAM, pulls checkpoints and handles custom nodes. It finds your ComfyUI install and port on its own.

Local-first, but the same config reaches remote instances too — RunPod, a VPS, a box on your LAN. Pick whatever model you already pay for: a Claude or ChatGPT subscription, Gemini through your Google login, or a local model via Ollama with no network at all. Civitai access needs a `CIVITAI_API_TOKEN`; without it that part of model handling stops working.

Maintenance is limited right now. Releases cover verified critical fixes only, and there is no broad feature roadmap. No GPU, or no appetite for setup? Comfy ships its own agent tooling for Comfy Cloud, hosted on their hardware — that path skips the install entirely.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add comfyui-mcp -- npx -y comfyui-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add comfyui-mcp -- npx -y comfyui-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "comfyui-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "comfyui-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "comfyui-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "comfyui-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add comfyui-mcp npx -y comfyui-mcp
```

## When to use it
- generate an image from a text prompt without leaving the chat
- run a ComfyUI workflow end to end from the agent
- free VRAM before the next render
- download a checkpoint and wire up custom nodes
- edit the live graph node by node in plain language

## Example prompts
- Generate an image of a sunset over mountains
- Build a Flux workflow and run it
- Free VRAM and show me what is loaded

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [labelhead-artist-momentum](https://affpapa.org/en/nevibecode/mcp/labelhead-artist-momentum.md) — MCP server · ★ 107423
- [Agent Skills Search Server](https://affpapa.org/en/nevibecode/mcp/agent-skills-search-server.md) — MCP server · ★ 26559
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23263
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [PraisonAI](https://affpapa.org/en/nevibecode/mcp/praisonai.md) — MCP server · ★ 9289

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
