Comfyui MCP Server

2. Configure `mcp.json` (change localhost to your IP or domain if needed):

Local serverstdioPython

What is the Comfyui MCP server?

Comfyui mcp server connects Comfyui to AI assistants that speak the Model Context Protocol. 2. Configure mcp.json (change localhost to your IP or domain if needed):.

What Comfyui does

  1. Configure mcp.json (change localhost to your IP or domain if needed):

Tools it exposes

Once connected, the assistant can call these 4 tools directly:

  • text_to_image — Returns only the URL of the generated image
  • download_image — Downloads images generated by other tools (like text_to_image) using the image URL
  • run_workflow_with_file — Run a workflow by providing the path to a workflow JSON file
  • run_workflow_with_json — Run a workflow by providing the workflow JSON data directly

Installing the comfyui mcp server

The server is distributed via a container image as overseer66/mcp-comfyui-sse, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 2 environment variables: COMFYUI_HOST, RETURN_URL. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Comfyui sits in that group, and the shape of its toolset — text_to_image, download_image, run_workflow_with_file among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by Overseer66, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the comfyui mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
text_to_imageReturns only the URL of the generated image.
download_imageDownloads images generated by other tools (like text_to_image) using the image URL.
run_workflow_with_fileRun a workflow by providing the path to a workflow JSON file.
run_workflow_with_jsonRun a workflow by providing the workflow JSON data directly.

How to install the Comfyui MCP server

```json
  {
    "mcpServers": {
      "comfyui": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-p",
          "3001:3000",
          "mcp/comfyui"
        ]
      }
    }
  }

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
COMFYUI_HOSTEndpoint or connection string the server talks to.Optional
RETURN_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Comfyui to text to image.
  • Use Comfyui to download image.
  • Use Comfyui to run workflow with file.

Frequently asked questions

It connects Comfyui to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (text_to_image, download_image, run_workflow_with_file, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Comfyui directly.