Comfy MCP Server
by MCP-Mirror
This server uses the FastMCP framework to generate images based on prompts via a remote Comfy server. It allows users to submit prompts and retrieve generated images from a ComfyUI workflow.
Last updated: N/A
What is Comfy MCP Server?
This is a server that leverages the FastMCP framework to interface with a remote ComfyUI server. It enables image generation based on text prompts by utilizing a pre-defined ComfyUI workflow.
How to use Comfy MCP Server?
- Install Python 3.x and required packages using
pip install "mcp[cli]"
. 2. Configure environment variablesCOMFY_URL
,COMFY_WORKFLOW_JSON_FILE
,PROMPT_NODE_ID
, andOUTPUT_NODE_ID
. 3. Run thecomfy-mcp-server.py
script. The server will then listen for requests to generate images based on provided prompts.
Key features of Comfy MCP Server
Remote ComfyUI interaction
Prompt-based image generation
FastMCP framework integration
Workflow-driven image creation
Use cases of Comfy MCP Server
Automated image generation pipelines
Integrating ComfyUI workflows into other applications
Generating images from text prompts programmatically
Creating custom image generation services
FAQ from Comfy MCP Server
What is ComfyUI?
What is ComfyUI?
ComfyUI is a node-based visual programming environment for creating Stable Diffusion workflows.
What is FastMCP?
What is FastMCP?
FastMCP is a framework for building servers and clients that interact with machine learning models.
How do I find the PROMPT_NODE_ID and OUTPUT_NODE_ID?
How do I find the PROMPT_NODE_ID and OUTPUT_NODE_ID?
These IDs can be found in the ComfyUI interface when you export your workflow as an API JSON file. Inspect the JSON to identify the correct node IDs.
What if the server fails to connect to the Comfy server?
What if the server fails to connect to the Comfy server?
Ensure that the COMFY_URL
environment variable is correctly set and that the ComfyUI server is running and accessible.
Can I use different ComfyUI workflows with this server?
Can I use different ComfyUI workflows with this server?
Yes, you can use any ComfyUI workflow, but you need to update the COMFY_WORKFLOW_JSON_FILE
environment variable and ensure that the PROMPT_NODE_ID
and OUTPUT_NODE_ID
are correctly configured for the new workflow.