ComfyUI MCP/REST Gateway
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ComfyUI MCP/REST GatewayGenerate an image of a cyberpunk city at night and show me the results."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dsh-comfyui
Operate ComfyUI from DSH chat, review generated images, and adjust workflows in the same window. This plugin bundles a dedicated ComfyUI Operator, the Studio side panel, and a self-hosted MCP/REST Gateway that supports OAuth connections. You will need a working ComfyUI installation and models separately.
Discuss a result or the next adjustment in chat while reviewing images in the right-hand panel.

Use the mouse wheel to zoom the API Graph and drag empty space to pan. Input fields are generated from the connected ComfyUI instance's node definitions, allowing you to adjust prompts, seeds, dimensions, and other parameters.


The screenshots show one example environment. GPU name, VRAM, and ComfyUI version come from the connected ComfyUI instance. Models are selected through your configuration or workflow. Bundling the Gateway does not automatically update or start an existing server.
Location | Purpose |
| Operator, Studio, and the DSH MCP bridge |
| Python Gateway connecting to ComfyUI |
| Regression tests that do not require a GPU |
Install in DSH
npm ci
npm run build
# Connect to an existing remote Gateway
npm run connection -- --url https://YOUR-GATEWAY/mcp
npm run login
npm run verify
# Add the plugin to your DSH profile
~/.local/bin/dsh plugin --profile desktop add "$PWD"The default endpoint is http://127.0.0.1:8790/mcp. Connection settings are stored in
~/.dsh/dsh-comfyui/connection.json. HTTPS and loopback-only HTTP are supported.
Override settings with DSH_COMFYUI_MCP_URL, DSH_COMFYUI_AUTH_DIR, or DSH_COMFYUI_NODE.
The bridge uses mcp-remote for the Gateway's existing OAuth flow; no embedded Service Token is required.
Select ComfyUI Operator in DSH to use the Studio panel for results, the API Graph, and node-definition-driven input editing. Zoom with the mouse wheel and pan by dragging empty space. The agent can read a browser draft only after you explicitly share it. Generation and saving use a shared action path with request-ID deduplication and reconciliation of uncertain submissions. History, previews, and finalized submission records have count and/or size limits. Pruning history never makes an unresolved operation safe to resend.
Related MCP server: Universe Imagine MCP
Run the bundled Gateway
Install Python 3.12 or later and uv on the GPU machine, then follow the Gateway guide.
uv sync --project gateway
mkdir -p "$HOME/.config/dsh-comfyui"
cp gateway/.env.example "$HOME/.config/dsh-comfyui/gateway.env"
chmod 600 "$HOME/.config/dsh-comfyui/gateway.env"
# Edit COMFY_URL, Access settings, and allowed users
export DSH_COMFYUI_GATEWAY_ENV_FILE="$HOME/.config/dsh-comfyui/gateway.env"
npm run gateway:check
npm run gatewayBy default, the Gateway listens on 127.0.0.1:8790 and rejects MCP/REST access when authentication is not configured.
For loopback development only, use GW_DEV_NO_AUTH=1 npm run gateway.
Cloudflare Access OAuth exposure must be configured separately; the Gateway itself is not an OAuth authorization server.
MCP is available at /mcp and REST at /api/*. Saving over an existing workflow requires explicit overwrite:true.
npm run verify:discovery # Initialize and list tools without querying the GPU
npm test # Plugin and Gateway regression testsDistribution
Keep connection settings, authentication, and runtime data outside the repository. See configuration. To prepare a clean source distribution, export only the allowlisted files without Git history.
npm run release:check
npm run release:export -- /absolute/path/to/dsh-comfyui-publicThe export excludes Git history, personal settings, authentication caches, runtime images, logs, and installed dependencies. It stops if the destination already exists. It does not publish to GitHub or npm.
Licensed under MIT. See NOTICE and prior art for third-party attribution and licenses. ComfyUI, models, and custom nodes have their own licenses.
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Official Fibery MCP server: query and update your workspace from any AI client via OAuth.
Generate AI images and videos from any compatible MCP client.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal-first MCP server for controlling a loopback ComfyUI instance from same-machine or authenticated LAN clients.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI image generation from text prompts by wrapping local ComfyUI as a Streamable HTTP MCP server, supporting synchronous generation, queue management, and history tracking.1MIT
- AlicenseAqualityAmaintenanceMCP server that connects an AI assistant to a running ComfyUI instance, allowing it to fetch saved workflows, inject a prompt and seed, run generation, and return the image inline in chat.21GPL 3.0
- AlicenseNot gradedqualityBmaintenanceTurns curated ComfyUI workflows into typed MCP tools and REST endpoints, enabling image generation and job management through natural language or HTTP calls.1MIT