ComfyUI

Exposes local ComfyUI workflows and the remote model catalog to MCP clients via stdio with configurable workflow directory and API base URL.
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "neutrinotek-comfyui_mcp": {
      "command": "uvx",
      "args": [
        "--from",
        ".",
        "comfyui-mcp",
        "--workflow-dir",
        "./workflows",
        "--api-base-url",
        "http://127.0.0.1:8188/"
      ],
      "env": {
        "COMFYUI_API_BASE_URL": "http://127.0.0.1:8188/",
        "COMFYUI_HTTP_TIMEOUT": "30",
        "COMFYUI_WORKFLOW_DIR": "./workflows",
        "COMFYUI_MCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

You run an MCP server that exposes local ComfyUI workflow files and the remote ComfyUI model catalog to compatible clients. It discovers workflow JSON files under a configured directory and provides tools to inspect, read, and query them, making it easy to integrate ComfyUI assets with large language models and automation workflows.

How to use

Start the MCP server to expose your ComfyUI workflows and model catalog to compatible clients. Use an MCP client to discover available workflows, read their contents, and query model-related endpoints to inspect checkpoints and assets.

How to install

Prerequisites you need before installing:

  • Python 3.8+ with access to pip for package installation

  • Optional: uvx for flexible runtime and local development

# Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # on macOS/Linux
venv\Scripts\activate     # on Windows

# Install the MCP server in editable mode
pip install -e .

# Alternatively, run without installing using uvx
uv pip install -e .

# Or run directly with uvx from the current directory
uvx --from . comfyui-mcp --help

Experimental runtime and configuration notes

Place your ComfyUI workflow files in a directory you configure (default: workflows/) so they are visible to the MCP server.

Configuration and runtime details

The MCP server can be configured either via command-line options or environment variables. The default workflow directory is a workflows folder in the project root. The server can also connect to the ComfyUI API base at a designated URL and apply a HTTP timeout and log level.

Run configuration example

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

Notes and tips

When launching from a local project, ensure your working directory is the repository root (or adjust the --from path) so the MCP runtime can resolve the comfyui-mcp package without publishing to an external index.

Troubleshooting

If the server fails to start, verify the configured workflow directory exists and contains valid workflow JSON files. Check network access to the ComfyUI API base URL and ensure the HTTP timeout is set to a reasonable value for your environment.

Security considerations

Limit access to the MCP server to trusted clients. Use network ACLs or secure channels where possible and avoid exposing the model catalog to untrusted networks without authentication. Regularly review the workflows directory for sensitive content.

Available tools

list_workflow_metadata

List metadata for all discovered workflows under the configured workflows directory.

read_workflow_contents

Read the full JSON contents of a specific workflow file.

query_models_api

Recursively query the ComfyUI /api/models endpoints to inspect available checkpoints, LoRAs, and other assets.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational