ComfyUI MCP Server
@Overseer66
关于 ComfyUI MCP Server
comfyui-mcp-server
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"comfyui-mcp-server-overseer66": {
"command": "python",
"args": [
"src/test_comfyui.py"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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.
常见问题
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.
基本信息
其他 分类下的更多 MCP 服务器
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
ghidraMCP
LaurieWiredMCP Server for Ghidra
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Nginx UI
0xJackyYet another WebUI for Nginx
评论