MCP Server for ComfyUI text to image Workflow
If you already use Comfy, the comfy mcp server is the piece that lets your assistant work with it directly. MCP Server for ComfyUI text to image Workflow.
This script sets up a server using the FastMCP framework to generate images based on prompts using a specified workflow. It interacts with a remote Comfy server to submit prompts and retrieve generated images.
Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.
Configuration is passed through the environment: COMFY_URL, COMFY_WORKFLOW_JSON_FILE, PROMPT_NODE_ID, OUTPUT_NODE_ID, OUTPUT_MODE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Flux-Dev-ComfyUI-Workflow.json which is only used here as reference. You will need to export from your workflow and set the environment variables accordingly. You can install the required packages for local development:Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
### Example Claude Desktop Config
```json
{
"mcpServers": {
"Comfy MCP Server": {
"command": "/path/to/uvx",
"args": [
"comfy-mcp-server"
],
"env": {
"COMFY_URL": "http://your-comfy-server-url:port",
"COMFY_WORKFLOW_JSON_FILE": "/path/to/the/comfyui_workflow_export.json",
"PROMPT_NODE_ID": "6",
"OUTPUT_NODE_ID": "9",
"OUTPUT_MODE": "file",
}
}
}
}Configuration as documented by the project. Restart the client after saving.
Flux-Dev-ComfyUI-Workflow.json which is only used here as reference. You will need to export from your workflow and set the environment variables accordingly. You can install the required packages for local development:| Variable | Description | Required |
|---|---|---|
| COMFY_URL | Endpoint or connection string the server talks to. | Yes |
| COMFY_WORKFLOW_JSON_FILE | Configuration value read at startup. | Optional |
| PROMPT_NODE_ID | Configuration value read at startup. | Optional |
| OUTPUT_NODE_ID | Configuration value read at startup. | Optional |
| OUTPUT_MODE | Configuration value read at startup. | Optional |
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.