Skip to main content
Glama

ComfyUI_MCP

This repository provides a Model Context Protocol (MCP) server that exposes local ComfyUI workflow files and the remote ComfyUI model catalog to compatible LLM clients.

Features

  • Discovers workflow .json files stored under the workflows/ directory and exposes them as MCP resources.

  • Tools for listing workflow metadata and reading workflow contents.

  • Tool for recursively querying the ComfyUI /api/models endpoints so an LLM can inspect the available checkpoints, LoRAs, and other assets.

  • Configuration via CLI arguments or environment variables so the server can be launched from JSON descriptors (e.g., Cursor MCP definitions).

Related MCP server: ComfyUI MCP Server

Installation

Create a virtual environment (recommended) and install the package in editable mode with your preferred installer:

pip install -e .

The project also works with uv so you can install or run it without using pip directly:

uv pip install -e .

# or run without installing into the current environment
uvx --from . comfyui-mcp --help

Running the server

The installed comfyui-mcp entry point launches the MCP server over stdio. Common configuration options can be supplied either as CLI flags or environment variables:

Purpose

CLI flag

Environment variable

Default

Workflow directory

--workflow-dir

COMFYUI_WORKFLOW_DIR

<repo>/workflows

ComfyUI API base URL

--api-base-url

COMFYUI_API_BASE_URL

http://127.0.0.1:8188/

HTTP timeout (seconds)

--http-timeout

COMFYUI_HTTP_TIMEOUT

30

Log level

--log-level

COMFYUI_MCP_LOG_LEVEL

INFO

Example stdio launch configuration for a Cursor MCP JSON definition:

If you prefer uvx, the same configuration can be expressed as:

{
  "comfyui": {
    "command": "uvx",
    "args": [
      "--from",
      ".",
      "comfyui-mcp",
      "--workflow-dir",
      "./workflows",
      "--api-base-url",
      "http://127.0.0.1:8188/"
    ]
  }
}

When referencing the project locally with uvx, ensure the working directory is set to the repository root (or adjust the --from path accordingly) so the package can be resolved without requiring it to be published to an external index.

Place your ComfyUI workflow files in the workflows/ directory (or whatever directory you configure) so they are available to the LLM.

Available Tools

3 tools
list_modelsB

List models exposed by the configured ComfyUI server using the object info endpoints. Specify a kind to get a flat list or use recursive mode to aggregate multiple kinds.

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNo
recursiveNo
searchNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions using 'object info endpoints' and the effect of 'recursive mode', but it lacks details on permissions, rate limits, error handling, or what the output looks like (though an output schema exists). This leaves significant gaps for a tool with 3 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, consisting of two sentences that directly address the tool's functionality and parameter usage without any wasted words. Every sentence adds value, making it efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters with 0% schema coverage and an output schema exists, the description provides basic context on what the tool does and some parameter usage. However, it lacks details on behavioral aspects like permissions or error handling, and does not fully explain all parameters, making it minimally adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the purpose of 'kind' (to get a flat list) and 'recursive' (to aggregate multiple kinds), adding some meaning beyond the schema. However, it does not cover the 'search' parameter at all, and the explanations are brief without details on allowed values or examples, failing to fully compensate for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List models') and resource ('exposed by the configured ComfyUI server using the object info endpoints'), making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'list_workflows' or 'read_workflow', which prevents a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage by explaining how to use 'kind' and 'recursive' parameters to get different types of lists, but it does not explicitly state when to use this tool versus alternatives like 'list_workflows' or 'read_workflow', nor does it mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_workflowsB

List all ComfyUI workflow files that are available on disk.

ParametersJSON Schema
NameRequiredDescriptionDefault
include_previewNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'available on disk', hinting at a read operation, but does not disclose behavioral traits such as permissions needed, rate limits, error handling, or what 'list' entails (e.g., format, pagination). The description is minimal and lacks critical operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is front-loaded with the main purpose and efficiently conveys the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema, the description does not need to explain return values. However, with no annotations and low schema coverage, it lacks details on behavior and parameters. The description is adequate for a simple list operation but misses context on usage and transparency, making it minimally viable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does not mention the 'include_preview' parameter at all, but since there is only one optional parameter, the baseline is high. The description focuses on the core action, but fails to explain parameter usage, resulting in a slight deduction from the ideal.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'list' and the resource 'ComfyUI workflow files', specifying they are 'available on disk'. It distinguishes from 'read_workflow' by indicating listing vs reading content, but does not explicitly differentiate from 'list_models' beyond the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like 'list_models' or 'read_workflow'. The description implies usage for listing files on disk, but lacks context on prerequisites, exclusions, or comparative scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_workflowB

Read a specific workflow file by its relative path inside the configured workflow directory.

ParametersJSON Schema
NameRequiredDescriptionDefault
relative_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool reads a file, implying a read-only operation, but doesn't specify permissions required, error handling (e.g., if the path doesn't exist), or any side effects. This is a significant gap for a tool that accesses files, lacking details on safety or constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose and key parameter context. It's front-loaded with essential information and has no wasted words, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which likely describes the returned workflow file content), the description doesn't need to explain return values. However, with no annotations and a simple parameter, it adequately covers the basic operation but lacks behavioral details like error handling or permissions, making it minimally viable but with gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, but the description adds meaning by explaining that 'relative_path' refers to a path 'inside the configured workflow directory'. This clarifies the parameter's context beyond the schema's basic string type. However, it doesn't detail format examples or constraints, so it partially compensates but not fully, aligning with the baseline expectation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Read') and resource ('a specific workflow file'), specifying it's identified by 'relative path inside the configured workflow directory'. This distinguishes it from sibling tools like 'list_workflows' which presumably list workflows rather than read individual files. However, it doesn't explicitly contrast with siblings, keeping it at 4 instead of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list_workflows' or 'list_models'. It mentions the context ('configured workflow directory') but offers no explicit when/when-not instructions or prerequisites, leaving usage unclear beyond the basic operation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updates
    • First observedlist_models
    • First observedlist_workflows
    • First observedread_workflow

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: list_models handles model enumeration, list_workflows lists workflow files, and read_workflow reads specific workflow content. There is no overlap or ambiguity between these functions, making tool selection straightforward for an agent.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case naming: list_models, list_workflows, and read_workflow. This uniformity makes the tool set predictable and easy to understand at a glance.

Tool Count3/5

With only 3 tools, the server feels thin for a ComfyUI integration, which typically involves more operations like executing workflows, managing nodes, or handling images. While the tools are well-defined, the count is borderline low for the apparent scope of interacting with a workflow automation system.

Completeness2/5

The tool set has significant gaps for a ComfyUI server, missing core operations such as executing workflows, uploading or managing models, and handling generated outputs. This incomplete surface will likely cause agent failures when trying to perform typical ComfyUI tasks beyond basic listing and reading.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/neutrinotek/ComfyUI_MCP'

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