Connects Claude Desktop to a local ComfyUI instance to run image generation.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add claude-comfyui --env COMFYUI_CONFIG='<COMFYUI_CONFIG>' -- node '[Path to your ComfyUI MCP Server]distindex.js'~/.codex/config.toml
[mcp_servers.claude-comfyui]
command = "node"
args = ["[Path to your ComfyUI MCP Server]distindex.js"]
env = { COMFYUI_CONFIG = "<COMFYUI_CONFIG>" }
# codex mcp add claude-comfyui --env COMFYUI_CONFIG='<COMFYUI_CONFIG>' -- node '[Path to your ComfyUI MCP Server]distindex.js'~/.cursor/mcp.json
{
"mcpServers": {
"claude-comfyui": {
"command": "node",
"args": [
"[Path to your ComfyUI MCP Server]distindex.js"
],
"env": {
"COMFYUI_CONFIG": "<COMFYUI_CONFIG>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"claude-comfyui": {
"type": "stdio",
"command": "node",
"args": [
"[Path to your ComfyUI MCP Server]distindex.js"
],
"env": {
"COMFYUI_CONFIG": "<COMFYUI_CONFIG>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"claude-comfyui": {
"command": "node",
"args": [
"[Path to your ComfyUI MCP Server]distindex.js"
],
"env": {
"COMFYUI_CONFIG": "<COMFYUI_CONFIG>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"claude-comfyui": {
"command": "node",
"args": [
"[Path to your ComfyUI MCP Server]distindex.js"
],
"env": {
"COMFYUI_CONFIG": "<COMFYUI_CONFIG>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"claude-comfyui": {
"command": "node",
"args": [
"[Path to your ComfyUI MCP Server]distindex.js"
],
"env": {
"COMFYUI_CONFIG": "<COMFYUI_CONFIG>"
}
}
}
}Environment variables
COMFYUI_CONFIG
Replace the placeholders with your own credentials and keep them out of version control.