2. Configure `mcp.json` (change localhost to your IP or domain if needed):
Comfyui mcp server connects Comfyui to AI assistants that speak the Model Context Protocol. 2. Configure mcp.json (change localhost to your IP or domain if needed):.
mcp.json (change localhost to your IP or domain if needed):Once connected, the assistant can call these 4 tools directly:
text_to_image — Returns only the URL of the generated imagedownload_image — Downloads images generated by other tools (like text_to_image) using the image URLrun_workflow_with_file — Run a workflow by providing the path to a workflow JSON filerun_workflow_with_json — Run a workflow by providing the workflow JSON data directlyThe server is distributed via a container image as overseer66/mcp-comfyui-sse, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
Before the server will start you need to supply 2 environment variables: COMFYUI_HOST, RETURN_URL. Keep credentials in your client's env block or a secrets manager rather than committing them.
Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Comfyui sits in that group, and the shape of its toolset — text_to_image, download_image, run_workflow_with_file among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| text_to_image | Returns only the URL of the generated image. |
| download_image | Downloads images generated by other tools (like text_to_image) using the image URL. |
| run_workflow_with_file | Run a workflow by providing the path to a workflow JSON file. |
| run_workflow_with_json | Run a workflow by providing the workflow JSON data directly. |
```json
{
"mcpServers": {
"comfyui": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p",
"3001:3000",
"mcp/comfyui"
]
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| COMFYUI_HOST | Endpoint or connection string the server talks to. | Optional |
| RETURN_URL | Endpoint or connection string the server talks to. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.