Skip to main content
Glama

ComfyUI MCP Server

An MCP server for interacting with ComfyUI instances running on your local network. This server provides tools for generating images and checking generation status through ComfyUI's API.

Installation

  1. Clone this repository

  2. Install dependencies:

npm install
  1. Build the server:

npm run build

Related MCP server: comfyui-mcp

Configuration

The server requires the following environment variables:

  • COMFYUI_SERVER_URL (optional): The URL of your ComfyUI instance. Defaults to http://127.0.0.1:8188

MCP Tools

generate_image

Generates an image using a ComfyUI workflow.

Parameters:

  • workflow (required): A ComfyUI workflow JSON object

  • wait (optional): Whether to wait for the image generation to complete. Defaults to true

Example:

const result = await mcp.useTool('comfyui-server', 'generate_image', {
  workflow: {
    "3": {
      "inputs": {
        "seed": 5,
        "steps": 20,
        "cfg": 8,
        "sampler_name": "euler",
        "scheduler": "normal",
        "denoise": 1,
        "model": ["4", 0],
        "positive": ["6", 0],
        "negative": ["7", 0],
        "latent_image": ["5", 0]
      },
      "class_type": "KSampler"
    },
    // ... rest of your workflow
  }
});

Returns:

{
  "promptId": "abc123",
  "imagePath": "temp/ComfyUI_00042.png"
}

check_status

Check the status of a prompt.

Parameters:

  • promptId (required): The prompt ID to check

Example:

const status = await mcp.useTool('comfyui-server', 'check_status', {
  promptId: "abc123"
});

Returns:

{
  "status": {
    "completed": true,
    "executing": false
  },
  "hasImages": true
}

Development

To run the server in development mode with automatic reloading:

npm run dev

Notes

  • Generated images are saved in a temp directory in the current working directory

  • The server will automatically clean up old images on startup

  • Requests will timeout after 5 minutes if the image generation doesn't complete

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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/a-misen/mcp-comfyui'

If you have feedback or need assistance with the MCP directory API, please join our Discord server