Enable it
Turn on Enable MCP in Agent Settings. The endpoint is:project value in the ComfyArt URL. Canvas tools are executed by the open ComfyArt tab of that project, so keep it open while the agent works. Without ?project, commands go to the only open project; with several projects open the call fails and asks for one.
The server uses the streamable HTTP transport with plain JSON responses (no SSE stream). Replace 127.0.0.1:8188 if ComfyUI listens elsewhere.
Connect an agent
wait_generation can block for about three minutes while a job runs, so give the client a tool timeout of several minutes. The examples below use 10 minutes.
Claude Code
MCP_TOOL_TIMEOUT=600000 set in the environment to allow long waits. Run /mcp inside Claude Code to check that comfyart is connected.
Codex
~/.codex/config.toml, since the default is shorter than a generation:
Gemini CLI and Qwen Code
Add the server to~/.gemini/settings.json (Gemini CLI) or ~/.qwen/settings.json (Qwen Code):
gemini mcp add --transport http comfyart <url> and qwen mcp add --transport http comfyart <url> write the same entry. Run /mcp inside either CLI to list the tools.
Cursor
In~/.cursor/mcp.json, or .cursor/mcp.json in a project:
VS Code (GitHub Copilot agent mode)
In.vscode/mcp.json:
Claude Desktop
Claude Desktop’s config file starts local commands, so bridge the HTTP server with mcp-remote (needs Node.js). Inclaude_desktop_config.json:
Your own agent
Any program can call the tools with JSON-RPC 2.0 overPOST. Each request gets one JSON response:
content holds a text block with the tool’s JSON output, plus image blocks for tools like view_canvas. isError: true means the tool failed. MCP SDKs connect with their streamable HTTP client.
A typical session
get_canvasto see what is on the page.list_modelsto pick a model, thengenerate_imageorgenerate_video. Both return ids at once.wait_generationwith those ids. When itsstatusisrunning, call it again with the same ids; whendone, check each item, since one can still beerror.view_canvasto look at the result, then edit it with the image tools or lay it out withadd_text,create_frameandupdate_shapes.
Tools
tools/list returns every tool’s input schema. Inside built-in Agent chats the agent also gets a tool to ask you multiple-choice questions.
Run workflows without the canvas
Every ComfyArt action is an API-format workflow in theworkflows/ folder. To run one without a canvas, submit it to ComfyUI’s own POST /prompt after setting its prompt, models and seed, or let an agent do it through the official comfy-mcp server, which runs workflows, waits for them and fetches the outputs. Results of these runs stay in ComfyUI’s output/ folder and are not added to a canvas.
The MCP server is part of your local ComfyUI and has no login of its own. Anyone who can reach your ComfyUI port can use it, so keep ComfyUI on localhost or a trusted network when MCP is on.