Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
COMFYUI_URLNoBase URL of your ComfyUI instance.http://127.0.0.1:8188
COMFYUI_WORKFLOW_DIRNoDirectory containing workflow.json.<repo_root>/workflow_files (relative to dist/index.js)
COMFYUI_DEFAULT_LORASNoComma-separated name:strength pairs applied when a request omits loras (e.g. pixel-art-flux.safetensors:0.8). Pass loras: [] in a request to override.
COMFYUI_MCP_HTTP_PORTNoPort for the built-in HTTP image proxy server.8190
COMFYUI_IMAGE_CACHE_DIRNoDirectory for caching downloaded images.~/.cache/comfyui-mcp
COMFYUI_RANDOMIZE_SEEDSNoEnable/disable automatic seed randomization for varied results. Set to 'false' to disable.true
COMFYUI_POLL_INTERVAL_MSNoInterval (ms) between ComfyUI completion checks while blocking in wait: true mode.2000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
comfyui_generate_imageA

Generate, modify, or post-process images using ComfyUI. Three modes (auto-detected):

  • txt2img: Provide prompt → generates image from text

  • img2img: Provide prompt + image_path → edits the reference image using Flux 2 Klein's native edit pattern (ReferenceLatent + CFGGuider), which preserves character/subject identity far better than classic denoise-based img2img. Best results at ~1MP references; 128×128 inputs will be upscaled before encoding.

  • post-process: Provide image_path without prompt → resize and/or remove background only

By default, returns immediately with a prompt_id and status 'queued'. Use comfyui_get_image to poll for completion and retrieve image URLs. Set wait: true to block until the image is ready (or fails/times out) and get image URLs directly in the response.

Parameters:

  • prompt (string, optional): Text description of desired image

  • negative_prompt (string, optional): What to avoid in the image

  • image_path (string, optional): Absolute path to input image (triggers img2img or post-process)

  • width/height (int, optional): Target output dimensions (triggers resize post-processing)

  • remove_background (boolean, optional): Remove background from output image

  • loras (array, optional, max 4): LoRA stack. Each entry: { name, strength_model (-2..2, default 1.0), strength_clip (optional, defaults to strength_model) }. Omit to fall back to COMFYUI_DEFAULT_LORAS env (if set). Pass [] to explicitly disable defaults. Use comfyui_list_loras to discover available names.

  • wait (boolean, optional, default false): Block until image is ready and return URLs directly

Must provide at least prompt or image_path.

comfyui_get_imageA

Retrieve image URLs for a previously queued job by prompt_id. Use this to poll for completion after calling comfyui_generate_image (default non-blocking mode). Returns status (pending/executing/completed/failed/not_found) and image URLs when ready.

comfyui_list_lorasA

List available LoRA files on the ComfyUI server (reads the LoraLoader node enum from /object_info). Returns { loras: string[] } of filenames you can pass to comfyui_generate_image via the loras parameter.

comfyui_get_request_historyC

List past image generation requests with current status.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation4/5

The submit/poll split between comfyui_generate_image and comfyui_get_image is clear, and list_loras is unmistakably distinct. The only mild overlap is between comfyui_get_image (status+URLs by prompt_id) and comfyui_get_request_history (list of past requests with status), which could be confused when an agent just wants to check on a job.

Naming Consistency5/5

All four tools share the comfyui_ prefix and a clean verb_noun pattern (generate_image, get_image, list_loras, get_request_history). Naming is predictable and readable, with no mixed casing or verb styles.

Tool Count4/5

Four tools is a reasonable, well-scoped surface for an image-generation server, with each tool earning its place. It is on the lean side, and the fact that three distinct modes (txt2img, img2img, post-process) are collapsed into a single generate tool suggests some functionality is packed rather than expanded.

Completeness3/5

The core lifecycle (submit → poll → retrieve URLs) plus LoRA discovery and history is covered. However, there is no cancellation/interrupt tool for queued jobs, no way to list checkpoints/models/samplers, and no explicit seed or batch parameters documented, which will cause dead ends for common workflows.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues