comfyui-mcp-server-node
Click on "Install 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-mcp-server-nodegenerate an image of a cat sitting on a windowsill"
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-common-mcp
This is improved node.js version of Joe Norton's python project (https://github.com/joenorton/comfyui-mcp-server).
A lightweight MCP (Model Context Protocol) server that bridges AI agents (like Cursor, Claude, etc.) with a local ComfyUI instance. It enables AI agents to generate and iteratively refine images, audio, and video through conversational tool calls.
Features
Image Generation: Generate images using Stable Diffusion through ComfyUI
Audio Generation: Generate audio/music using AceStep workflow
Workflow System: PARAM_* placeholder system for easy workflow customization
Asset Management: Track, view, and manage generated assets
Job Management: Monitor queue, check job status, cancel jobs
Configuration: List available models
Related MCP server: ComfyPilot
Quick Start
Option 1: Via npx (for MCP clients)
No local clone needed. Add to your MCP client configuration (Cursor, Claude, etc.):
"comfyui": {
"command": "npx",
"args": ["-y", "comfyui-common-mcp"],
"env": {
"COMFYUI_URL": "http://localhost:8188",
"COMFY_MCP_WORKFLOW_DIR": "/path/to/workflows",
"COMFY_MCP_ASSET_TTL_HOURS": "24"
}
}Note: ComfyUI must be running at
COMFYUI_URLbefore the MCP client connects.
Option 2: Local development
git clone https://github.com/yar3333/comfyui-common-mcp.git
cd comfyui-common-mcp
npm install
npm run buildThen start:
Command | Mode |
| stdio (for MCP clients) |
| stdio with ts-node |
Configuration
Environment Variables
Variable | Description | Default |
| ComfyUI base URL |
|
| Path to workflow directory |
|
| Asset time-to-live in hours |
|
API Tools
Generation Tools
Tool | Description |
| Available workflows automatically published as tools |
| Regenerate a previously generated asset |
Viewing Tools
Tool | Description |
| View a generated image inline in chat |
Job Management Tools
Tool | Description |
| Get current queue status from ComfyUI |
| Get job status by prompt_id |
| Wait for a job to complete with timeout |
| List generated assets with optional filtering |
| Get full metadata for a specific asset |
| Cancel a running job by prompt_id |
Configuration Tools
Tool | Description |
| List available checkpoint models from ComfyUI |
| List available UNet models in standard (safetensors) format |
| List available UNet models in GGUF format |
Workflow Tools
Tool | Description |
| List available workflows in the workflow directory |
| Run a specific workflow with parameter overrides |
Workflow System
Workflows are stored as JSON files in the workflows/ directory. The system automatically discovers workflows and exposes them as MCP tools. Parameters are defined using the PARAM_* placeholder system:
PARAM_INT_SEED- Integer parameter for seedPARAM_FLOAT_CFG- Float parameter for CFG scalePARAM_STR_SAMPLER_NAME- String parameter for sampler namePARAM_PROMPT- String parameter for prompt
Test
Prerequisites: ComfyUI running at http://localhost:8188, server built and started.
# Run the test client
npx ts-node test_client.ts
# With custom prompt
npx ts-node test_client.ts -p "a beautiful sunset over mountains"# Run unit tests
npm testProject Structure
comfyui-common-mcp/
├── src/
│ ├── comfyui_client.ts # HTTP client for ComfyUI API
│ ├── asset_processor.ts # Image processing utilities
│ ├── server.ts # Main entry point
│ ├── models/ # Data models
│ │ ├── asset.ts
│ │ └── workflow.ts
│ ├── managers/ # Manager classes
│ │ ├── workflow_manager.ts
│ │ └── asset_registry.ts
│ └── tools/ # MCP tool implementations
│ ├── helpers.ts
│ ├── generation.ts
│ ├── asset.ts
│ ├── job.ts
│ ├── configuration.ts
│ └── workflow.ts
├── workflows/ # Workflow JSON files
├── test_client.ts # Test client
├── package.json
├── tsconfig.json
└── README.mdChangelog
v2.x.x
add
list_checkpoint_modelstooladd
list_unet_modelstooladd
list_unet_gguf_modelstoolremove http mode (stdio looks enough)
remove
list_modelstoolremove publish system (caused confusion for AI agents; use custom output node instead)
remove default parameters (caused confusion for AI agents; use regular PARAM_* instead)
remove output folder setting (use custom output node instead; for example: https://gist.github.com/kevinjwesley-Collab/a548ee5e6244ebf905f0669e1d7d4958)
v1.x.x
add
wait_for_jobtool
License
MIT
Author
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
- Flicense-qualityBmaintenanceMCP server that connects local ComfyUI to AI agents, enabling natural language control of ComfyUI for creating workflows, generating images, and managing the queue.Last updated
- Alicense-qualityBmaintenanceAn MCP server that bridges AI agents with ComfyUI for automated workflow building, execution, monitoring, and output routing.Last updated1MIT
- Alicense-qualityDmaintenanceMCP server that provides image generation, captioning, and tagging via ComfyUI API, configurable for agent tools.Last updated3MIT
- Flicense-qualityCmaintenanceMCP server exposing a local (or LAN) ComfyUI instance's HTTP API as tools, so an LLM client can queue generations, inspect the queue/history, upload reference images, browse installed models/nodes, and pull back generated images.Last updated
Related MCP Connectors
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Producer/Riffusion AI music generation
MCP server for Luma Dream Machine AI video 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/yar3333/comfyui-common-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server