Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLogging verbosity: debug, info, warn, errorinfo
COMFYUI_URLNoFull ComfyUI URL, overrides host/port/ssl and skips auto-detection (use for remote ComfyUI)
COMFYUI_HOSTNoComfyUI server address127.0.0.1
COMFYUI_PATHNoPath to ComfyUI data directory (auto-detected if not set)
COMFYUI_PORTNoComfyUI server port (auto-detected if not set)
GITHUB_TOKENNoGitHub token for skill generation (avoids rate limits)
CIVITAI_API_TOKENNoCivitAI API token for model downloads
HUGGINGFACE_TOKENNoHuggingFace token for higher API rate limits

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
enqueue_workflowA

Submit a ComfyUI workflow for execution and return immediately with the prompt_id and queue position. Does not wait for completion. Use get_job_status to check progress later, or get_history to retrieve results and images after completion.

get_system_statsA

Get ComfyUI system information including GPU, VRAM, Python version, and OS details.

visualize_workflowA

Convert a ComfyUI workflow JSON into a Mermaid flowchart diagram. Returns mermaid syntax showing nodes grouped by category (loading, conditioning, sampling, image, output) with connections labeled by data type.

mermaid_to_workflowA

Convert a Mermaid flowchart diagram back into a ComfyUI workflow JSON. Parses node definitions, connections (with data type labels), and widget values from the mermaid syntax. Resolves node types and wires connections using ComfyUI's /object_info schemas. Fills missing inputs with defaults. Returns a valid, executable ComfyUI API workflow.

visualize_workflow_hierarchicalA

Visualize a large ComfyUI workflow as a hierarchical diagram. Detects logical sections using node categories from /object_info, resolves Get/Set virtual wires, and produces either a compact overview (sections as summary nodes), a detailed view of one section, or a text listing of all sections. Best for workflows with 20+ nodes.

create_workflowA

Create a ComfyUI workflow from a named template. Available templates: txt2img, img2img, upscale, inpaint, controlnet, ip_adapter. Returns the complete workflow JSON ready for execution or further modification.

modify_workflowA

Apply modification operations to an existing ComfyUI workflow. Supports: set_input, add_node, remove_node, connect, insert_between. Returns the modified workflow JSON and IDs of any newly added nodes.

get_node_infoA

Query ComfyUI's /object_info endpoint to get available node type definitions. Optionally filter by node type name (substring match). Returns node inputs, outputs, and descriptions.

validate_workflowA

Validate a ComfyUI workflow without executing it. Checks for missing node types, broken connections, invalid output indices, missing models, and other issues. Returns a list of errors and warnings.

get_queueA

Get the current ComfyUI execution queue showing running and pending jobs.

get_job_statusA

Check the execution status of a ComfyUI prompt/job by its ID.

cancel_jobA

Interrupt/cancel the currently running ComfyUI job. Optionally target a specific running job by prompt_id.

cancel_queued_jobA

Remove a specific pending job from the ComfyUI queue by prompt_id. Does not affect running jobs.

clear_queueA

Clear all pending jobs from the ComfyUI queue. Does not affect the currently running job.

search_custom_nodesB

Search the ComfyUI Registry for custom node packs by keyword

get_node_pack_detailsB

Get detailed information about a specific ComfyUI custom node pack from the Registry

search_modelsB

Search HuggingFace for models compatible with ComfyUI (checkpoints, LoRAs, VAEs, etc.)

download_modelA

Download a model file to the ComfyUI models directory from a URL (HuggingFace or direct link)

list_local_modelsA

List model files installed in the local ComfyUI models directory

generate_node_skillA

Analyze a ComfyUI custom node pack and generate a Claude skill (.md) file describing all its nodes, inputs/outputs, and usage examples. Accepts a ComfyUI Registry ID or a GitHub repository URL as the source.

get_logsB

Get ComfyUI server runtime logs. Useful for debugging execution errors, model loading issues, missing nodes, and Python tracebacks.

get_historyA

Get execution history for a ComfyUI prompt. Returns status, timing, cached nodes, output details, and full error information including Python tracebacks. Use after a failed enqueue_workflow to diagnose what went wrong.

list_workflowsA

List saved workflows from the ComfyUI user library.

get_workflowA

Load a saved workflow and return its raw JSON. Use analyze_workflow instead if you just need to understand the workflow — it returns a structured summary without flooding context with JSON. Use get_workflow only when you need the actual JSON for enqueue_workflow, modify_workflow, or save_workflow.

save_workflowB

Save a workflow to the ComfyUI user library so it appears in the web UI. Accepts either API format or UI format JSON.

analyze_workflowA

Load a saved workflow and return a structured analysis — sections, node settings, connections, and data flow. Use this to understand any workflow before modifying or executing it. Returns a concise text summary (not raw JSON) optimized for AI reasoning. Prefer this over get_workflow unless you need the raw JSON for enqueue_workflow or modify_workflow.

stop_comfyuiA

Stop the running ComfyUI process. Captures process info so it can be restarted with start_comfyui. Kills the process tree and resets the WebSocket client.

start_comfyuiA

Start ComfyUI using process info saved from a previous stop_comfyui call. Supports both Desktop app and manual Python installs. Waits up to 60s for the API to become ready.

restart_comfyuiA

Restart ComfyUI: stops the running process (capturing its config), waits for the port to free, relaunches with the same arguments, and waits for the API to become ready.

get_imageA

Fetch a generated image from ComfyUI and return it as an inline image. Works with remote ComfyUI instances — does not require COMFYUI_PATH. Use get_history first to obtain the filename.

upload_imageA

Upload a local image file to ComfyUI's input/ directory so it can be referenced in LoadImage nodes. Tries HTTP upload first (works with remote ComfyUI), falls back to filesystem copy when COMFYUI_PATH is set.

workflow_from_imageB

Extract embedded ComfyUI workflow metadata from a PNG file. ComfyUI stores the full workflow (API format) and prompt data in PNG tEXt chunks. Use this to reverse-engineer how any ComfyUI image was generated.

list_output_imagesA

List recently generated images from ComfyUI's output directory. Returns filenames sorted newest-first. Requires COMFYUI_PATH. For remote ComfyUI, use get_history to find filenames, then get_image to fetch them.

clear_vramA

Free GPU VRAM by unloading cached models from ComfyUI. Use this between generation runs with different model families (e.g. switching from SDXL to Flux) or when running low on VRAM. Optionally unload only models or only memory.

get_embeddingsA

List installed textual inversion embeddings. These can be used in prompts with the syntax embedding:name (e.g. embedding:easynegative).

suggest_settingsA

Suggest proven sampler/scheduler/steps/CFG settings based on local generation history. Query by model family, LoRA hash, or text search on model/LoRA names.

generation_statsA

Show local generation tracking statistics — total runs, unique combos, breakdown by model family.

view_imageA

Fetch a registered asset's bytes and return them as an inline image so the agent can see the result. Use this after enqueue_workflow completes (asset_id is included in the completion notification) to inspect, critique, or compare generated images. Only supports image mime types (PNG/JPEG/WebP); audio/video assets must be saved to disk via get_image.

list_assetsA

List recently generated assets from the in-memory registry, newest-first. Assets are registered automatically when a workflow completes successfully. The registry is ephemeral and clears on server restart; records expire after COMFYUI_ASSET_TTL_HOURS (default 24h).

get_asset_metadataA

Get full provenance for a registered asset including the workflow snapshot that produced it. Use this to inspect the parameters that generated an image before calling regenerate with overrides.

regenerateA

Re-enqueue the workflow that produced an existing asset, optionally applying parameter overrides. Overrides are applied to any node input matching the key name (e.g. cfg, steps, sampler_name, scheduler, seed, denoise, text). Seeds are re-randomized by default so each regenerate yields a fresh image unless seed is explicitly passed in overrides.

get_defaultsA

Return the merged view of generation defaults with per-source attribution. Precedence (lowest → highest): config file → COMFYUI_DEFAULT_* env vars → runtime overrides via set_defaults. Per-call MCP tool args always win over these defaults when consumed by a workflow-construction tool.

set_defaultsA

Update generation defaults. By default updates the in-memory runtime layer (lost on restart). Pass persist=true to also write the change into the config file (~/.config/comfyui-mcp/config.json by default). Use this to avoid repeating common values like width, height, steps, cfg, sampler, checkpoint.

generate_imageA

Generate an image from a text prompt — the high-level entry point. Builds a txt2img workflow, filling any unspecified parameter from your configured defaults (set_defaults / COMFYUI_DEFAULT_* / config file), auto-selecting a local checkpoint when none is given. Returns the prompt_id immediately; the resulting asset_id arrives in the completion notification and can be passed to view_image or regenerate. For full control over the node graph, use create_workflow + enqueue_workflow instead.

generate_with_controlnetA

Generate an image conditioned by a ControlNet preprocessed image (pose skeleton, depth, canny, normal, etc.) plus a text prompt. Upload the control image first with upload_image, then pass its filename as control_image. Unspecified params fall back to your defaults; checkpoint and controlnet_model auto-resolve from local models. Returns prompt_id immediately; asset_id arrives in the completion notification.

generate_with_ip_adapterA

Generate an image guided by a reference image's style/subject via IP-Adapter, plus a text prompt. Requires the ComfyUI_IPAdapter_plus custom nodes. Upload the reference first with upload_image, then pass its filename as reference_image. Unspecified params fall back to your defaults; checkpoint auto-resolves. Returns prompt_id immediately; asset_id arrives in the completion notification.

workflow_to_dslA

Convert a ComfyUI API-format workflow into a compact, human/LLM-readable DSL — easier to read and edit than raw JSON, and round-trips losslessly back via dsl_to_workflow. Connections render as key <- nodeId.outputIndex, literals as key = <JSON>. (Experimental.)

dsl_to_workflowA

Convert the compact workflow DSL (see workflow_to_dsl) back into executable ComfyUI API-format JSON. Useful for authoring/editing workflows in the legible DSL, then converting to run with enqueue_workflow. (Experimental.)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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

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