Sign inSign up

snowgoons/comfyui-mcp-server

By snowgoons

•Updated 7 months ago

A server using FastMCP framework to generate images based on prompts via a remote Comfy server.

Image
Machine learning & AI
0

1.7K

snowgoons/comfyui-mcp-server repository overview

⁠Comfy MCP Server

A server using FastMCP framework to generate images based on prompts via a remote Comfy server.

⁠Overview

This script sets up a server using the FastMCP framework to generate images based on prompts using a specified workflow. It interacts with a remote Comfy server to submit prompts and retrieve generated images.

⁠Configuration

Set the following environment variables:

  • COMFY_URL to point to your Comfy server URL.
  • COMFY_WORKFLOW_JSON_FILE to point to the absolute path of the API export json file for the comfyui workflow.
  • COMFY_TIMEOUT to change the maximum ComfyUI generation time in seconds (default 120)
  • PROMPT_NODE_ID to the id of the text prompt node.
  • OUTPUT_NODE_ID to the id of the output node with the final image.
  • SEED_NODE_ID to the id of the KSampler node that you want to set the seed on.
  • ALLOWED_HOST the hostname permitted in the Host: header from clients

Optionally, if you have an Ollama⁠ server running, you can connect to it for prompt generation.

  • OLLAMA_API_BASE to the url where ollama is running.
  • PROMPT_LLM to the name of the model hosted on ollama for prompt generation.

Tag summary

Content type

Image

Digest

sha256:06609d167…

Size

97.4 MB

Last updated

7 months ago

docker pull snowgoons/comfyui-mcp-server