Skip to main content
Glama

Comfy Local MCP

Windows-native MCP server for a local ComfyUI portable package. It talks to ComfyUI over its loopback HTTP API and runs with the portable package's own python_embeded\python.exe; no virtual environment is required.

Portable layout

The MCP package is expected to be placed next to the portable package folders:

ComfyUI_windows_portable\
  ComfyUI\
  python_embeded\
  comfy-local-mcp\

The installer also accepts an explicit -PortableRoot when the MCP package is stored elsewhere.

Related MCP server: ComfyUI MCP

Install

From PowerShell, run install.ps1 in the extracted package directory:

.\install.ps1 -PortableRoot "F:\ComfyUI_windows_portable" -RegisterCodex

The installer:

  • uses ComfyUI\..\python_embeded\python.exe directly;

  • installs the pinned MCP dependency into this package's vendor directory;

  • copies bundled API-format workflows into ComfyUI\user\default\workflows;

  • uses ComfyUI\output as the output directory;

  • optionally registers the MCP server with Codex.

No files are installed into ComfyUI's python_embeded\Lib\site-packages.

Runtime configuration

  • COMFYUI_URL: loopback ComfyUI URL, default http://127.0.0.1:8188.

  • COMFY_PORTABLE_ROOT: portable root containing sibling ComfyUI and python_embeded directories.

  • COMFYUI_ROOT: optional explicit ComfyUI directory.

  • COMFY_MCP_WORKFLOW_ROOT: defaults to ComfyUI\user\default\workflows.

  • COMFY_MCP_OUTPUT_ROOT: defaults to ComfyUI\output.

  • COMFY_MCP_ALLOWED_ROOTS: semicolon-separated workflow/output roots.

The MCP tools list_workflows and save_workflow operate in the configured workflow directory. validate_workflow and run_workflow accept either an absolute path inside that directory or a workflow filename.

Build a Release

From the repository root:

.\tools\comfy_local_mcp\build_release.ps1 -Version "0.1.0"

The generated archive is written to dist\comfy-local-mcp-0.1.0.zip.

Notes

ComfyUI must be running before calling server_info, validate_workflow, or run_workflow. Models and custom nodes remain customer-local; the MCP package does not download or share model weights.

Related MCP Connectors

Related MCP Servers