ComfyUI MCP Server
ComfyUI MCP 서버
1. 개요
ComfyUI를 MCP와 통합하기 위한 서버 구현.
⚠️ 중요: 이 서버에는 ComfyUI 서버가 실행 중이어야 합니다.
자신의 ComfyUI 서버를 호스팅해야 합니다.
또는 기존 ComfyUI 서버 주소에 액세스할 수 있습니다.
Related MCP server: ComfyUI MCP
2. 디버깅
2.1 ComfyUI 디버깅
지엑스피1
2.2 MCP 디버깅
mcp dev src/server.py3. 설치 및 구성
3.1 ComfyUI 구성
src/.env편집하여 ComfyUI 호스트와 포트를 설정합니다.COMFYUI_HOST=localhost COMFYUI_PORT=8188
3.2 사용자 정의 워크플로 추가
새로운 도구를 추가하려면 워크플로 JSON 파일을
workflows디렉토리에 넣고 시스템에서 새 도구로 선언합니다.
4. 내장 도구
텍스트를 이미지로
생성된 이미지의 URL만 반환합니다.
실제 이미지를 얻으려면:
download_image도구를 사용하거나브라우저에서 URL에 직접 접근하세요.
다운로드_이미지
이미지 URL을 사용하여 다른 도구(예:
text_to_image)에서 생성된 이미지를 다운로드합니다.
파일과 함께 워크플로 실행
워크플로 JSON 파일의 경로를 제공하여 워크플로를 실행합니다.
# You should ask to agent like this. Run comfyui workflow with text_to_image.jsonCursorAI의 예시 이미지

json으로 워크플로 실행
워크플로 JSON 데이터를 직접 제공하여 워크플로를 실행합니다.
# You should ask to agent like this. Run comfyui workflow with this { "3": { "inputs": { "seed": 156680208700286, "steps": 20, ... (workflow JSON example) }
5. 실행 방법
5.1 UV 사용(권장)
예시
mcp.json:{ "mcpServers": { "comfyui": { "command": "uv", "args": [ "--directory", "PATH/MCP/comfyui", "run", "--with", "mcp", "--with", "websocket-client", "--with", "python-dotenv", "mcp", "run", "src/server.py:mcp" ] } } }
5.2 Docker 사용하기
download_image사용하여 로컬 폴더에 이미지를 다운로드하는 것은 Docker 컨테이너가 호스트 파일 시스템을 공유하지 않기 때문에 어려울 수 있습니다.Docker를 사용할 때 다음 사항을 고려하세요.
.env에서RETURN_URL=false설정하여 이미지 데이터를 바이트로 받습니다..env에서COMFYUI_HOST적절한 주소(예:host.docker.internal또는 서버의 IP)로 설정합니다.참고: 이진 데이터를 사용하면 대용량 이미지 페이로드가 응답 한도를 초과할 수 있습니다.
5.2.1 Docker 이미지 빌드
# First build image
docker image build -t mcp/comfyui .{
"mcpServers": {
"comfyui": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p",
"3001:3000",
"mcp/comfyui"
]
}
}
}5.2.2 기존 이미지 사용
미리 만들어진 이미지를 사용할 수도 있습니다.
{
"mcpServers": {
"comfyui": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p",
"3001:3000",
"overseer66/mcp-comfyui"
]
}
}
}5.2.3 SSE 전송 사용
Docker로 SSE 서버를 실행합니다.
docker run -i --rm -p 8001:8000 overseer66/mcp-comfyui-ssemcp.json구성합니다(필요한 경우 localhost를 IP 또는 도메인으로 변경합니다):{ "mcpServers": { "comfyui": { "url": "http://localhost:8001/sse" } } }
참고: 새로운 워크플로를 도구로 추가하는 경우 Docker 이미지를 다시 빌드하고 다시 배포해야 사용할 수 있습니다.
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
- AlicenseNot gradedqualityCmaintenanceA lightweight MCP server that bridges AI agents with a local ComfyUI instance to generate and iteratively refine images, audio, and video through conversational tool calls.41MIT
- FlicenseNot gradedqualityBmaintenanceMCP server that connects local ComfyUI to AI agents, enabling natural language control of ComfyUI for creating workflows, generating images, and managing the queue.
- AlicenseAqualityDmaintenanceMCP server that provides image generation, captioning, and tagging via ComfyUI API, configurable for agent tools.43MIT
- AlicenseAqualityCmaintenanceMCP server that lets OpenCode (or any MCP-compatible AI coding tool) directly control ComfyUI for AI image generation.142MIT
Related MCP Connectors
MCP server for Flux AI image generation
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
MCP server for NanoBanana AI image generation and editing
Appeared in Searches
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/Overseer66/comfyui-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server