> ## Documentation Index
> Fetch the complete documentation index at: https://comfyui-mcp.artokun.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Process Control

> Start, stop, and restart the ComfyUI process.

<Info>1 tool. Generated from the live MCP tool schemas — do not edit by hand; run `npm run docs:gen`.</Info>

<Tip>**You don't type these calls.** Ask your agent for what you want in ordinary English — it chooses the tool and fills in the arguments. The JSON on this page is what it sends. New here? Start with [Using the tools](/docs/using-tools).</Tip>

## restart\_comfyui

Control the lifecycle of the ComfyUI server process. Driven by the `action` parameter:

* action:"restart" — Restart ComfyUI: stops the running process (capturing its config), waits for the port to free, relaunches with the same arguments, and polls the API for bounded readiness. Also works against a REMOTE/tunnelled ComfyUI (via --comfyui-url) by rebooting through ComfyUI-Manager over HTTP and polling for it to come back (requires ComfyUI-Manager present and its security level permitting the reboot). This is the normal way to reload newly installed custom nodes, and the escalation when queue (action:"cancel") reports a job WEDGED.
* action:"start" — Start ComfyUI using process info saved from a previous action:"stop" call. Supports both Desktop app and manual Python installs. Polls the API for bounded readiness before reporting ready. Local installs only.
* action:"stop" — Stop the running ComfyUI process. Captures process info so it can be restarted with action:"start". Kills the process tree and resets the WebSocket client. Local installs only. Anything queued or rendering is lost.

<Tip>**In plain terms:** Starting, stopping and restarting ComfyUI, chosen with `action`. Restarting is the standard next step after installing a node pack — new nodes are not loaded until ComfyUI starts again.</Tip>

### Parameters

<ParamField path="action" type="enum" required>
  Which process operation to perform. None of them takes any other parameter. "restart" stops and relaunches in one call (and is the only action that also works against a remote/tunnelled ComfyUI); "start" relaunches from the info a previous "stop" saved; "stop" kills the running process tree. Options: `action:"restart"`, `action:"start"`, `action:"stop"`.
</ParamField>

### Examples

**You say:** Restart it so the new nodes load.

```json theme={null}
{
  "tool": "restart_comfyui",
  "arguments": {
    "action": "restart"
  }
}
```

**You get back:** The server stops and comes back up, and you are told when it is answering again.

<Warning>Anything queued or rendering is lost. Check the queue is empty first if a long job is in flight.</Warning>

**You say:** Shut ComfyUI down, I need the VRAM.

```json theme={null}
{
  "tool": "restart_comfyui",
  "arguments": {
    "action": "stop"
  }
}
```

**You get back:** Confirmation that the process stopped.

<Warning>Any running or queued render is lost.</Warning>

**You say:** Start ComfyUI again.

```json theme={null}
{
  "tool": "restart_comfyui",
  "arguments": {
    "action": "start"
  }
}
```

**You get back:** It launches the server and waits until it is answering, then tells you the URL. Only works for a ComfyUI on this machine.

***
