Skip to content

Comfy-Guru is an mcp that connects Claude Desktop to your comfyui logs - to squash those errors (peacefully)

License

Notifications You must be signed in to change notification settings

endlessblink/Comfy-Guru

Repository files navigation

Comfy-Guru

ComfyUI Log Debugger MCP Server (comfy-guru)

A Model Context Protocol (MCP) server that helps you debug ComfyUI by discovering and analyzing log files through Claude Desktop.

🚨 IMPORTANT: Tell Claude Where ComfyUI Is Located!

If ComfyUI isn't found automatically, just tell Claude in chat:

"My ComfyUI is at D:\MY PROJECTS\AI\STABLE DIFFUSION UI\ComfyUI"

Or configure it permanently - see Setup Guide

πŸš€ Quick Installation (30 seconds)

For Users:

  1. Download comfy-guru.dxt (pre-built extension)
  2. Open Claude Desktop and go to: Settings β†’ Extensions
  3. Click "Install Extension..."
  4. Select the downloaded comfy-guru.dxt file
  5. Done! No git clone, no Python setup needed!

Note: Don't double-click the .dxt file - install it through Claude Desktop's settings.

Important: After installation, fully restart Claude Desktop for the MCP extension to work properly.

For Developers:

  • To modify and rebuild the extension: python build_extension.py
  • This creates a new comfy-guru.dxt from source files

🎯 What It Does

  • Finds all your ComfyUI installations automatically
  • Discovers log files (including rotated logs, port-specific logs, debug logs)
  • Analyzes errors and categorizes them (CUDA, Node execution, Dependencies, etc.)
  • Monitors logs in real-time for new errors
  • Works everywhere - Windows, macOS, Linux, Docker

Comfy-Guru in action

πŸ“‹ Example Commands in Claude Desktop

Once installed, just ask Claude:

  • πŸ” "Find all my ComfyUI log files"
  • πŸ› "Check my ComfyUI logs for CUDA memory errors"
  • πŸ“Š "What errors happened in the last 30 minutes?"
  • πŸ‘€ "Monitor my ComfyUI log for new errors"
  • πŸ”§ "Analyze my ComfyUI workflow execution errors"

πŸ› οΈ Installation Options

Option 1: Easy Install (Recommended)

python easy_install.py

Option 2: Docker Install

# Windows
docker-install.bat

# Linux/Mac/WSL
./docker-install.sh

Option 3: Manual Install

See INSTALL.md for manual configuration of Claude Desktop.

βš™οΈ Configuration

The installer creates a .env file. Edit it to add custom ComfyUI paths:

Adding ComfyUI Paths Manually

Edit the .env file and add paths separated by commas:

# Your ComfyUI installations (comma-separated)
COMFYUI_PATHS=C:\ComfyUI,D:\MY PROJECTS\AI\ComfyUI,E:\Another\ComfyUI

# Search directories (only used if deep search is enabled)
COMFYUI_SEARCH_DIRS=C:\,D:\,E:\

# Deep search is OFF by default for performance
COMFYUI_DEEP_SEARCH=false

About Deep Search

Deep search is OFF by default because:

  • βœ… Manual paths are found instantly (< 1 second)
  • ❌ Deep search can take 30-100+ seconds
  • ❌ Can cause permission errors on system folders

How to Use Deep Search Temporarily

  1. Enable deep search to find all installations:

    COMFYUI_DEEP_SEARCH=true
  2. Run the discovery in Claude Desktop:

    "Find all my ComfyUI installations"
    
  3. Note the paths it finds

  4. Add them to COMFYUI_PATHS manually:

    COMFYUI_PATHS=path1,path2,path3,newly_found_path
  5. Turn deep search OFF again:

    COMFYUI_DEEP_SEARCH=false

This way you get the benefit of discovery without the performance penalty!

πŸ§ͺ Testing

# Test the installation
python test_installation.py

Expected output:

βœ… All imports successful
βœ… Found X ComfyUI installations
βœ… Found Y log files
βœ… Error detection working

πŸ“ Project Structure

comfy-guru/
β”œβ”€β”€ src/                    # Core source files
β”‚   β”œβ”€β”€ standalone_mcp_server.py
β”‚   β”œβ”€β”€ debugger_server.py
β”‚   β”œβ”€β”€ smart_log_discovery.py
β”‚   └── error_patterns.json
β”œβ”€β”€ docs/                   # Documentation
β”œβ”€β”€ examples/              # Example files
β”œβ”€β”€ scripts/               # Helper scripts
β”œβ”€β”€ easy_install.py       # Easy installer
β”œβ”€β”€ install.py           # Standard installer
β”œβ”€β”€ test_installation.py # Test suite
└── requirements.txt     # Dependencies

πŸ”§ Troubleshooting

"comfy-guru not found" in Claude Desktop

  • Restart Claude Desktop after installation
  • Run the installer again (install.bat or ./install.sh)
  • Check the config file manually (see INSTALL.md)

No logs found

  • Edit .env with your ComfyUI paths
  • Make sure ComfyUI has been run at least once
  • Try with COMFYUI_DEEP_SEARCH=true

Permission errors

  • Windows: Run as Administrator
  • Linux/macOS: Check file permissions
  • Docker: Ensure volumes are mounted with :ro flag

πŸ“¦ What Gets Analyzed

  • comfyui.log - Main log file
  • comfyui_8188.log - Port-specific logs
  • debug.log - Debug output
  • *.prev, *.prev2 - Rotated logs
  • Custom node logs
  • Console output logs

🀝 Contributing

Pull requests welcome! Areas for improvement:

  • More error patterns
  • Additional log file locations
  • Performance optimizations
  • New analysis features

πŸ“„ License

MIT - Use freely!


Made with ❀️ for the ComfyUI community. If this helps you debug ComfyUI issues faster, give it a ⭐!

About

Comfy-Guru is an mcp that connects Claude Desktop to your comfyui logs - to squash those errors (peacefully)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •