> ## Documentation Index
> Fetch the complete documentation index at: https://comfyreel.org/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Let ComfyReel Agent, or any local MCP client, read and edit the canvas.

ComfyReel serves an [MCP](https://modelcontextprotocol.io) server over HTTP. The built-in [ComfyReel Agent](https://comfyreel.org/guides/agent.md) uses it, and you can connect any other local MCP client, for example Claude Code or Codex in a terminal.

## Enable it

Turn on **Enable MCP: let the agent read and edit the canvas** in ComfyReel Agent settings. The endpoint is:

```
POST http://127.0.0.1:8188/comfyreel/mcp?project=<project-id>
```

The project id is the `project` value in the ComfyReel URL. Canvas tools are executed by the open ComfyReel tab of that project; without it they time out.

For Claude Code:

```bash theme={null}
claude mcp add --transport http comfyreel "http://127.0.0.1:8188/comfyreel/mcp?project=<project-id>"
```

## Tools

| Group | Tools |
| - | - |
| Look | `server_info`, `get_canvas`, `view_nodes`, `list_models`, `focus` |
| Build | `add_node` (text, image, video, audio, script, edit; `url` places a file attached in the chat as an image, video or audio node), `update_node`, `connect`, `delete_nodes`, `group_nodes` |
| Generate | `run_nodes`, `wait_nodes`, `apply_tool` (upscale, cutout, outpaint, angles, relight, panorama, layers, scene presets, video upscale, extract audio, mute, trim, separate audio, remove subtitles, remove object, replace text) |
| Scripts | `create_script`, `script_action` (prepare assets, generate shots, videos, voice-overs), `read_screenplay`, `write_screenplay` |
| Smart edit | `assemble_cut` (a script's shot videos in order, with voice-overs, music and transitions), `get_timeline`, `edit_timeline`, `add_subtitles`, `add_transition` |
| Video analysis | `analyze_video` (shot cuts and a contact sheet), `extract_frames` |
| 3D Director | `director_apply` (characters, props, cameras, environment, animation, capture, record), `director_code` |
| Library and workspace | `subjects`, `canvases` (list, read, search and create canvases, offer one to open), `list_files`, `read_file`, `write_file` |
| Custom workflows | `custom_workflow` (check an API-format workflow's marks and install it for a feature) |
| Chat | `plan` (steps can list their nodes), `suggest_prompts`, `episode_check`, `handoff`, `run_subagents` and `ask_user` (the last two only inside ComfyReel Agent chats; `ask_user` asks one question or up to 8 at once with `questions[]`, as choices or free text) |

`run_nodes` and `apply_tool` return at once; call `wait_nodes` with the ids, then `view_nodes` to check the result. With automatic generation off, generating tools ask you for approval in the ComfyReel Agent chat first; `run_nodes` lets you review, edit or skip each node. Clients outside the chat can generate while **External MCP clients can generate** is on in ComfyReel Agent settings (the default).

> [!NOTE]
>
> 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 while MCP is on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.