ComfyUI-GPU-Optimizer
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COMFYUI_DIR | No | ComfyUI install path | ~/ComfyUI |
| COMFYUI_LOG | No | Log file location | ~/.comfyui-gpu-optimizer.log |
| COMFYUI_URL | No | ComfyUI API endpoint | http://localhost:8188 |
| GPU_OPTIMIZER_URL | No | Optimizer API URL (MCP server side) | http://127.0.0.1:9111 |
| GPU_OPTIMIZER_PORT | No | Optimizer HTTP API port | 9111 |
| COMFYUI_RESERVE_VRAM | No | GB to reserve for OS stability | 1.5 |
| GPU_OPTIMIZER_THRESHOLD | No | Auto-offload threshold (%) | 82 |
| GPU_OPTIMIZER_POLL_INTERVAL | No | Monitor check interval (seconds) | 3 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gpu_statusA | Get current GPU status: VRAM usage, utilization, temperature, and power draw. |
| gpu_processesA | List all processes currently using the GPU (compute and graphics). |
| gpu_memory_mapA | See exactly which models are loaded on the GPU, their sizes, and devices. Requires the GPU optimizer inside ComfyUI. |
| gpu_optimizeA | Automatically free VRAM by offloading models to CPU. Offloads largest models first until threshold is met. Set target_free_mb to specify how much VRAM to free, or 0 for auto. |
| gpu_offload_modelA | Move a specific model from GPU to CPU by index. Use gpu_memory_map to see model indices. Pass -1 to offload the largest model. |
| gpu_set_thresholdA | Set the VRAM auto-management threshold (50-95%). When VRAM exceeds this, models are automatically offloaded to CPU. |
| gpu_auto_manageA | Enable or disable automatic VRAM management. When enabled, the optimizer automatically offloads models when VRAM exceeds the threshold. |
| gpu_flush_modelsA | Unload ALL models from VRAM inside ComfyUI and empty the CUDA cache. More thorough than vram_flush. |
| comfyui_statusA | Check if ComfyUI is running, responding, and whether the GPU optimizer is active. |
| comfyui_startC | Start ComfyUI with GPU optimizer. Automatically reserves VRAM headroom for system stability. |
| comfyui_stopA | Stop ComfyUI and free VRAM. |
| comfyui_restartC | Restart ComfyUI: stop, flush VRAM, start fresh with GPU optimizer. |
| vram_flushA | Kill ALL GPU compute processes and free VRAM. Use with caution. |
| comfyui_logA | Read the last N lines of the ComfyUI log. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mwaight/ComfyUI-GPU-Optimizer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server