Skip to main content
ComfyArt serves an MCP server over HTTP. The built-in Agent uses it, and any other agent that speaks MCP can use the same tools: look at the canvas, generate and edit images, videos, audio and 3D models, and place text, shapes, frames and slides.

Enable it

Turn on Enable MCP in Agent Settings. The endpoint is:
The project id is the 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

Start Claude Code with MCP_TOOL_TIMEOUT=600000 set in the environment to allow long waits. Run /mcp inside Claude Code to check that comfyart is connected.

Codex

Then raise the tool timeout in ~/.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). In claude_desktop_config.json:

Your own agent

Any program can call the tools with JSON-RPC 2.0 over POST. Each request gets one JSON response:
The result’s 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

  1. get_canvas to see what is on the page.
  2. list_models to pick a model, then generate_image or generate_video. Both return ids at once.
  3. wait_generation with those ids. When its status is running, call it again with the same ids; when done, check each item, since one can still be error.
  4. view_canvas to look at the result, then edit it with the image tools or lay it out with add_text, create_frame and update_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 the workflows/ 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.