TechBuzzPro

How to Use ComfyUI with Claude MCP Computer Use

· 4 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Using ComfyUI with Claude’s MCP Computer Use enables you to integrate visual AI workflows into Claude, allowing image generation, editing, and complex visual tasks via ComfyUI nodes while leveraging Claude’s powerful reasoning. This setup requires both tools to be installed and configured correctly.

What You'll Need

  • Installed ComfyUI on your local machine or server
  • Access to Claude’s MCP (Model Control Protocol) interface
  • Basic understanding of Python and command-line interfaces
  • A running instance of ComfyUI’s web server
  • Network access to connect Claude to ComfyUI locally

Step-by-Step

  1. Install ComfyUI: Download and install ComfyUI from its official GitHub repository. Follow the installation guide provided in their documentation for your operating system (Windows, macOS, Linux).
  2. Start ComfyUI Server: Navigate to your ComfyUI directory and run the startup script (e.g., python main.py) to launch the web UI server. Ensure it runs on a known port, usually 8188 by default.
  3. Configure Localhost Access: Make sure your local machine can accept incoming connections on the ComfyUI port (default: 8188). If using a firewall or router, ensure port 8188 is open and accessible from your network.
  4. Set Up Claude with MCP: In Claude's settings, enable the MCP plugin or extension (if available). You might need to manually configure the connection endpoint for ComfyUI by specifying the URL, such as http://localhost:8188.
  5. Test Connection: Open Claude’s interface and try issuing a prompt that uses a ComfyUI node or workflow. Confirm that Claude can communicate with ComfyUI and retrieve results from the visual pipeline.
  6. Define Workflows: Create or import workflows in ComfyUI that define how images should be processed or generated. These may include text-to-image models, image filters, or advanced image manipulation techniques.
  7. Map Prompts to Nodes: Set up prompt mapping within Claude’s MCP configuration so that input prompts trigger specific nodes or workflows in ComfyUI. This ensures seamless interaction between Claude’s language processing and ComfyUI’s visual capabilities.
  8. Run Visual Tasks: After setup, you can now ask Claude to generate, edit, or analyze images using ComfyUI’s capabilities. The process will typically involve Claude interpreting the request and passing parameters to ComfyUI for execution.

Common Mistakes

  • Forgetting to start ComfyUI server before connecting Claude
  • Misconfiguring the URL endpoint in Claude’s MCP settings
  • Not allowing local network access for ComfyUI (firewall or router issues)
  • Using outdated versions of either ComfyUI or Claude’s MCP plugin
  • Not verifying that ComfyUI is running on the correct port (e.g., 8188)

Tips

  • Always test connections manually using a browser or curl before integrating with Claude
  • Use consistent naming when creating workflows in ComfyUI to avoid confusion
  • Keep both ComfyUI and Claude updated to avoid compatibility issues
  • Ensure your ComfyUI server allows external connections if running on a different machine
  • Log errors from both tools to quickly identify misconfigurations or failed tasks

Troubleshooting

If Claude fails to connect to ComfyUI:

  • Verify the ComfyUI server is running and listening on the specified port by visiting http://localhost:8188 in your browser
  • Check if your firewall or antivirus blocks connections to port 8188
  • Confirm the URL in Claude’s MCP settings matches your ComfyUI host and port exactly
  • Restart both Claude and ComfyUI services to clear temporary connection issues
  • If running ComfyUI remotely, verify that the public IP address and port are correctly forwarded in your router settings
  • Try using a tool like Postman or curl to simulate API calls to ComfyUI to isolate client-side problems

Frequently Asked Questions

Can I use ComfyUI with Claude without installing it locally?

No, ComfyUI must be installed and running on a local machine or server accessible to Claude. Cloud-based or remote-only setups require additional networking configuration.

Do I need special permissions to run ComfyUI with Claude?

You only need standard user permissions to run ComfyUI and access its web interface. However, some network configurations may require privileged access to open ports.

Is there a free version of ComfyUI compatible with Claude’s MCP?

Yes, ComfyUI is open-source and completely free. You can download and run it on any supported OS without needing paid licenses.

How long does it take for Claude to process a visual task using ComfyUI?

The processing time depends on the complexity of the visual workflow in ComfyUI, including model size and GPU/CPU performance. Simple tasks may take seconds, while complex ones could take minutes.

Can I customize ComfyUI workflows based on Claude’s instructions?

Yes, you can map Claude’s natural language prompts to specific ComfyUI nodes or workflows by configuring custom parameters and mappings in the MCP plugin.

What happens if ComfyUI crashes during a Claude task?

If ComfyUI crashes, the task will fail and Claude may show an error message. Restart ComfyUI and retry the operation after ensuring everything is properly configured again.