Comfy-Guru

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

GitHub Stars

4

User Rating

Not Rated

Forks

0

Issues

0

Views

0

Favorites

0

README

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 โญ!

Author Information

4

Followers

5

Repositories

0

Gists

19

Total Contributions

Top Contributors

Threads