Skip to main content
Glama

ComfyUI MCP Server

by neutrinotek
README.md1.99 kB
# ComfyUI_MCP An experimental Model Context Protocol (MCP) server that orchestrates [ComfyUI](https://github.com/comfyanonymous/ComfyUI) workflows. It discovers workflow templates, applies high-level mutations, submits prompts to a running ComfyUI instance, and offers lightweight tooling for local experimentation. ## Quick Start 1. Create a configuration file (see [`config.example.toml`](./config.example.toml)) and update the ComfyUI base URL plus any asset directories you keep on disk. 2. Install the package in editable mode: ```bash pip install -e . ``` 3. Interact with the helper CLI: ```bash # List available workflow templates comfyui-mcp list --json # Describe a specific workflow comfyui-mcp describe basic_workflow --json # Inspect discovered checkpoints/LoRAs/VAEs comfyui-mcp assets --json ``` You can override configuration values at runtime without editing the TOML file. For example: ```bash comfyui-mcp list --base-url http://localhost:8188 --workflows-path ~/custom-workflows \ --directory checkpoints=~/models/StableDiffusion --json ``` 4. Launch the MCP server runtime using FastMCP: ```bash comfyui-mcp-serve --config path/to/config.toml --transport stdio ``` The runtime exposes tools for listing, describing, customising, and executing workflows. Choose `--transport streamable-http` if you need an HTTP endpoint rather than stdio. 5. To integrate with MCP-compatible IDEs (e.g., Cursor), copy [`mcp.json`](./mcp.json) into the location they expect and adjust the configuration path or transport as needed. The file declares the stdio command to launch `comfyui-mcp-serve`, making it easy for third-party clients to connect. The server loads workflow templates from the `workflows/` directory by default and scans configured asset directories (checkpoints, LoRAs, VAEs, text encoders, embeddings). Asset validation helps catch typos before submitting prompts to ComfyUI.

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