Skip to main content
Glama

comfyui-pbr-mcp

Lightweight FastMCP server that bridges AI agents and local or remote ComfyUI instances to generate PBR texture maps (albedo, normal, roughness, AO, height) from a single base-color image.

Features

  • COMFYUI_HOST Environment Support: Point to 127.0.0.1:8188, http://gpu-box:8188, or an HTTPS reverse proxy cleanly.

  • Custom Workflow Override: Ships with a minimal LoadImage -> SaveImage API template (src/comfyui_pbr_mcp/workflows/workflow_api.json); override with your full PBR ComfyUI API graph via COMFYUI_WORKFLOW_FILE or the workflow_path parameter.

  • Safe Resource Cleanup: Enforces HTTP request timeouts and closes WebSockets cleanly in finally.

Related MCP server: ComfyUI MCP Hub

Quickstart

pip install -e .
export COMFYUI_HOST=127.0.0.1:8188
comfyui-pbr-mcp

MCP Client Configuration

{
  "mcpServers": {
    "comfyui-pbr": {
      "command": "comfyui-pbr-mcp",
      "env": {
        "COMFYUI_HOST": "127.0.0.1:8188",
        "COMFYUI_WORKFLOW_FILE": "/path/to/your_pbr_workflow_api.json"
      }
    }
  }
}

Tools

  • check_comfyui_health(comfyui_host=None): Checks /system_stats reachability.

  • generate_pbr_textures(image_path, workflow_path=None, comfyui_host=None, timeout_s=120.0): Uploads the image, injects the uploaded filename into LoadImage, streams WebSocket completion, and returns output texture download URLs.

License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes ComfyUI workflows as 12 MCP tools on ComfyUI's own port, letting AI agents generate, edit, and remove backgrounds from images plus create videos by passing semantic parameters instead of whole workflow graphs. Agents can list models, submit and track async tasks, fetch artifact URLs, and jump to a visual asset/task page.
      5
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Exposes the workflows saved in a ComfyUI server (local, remote, or vast.ai) as MCP tools, letting agents list them, inspect their inputs, and run them with their own prompts, images, seeds, and per-run node toggles. It also reports server/GPU status, tracks and downloads job outputs, and uploads images or browses model folders.
      10
      -