ComfyUI MCP Server
@Overseer66
About ComfyUI MCP Server
comfyui-mcp-server
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"comfyui-mcp-server-overseer66": {
"command": "python",
"args": [
"src/test_comfyui.py"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is ComfyUI MCP Server?
A server implementation for integrating ComfyUI with the Model Context Protocol (MCP). It requires a running ComfyUI server—either self-hosted or an existing server address—and provides tools to generate images and run workflows via MCP.
How to use ComfyUI MCP Server?
Configure the ComfyUI host and port in src/.env, place custom workflow JSON files in the workflows directory, then run the server using UV (with mcp run src/server.py:mcp) or Docker (using the prebuilt image overseer66/mcp-comfyui). Debug locally with python src/test_comfyui.py or mcp dev src/server.py.
Key features of ComfyUI MCP Server
- Integrates ComfyUI with MCP for AI agent workflows.
- Built-in tools: text_to_image, download_image, run_workflow_with_file, run_workflow_with_json.
- Custom workflows added by placing JSON files in the
workflowsdirectory. - Supports UV and Docker deployment.
- Offers SSE transport for remote connections.
- Debugging scripts for ComfyUI and MCP are included.
Use cases of ComfyUI MCP Server
- Generate images by running ComfyUI text-to-image workflows from an MCP client.
- Download generated images via the
download_imagetool after atext_to_imagecall. - Execute arbitrary ComfyUI workflows by providing a JSON file path or inline JSON data.
- Run ComfyUI workflows inside a Docker container for isolated or remote environments.
- Connect to a remote ComfyUI server via SSE transport for cloud-based setups.
FAQ from ComfyUI MCP Server
What dependencies are required?
A running ComfyUI server (self-hosted or accessible) and Python packages: mcp, websocket-client, and python-dotenv.
How do I add a new workflow as a tool?
Place the workflow JSON file in the workflows directory and declare it as a new tool in the system.
Can I use Docker? Are there limitations?
Yes. When using Docker, the host filesystem is not shared, so downloading images to a local folder may be difficult. Set RETURN_URL=false to receive image data as bytes, and set COMFYUI_HOST to an appropriate address (e.g., host.docker.internal). Note that large image payloads may exceed response limits.
How do I connect via SSE transport?
Run the SSE server with Docker (docker run -i --rm -p 8001:8000 overseer66/mcp-comfyui-sse) and set the url in mcp.json to http://localhost:8001/sse.
Does text_to_image return the actual image?
No, it returns only the URL of the generated image. Use the download_image tool or access the URL in a browser to obtain the actual image.
Frequently asked questions
What dependencies are required?
A running ComfyUI server (self-hosted or accessible) and Python packages: mcp, websocket-client, and python-dotenv.
How do I add a new workflow as a tool?
Place the workflow JSON file in the `workflows` directory and declare it as a new tool in the system.
Can I use Docker? Are there limitations?
Yes. When using Docker, the host filesystem is not shared, so downloading images to a local folder may be difficult. Set `RETURN_URL=false` to receive image data as bytes, and set `COMFYUI_HOST` to an appropriate address (e.g., `host.docker.internal`). Note that large image payloads may exceed response limits.
How do I connect via SSE transport?
Run the SSE server with Docker (`docker run -i --rm -p 8001:8000 overseer66/mcp-comfyui-sse`) and set the `url` in `mcp.json` to `http://localhost:8001/sse`.
Does text_to_image return the actual image?
No, it returns only the URL of the generated image. Use the `download_image` tool or access the URL in a browser to obtain the actual image.
Basic information
More Other MCP servers
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Comments