JC

joenorton/comfyui-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

411 stars 87 forks 품질 71 트렌드 19Apache-2.0

로컬 ComfyUI용 경량 Python 기반 MCP(모델 컨텍스트 프로토콜) 서버

개요

자연스러운 대화를 통해 AI 이미지/오디오/비디오를 생성하고 다듬으세요 AI 에이전트가 로컬 ComfyUI 인스턴스를 사용해 이미지, 오디오, 비디오를 반복적으로 생성하고 다듬을 수 있게 해주는 경량 MCP(모델 컨텍스트 프로토콜) 서버입니다. 서버를 실행하고, 클라이언트를 연결하며, 툴 호출을 실행하면 됩니다. 나머지는 선택적 깊이 설정입니다. ComfyUI가 설치되어 있고 로컬에서 실행되는지 꼭 확인하세요. * MCP 서버에 접속 * 사용 가능한 도구 목록 * 서버 기본값(너비, 높이, 단계, 모델 등) 가져오기 및 표시 * 프롬프트(또는 기본값)와 함께 generate_image 실행하기 * 다른 모든 매개변수에 대해 서버 기본값을 자동으로 사용함 * 결과 자산 정보를 출력하기 이 단계가 성공한다면, 시스템은 제대로 작동하고 있는 것입니다. 테스트 클라이언트는 설정 파일, 환경 변수 또는 set_defaults 호출을 통해 설정된 서버 기본값을 준수합니다. 프롬프트 매개변수만 필요합니다; 다른 모든 매개변수는 자동으로 서버 기본값을 사용합니다. 서버가 실행되면 AI 클라이언트에 연결할 수 있습니다.

개요(AI 번역)

자연스러운 대화를 통해 AI 이미지/오디오/비디오를 생성하고 다듬습니다

AI 에이전트가 로컬 ComfyUI 인스턴스를 사용해 이미지, 오디오, 비디오를 반복적으로 생성하고 다듬을 수 있게 해주는 경량 MCP(모델 컨텍스트 프로토콜) 서버입니다.

서버를 실행하고, 클라이언트를 연결하며, 툴 호출을 실행하면 됩니다. 나머지는 선택적 깊이 설정입니다.


퀵 스타트 (2–3분)

이것은 모든 것이 잘 작동하고 있다는 증거입니다.

1) 복제 및 설치

2) 편안한 UI 시작

ComfyUI가 설치되어 있고 로컬에서 실행되는지 꼭 확인하세요.

3) MCP 서버를 실행하세요

저장소 디렉터리에서:

서버는 다음에서 청취합니다:

4) 작동하는지 확인하세요 (AI 클라이언트 필요 없음)

포함된 테스트 클라이언트를 실행하세요:

test_client.py는 다음을 할 것입니다:

  • MCP 서버에 접속
  • 사용 가능한 도구 목록
  • 가져오기 및 디스플레이 서버 기본값(너비, 높이, 단계, 모델 등)
  • 프롬프트(또는 기본값)로 generate_image 실행하기.
  • 다른 모든 매개변수에 대해 자동으로 서버 기본값을 사용합니다
  • 결과 자산 정보를 출력합니다

이 단계가 성공한다면, 시스템은 제대로 작동하고 있는 것입니다.

참고: 테스트 클라이언트는 설정 파일, 환경 변수 또는 set_defaults 호출을 통해 설정된 서버 기본값을 준수합니다.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

ComfyUI MCP Server

Generate and refine AI images/audio/video through natural conversation

A lightweight MCP (Model Context Protocol) server that lets AI agents generate and iteratively refine images, audio, and video using a local ComfyUI instance.

You run the server, connect a client, and issue tool calls. Everything else is optional depth.


Quick Start (2–3 minutes)

This proves everything is working.

1) Clone and set up

git clone https://github.com/joenorton/comfyui-mcp-server.git
cd comfyui-mcp-server
pip install -r requirements.txt

2) Start ComfyUI

Make sure ComfyUI is installed and running locally.

cd 
python main.py --port 8188

3) Run the MCP server

From the repository directory:

python server.py

The server listens at:

http://127.0.0.1:9000/mcp

4) Verify it works (no AI client required)

Run the included test client:

# Use default prompt
python test_client.py

# Or provide your own prompt
python test_client.py -p "a beautiful sunset over mountains"
python test_client.py --prompt "a cat on a mat"

test_client.py will:

  • connect to the MCP server
  • list available tools
  • fetch and display server defaults (width, height, steps, model, etc.)
  • run generate_image with your prompt (or a default)
  • automatically use server defaults for all other parameters
  • print the resulting asset information

If this step succeeds, the system is working.

Note: The test client respects server defaults configured via config files, environment variables, or set_defaults calls. Only the prompt parameter is required; all other parameters use server defaults automatically.

That’s it.


Use with an AI Agent (Cursor / Claude / n8n)

Once the server is running, you can connect it to an AI client.

Create a project-scoped .mcp.json file:

{
  "mcpServers": {
    "comfyui-mcp-server": {
      "type": "streamable-http",
      "url": "http://127.0.0.1:9000/mcp"
    }
  }
}

Note: Some clients use "type": "http" instead of "streamable-http". Both work with this server. If auto-discovery doesn’t work, try changing the type field.

Restart your AI client. You can now call tools such as:

  • generate_image
  • view_image
  • regenerate
  • get_job
  • list_assets

This is the primary intended usage mode.


What You Can Do After It Works

Once you’ve confirmed the server runs and a client can connect, the system supports:

  • Iterative refinement via regenerate (no re-prompting)
  • Explicit asset identity for reliable follow-ups
  • Job polling and cancellation for long-running generations
  • Optional image injection into the AI’s context (view_image)
  • Auto-discovered ComfyUI workflows with parameter exposure
  • Configurable defaults to avoid repeating common settings

Everything below builds on the same basic loop you just tested.

Migration Notes (Previous Versions)

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "comfyui-mcp-server": { "type": "streamable-http", "url": "http://127.0.0.1:9000/mcp" } } }