ComfyUI-GPU-Optimizer
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ComfyUI-GPU-Optimizershow GPU status and optimize VRAM"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ComfyUI GPU Optimizer
AI-controlled GPU VRAM management for ComfyUI. Run LTX 2.3 video, SDXL, AnimateDiff, and FLUX on an 8GB GPU without running out of memory.
What It Does
Two components that work together:
ComfyUI custom node -- runs inside ComfyUI, monitors VRAM every 3 seconds, and automatically offloads models to CPU when memory pressure hits your threshold (default 82%). No more OOM crashes mid-workflow.
MCP server -- lets Claude Code (or any MCP client) see your GPU state and control it in real time. Ask Claude to free up VRAM, start/stop ComfyUI, or check what models are loaded.
Claude Code ComfyUI
| |
|--- MCP (stdio) ---> MCP Server (mcp_server.py)
|
|--- HTTP ---> GPU Optimizer (port 9111)
|
|--- comfy.model_management
|--- torch.cudaRelated MCP server: kje-mcp
Why This Exists
ComfyUI's built-in Dynamic VRAM handles basic auto-offloading. This project adds:
Configurable thresholds -- set exactly when offloading kicks in (50-95%)
Model-level visibility -- see every loaded model, its size, and device
Selective offloading -- unload specific models by index, not just the largest
AI control via MCP -- Claude can manage your GPU while you work
ComfyUI lifecycle management -- start, stop, restart with tuned flags for 8GB cards
Process visibility -- see everything using your GPU, not just ComfyUI
Quick Start
Option A: Full setup (custom node + MCP for Claude)
# Clone into ComfyUI custom_nodes
git clone https://github.com/WaightTech/ComfyUI-GPU-Optimizer \
~/ComfyUI/custom_nodes/ComfyUI-GPU-Optimizer
# Install and register with Claude Code
cd ~/ComfyUI/custom_nodes/ComfyUI-GPU-Optimizer
bash setup.shRestart ComfyUI. Open Claude Code. Your GPU tools are ready.
Option B: Custom node only (no MCP)
git clone https://github.com/WaightTech/ComfyUI-GPU-Optimizer \
~/ComfyUI/custom_nodes/ComfyUI-GPU-OptimizerRestart ComfyUI. The optimizer loads automatically and manages VRAM in the background. The HTTP API is available on http://127.0.0.1:9111 for custom integrations.
Option C: MCP server only (already have the node)
pip install comfyui-gpu-optimizerThen add to your Claude Code MCP config:
{
"mcpServers": {
"gpu-manager": {
"command": "comfyui-gpu-optimizer"
}
}
}MCP Tools
Tool | What it does |
| VRAM usage, utilization, temperature, power draw |
| List all processes using the GPU |
| Show loaded models with sizes and devices |
| Auto-offload models to free VRAM (largest first) |
| Offload a specific model by index |
| Set auto-offload threshold (50-95%) |
| Enable/disable automatic VRAM management |
| Unload ALL models and empty CUDA cache |
| Check if ComfyUI is running and responding |
| Start ComfyUI with optimized flags for your GPU |
| Graceful shutdown |
| Stop, flush, restart |
| Kill all GPU compute processes (nuclear option) |
| Tail the ComfyUI log |
Configuration
All settings are optional environment variables with sensible defaults:
Variable | Default | Description |
|
| ComfyUI install path |
|
| ComfyUI API endpoint |
|
| Log file location |
|
| GB to reserve for OS stability |
|
| Optimizer HTTP API port |
|
| Optimizer API URL (MCP server side) |
|
| Auto-offload threshold (%) |
|
| Monitor check interval (seconds) |
How It Works
The custom node loads when ComfyUI starts. It spins up two daemon threads:
Monitor thread -- checks VRAM usage every 3 seconds. When usage exceeds the threshold, it offloads the largest loaded model to CPU via
comfy.model_management, then clears the CUDA cache. Repeats until usage is below threshold.API server -- HTTP server on port 9111 (localhost only). Exposes endpoints for status, model listing, offloading, flushing, and threshold adjustment.
The MCP server runs as a separate process. It queries the GPU directly via pynvml (NVML) for hardware stats, and calls the optimizer's HTTP API for model-level operations. If ComfyUI isn't running, hardware-level tools (status, processes) still work; model-level tools return a clear error.
Tested On
NVIDIA GeForce RTX 4060 Ti 8GB
WSL2 (Ubuntu) on Windows
Python 3.10+
Verified workloads on 8GB:
Workload | VRAM Usage | Notes |
LTX 2.3 Video (22B Q4 GGUF) | 52-70% | 10-sec video in ~6 min. Add |
AnimateDiff + Realistic Vision | 54% | 5-sec video in ~5 min |
SDXL (epiCRealismXL) | 60% | Image generation |
FLUX (GGUF quantized) | varies | Works with auto-offloading |
System RAM matters. When the optimizer offloads models from GPU to CPU, they live in system RAM. LTX 2.3 keeps its 10.8GB Gemma text encoder on CPU full-time, and offloaded SDXL/FLUX models add to that. 32GB RAM recommended for video workloads, 16GB minimum for image generation.
Should work on any NVIDIA GPU with CUDA support. The 8GB defaults are tuned for low-VRAM cards but the thresholds are configurable for any card size.
License
MIT. See LICENSE.
Built by Waight Tech, LLC.
Available Tools
14 toolscomfyui_logA
Read the last N lines of the ComfyUI log.
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must convey behavioral traits. The verb 'Read' implies a non-destructive operation, but the description does not explicitly state that it does not modify server state or that it is safe to call.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no extraneous information. It efficiently conveys the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of an output schema (which likely documents return format), the description adequately covers the purpose. Minor improvement could mention that it reads from the end of the log.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, and the tool description does not explain the 'lines' parameter beyond implying it's a count. The parameter name is self-explanatory, but additional details (e.g., range, behavior when set to 0) would be helpful.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Read') and the resource ('ComfyUI log'), specifying the scope ('last N lines'). It is distinct from sibling tools that deal with starting/stopping the server or GPU management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. Since there are no sibling tools for reading logs, the description could still benefit from mentioning typical use cases (e.g., debugging).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
comfyui_restartC
Restart ComfyUI: stop, flush VRAM, start fresh with GPU optimizer.
| Name | Required | Description | Default |
|---|---|---|---|
| lowvram | No | ||
| novram | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the sequence of operations (stop, flush, start), which adds behavioral context. However, it does not mention potential side effects like loss of unsaved state or authentication requirements. With no annotations, more detail would be beneficial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short (one sentence) and front-loaded, but it omits essential information about parameters. Conciseness is good, but at the cost of completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the restart action, two parameters, and no output schema, the description is incomplete. It lacks details on parameter effects, return values, and prerequisites (e.g., whether ComfyUI must be running).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description completely ignores the two boolean parameters (lowvram, novram). It provides no explanation of how these affect the restart behavior, leaving the agent uninformed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool restarts ComfyUI with specific actions: stop, flush VRAM, start fresh with GPU optimizer. This distinguishes it from sibling tools like comfyui_stop, comfyui_start, vram_flush, and gpu_optimize.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify scenarios where a full restart is preferred over separate stop/start or plain optimization.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
comfyui_startC
Start ComfyUI with GPU optimizer. Automatically reserves VRAM headroom for system stability.
| Name | Required | Description | Default |
|---|---|---|---|
| lowvram | No | ||
| novram | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It mentions automatically reserving VRAM headroom, but does not explain the impact of parameters (lowvram, novram) on behavior, error handling, or failure modes. The behavioral disclosure is partial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no fluff. However, it sacrifices necessary details for brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and limited parameter info. The description fails to explain return values, expected behavior after start, error conditions, or the role of parameters. It is inadequate for an agent to use this tool correctly without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description contains no information about the two boolean parameters (lowvram, novram). The agent cannot deduce their meaning or defaults from the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool starts ComfyUI with GPU optimizer and mentions VRAM headroom. It distinguishes from sibling tools like comfyui_restart and comfyui_stop, but could better differentiate from gpu_optimize and other GPU tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives, no prerequisites mentioned, and no explanation of when not to use it. The description only implies usage for starting ComfyUI.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
comfyui_statusA
Check if ComfyUI is running, responding, and whether the GPU optimizer is active.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It transparently lists the three checks performed, implying a read-only, non-destructive operation. However, it does not explicitly state that the tool has no side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, efficient sentence that front-loads the purpose. No unnecessary words; every part adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter status check without an output schema, the description is complete. It adequately describes what the tool checks, and no additional detail is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so baseline is 4. The description does not need to add parameter information, and it correctly provides none beyond the schema's empty object.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Check' and the resource 'ComfyUI', specifying three distinct aspects (running, responding, GPU optimizer active). This differentiates it from sibling tools like start/stop/restart or GPU-specific tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for health-checking before actions, but does not explicitly state when to use this tool versus alternatives like gpu_status. It lacks explicit usage context or preconditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
comfyui_stopA
Stop ComfyUI and free VRAM.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must cover behavior. It mentions 'free VRAM' as a consequence, but lacks disclosure on whether the operation is destructive, whether it requires confirmation, or what state the system is left in. This is insufficient for a stop action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no wasted words. Every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters, no annotations, and no output schema, the description is minimal but covers the core action. However, for a stop tool, it lacks completeness regarding safety or state effects. Adequate but not thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so schema coverage is 100%. The description adds no parameter-specific info, but none is needed. Baseline 4 is appropriate for a parameterless tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Stop') and the resource ('ComfyUI'), and adds a specific secondary effect ('free VRAM'). It distinguishes from sibling tools like 'comfyui_start' and 'comfyui_restart' by implying this is the shutdown operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It does not indicate prerequisites (e.g., is ComfyUI running?), side effects, or when to avoid calling it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gpu_auto_manageA
Enable or disable automatic VRAM management. When enabled, the optimizer automatically offloads models when VRAM exceeds the threshold.
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It explains the core behavior (automatic offloading when enabled and threshold exceeded) but omits details like what happens on disable, performance implications, or reversibility.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no fluff. The key action and condition are front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple boolean toggle tool, the description covers the main functionality and condition. However, it lacks detail on what happens when disabled and does not mention return values due to no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage. The description implies the 'enabled' boolean but adds no extra meaning beyond the schema. It does not explain the effect of true vs false or the default behavior clearly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool enables or disables automatic VRAM management, using a specific verb and resource. It distinguishes from sibling tools like gpu_offload_model (manual offload) and gpu_set_threshold (threshold setting).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (when automatic offloading is desired based on threshold) but does not explicitly state when not to use or mention alternative tools like gpu_offload_model for manual control.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gpu_flush_modelsA
Unload ALL models from VRAM inside ComfyUI and empty the CUDA cache. More thorough than vram_flush.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes the two main effects (unloading models, emptying CUDA cache). With no annotations, this is adequate for a simple removal tool, though it could mention if it disrupts ongoing processes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, no wasted words. Front-loaded with the main action and comparison.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and no output schema, the description fully covers the tool's purpose and behavior. The comparison to vram_flush adds context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so the description cannot add parameter meaning. Baseline 4 is appropriate as it's not required to elaborate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the action (unload all models, empty CUDA cache) and resource (models from VRAM in ComfyUI). It also distinguishes from sibling tool vram_flush by stating it's more thorough.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides a comparison with vram_flush ('more thorough'), guiding when to use. Lacks explicit when-not or alternative scenarios, but the comparison is helpful context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gpu_memory_mapA
See exactly which models are loaded on the GPU, their sizes, and devices. Requires the GPU optimizer inside ComfyUI.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool is a read operation ('See exactly...') and mentions a dependency. However, it does not disclose authentication needs, rate limits, or any potential side effects. The requirement of GPU optimizer is helpful context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two short, directly relevant sentences. The first sentence states the purpose, the second adds a requirement. No extraneous information, well front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters, no output schema, and no annotations, the description is sufficient for basic understanding but lacks details on output format, error scenarios, or performance implications. It is adequate but leaves room for more completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so schema coverage is 100% by default. The description adds meaning by stating what the tool returns: models, sizes, and devices. This baseline of 4 is appropriate as the description compensates for the lack of parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool shows which models are loaded on GPU, their sizes and devices. It uses a specific verb 'See' and identifies the resource. This distinguishes it from siblings like gpu_status which likely show overall memory usage rather than per-model mapping.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions a prerequisite ('Requires the GPU optimizer inside ComfyUI') but does not provide guidance on when to use this tool versus alternatives such as gpu_status, gpu_processes, or other GPU tools. There is no explicit when-not or alternative naming.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| model_index | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description must cover behavior. It states the action and default index meaning, but doesn't mention that offloading frees GPU memory or what happens if index is invalid. Adequate but not thorough for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, 18 words. Purpose first, then usage hint. No fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter, the description covers purpose, how to find indices, and special value. Lacks return value info but acceptable given simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% coverage; description adds critical context: 'by index' and explains the default -1 offloads the largest model, which goes beyond schema fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the action (move model) and target (from GPU to CPU by index). Distinguishes from sibling tools like gpu_flush_models and gpu_memory_map by specifying 'by index'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides direct guidance: use gpu_memory_map to find indices, and the special value -1 to offload the largest model. Does not explicitly state when not to use, but context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| target_free_mb | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description discloses that it offloads largest models first and threshold behavior, but omits details on whether offloaded models are unloaded completely, impact on ongoing tasks, or if any state is preserved. Adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences covering action, ordering, and parameter. No wasted words. Front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with 1 parameter and no output schema, the description covers its purpose, parameter, and behavior. Lacks info on return value or side effects, but overall adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage, but the tool description explains the parameter target_free_mb meaning and special value 0 for auto, adding significant value beyond the schema type/default.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Automatically free VRAM by offloading models to CPU' with specific verb and resource. It distinguishes from siblings like gpu_offload_model (specific model) and gpu_flush_models (different behavior).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description implies usage for freeing VRAM automatically with threshold, but lacks explicit when-not-to-use or mention of alternatives like gpu_offload_model for targeting specific models. Sibling tools exist that could overlap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gpu_processesA
List all processes currently using the GPU (compute and graphics).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must convey behavioral traits. It indicates a read-only listing operation, but does not mention permissions required, performance impact, or whether the list is instantaneous or a snapshot.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that immediately conveys the tool's function with no extraneous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple parameterless tool, the description provides the essential purpose but omits details about output format or whether it includes all users' processes. It is reasonably complete given low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters (100% coverage), but the description does not explicitly state that no inputs are needed. However, the emptiness is obvious, so baseline 4 applies per guidance for 0 parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'processes currently using the GPU', with explicit mention of 'compute and graphics' to distinguish from sibling tools like gpu_status or gpu_memory_map.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs. alternatives (e.g., gpu_status or gpu_memory_map). The description only states what it does, leaving usage context implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gpu_set_thresholdA
Set the VRAM auto-management threshold (50-95%). When VRAM exceeds this, models are automatically offloaded to CPU.
| Name | Required | Description | Default |
|---|---|---|---|
| threshold_pct | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description carries full burden. It discloses the behavior (offloading models to CPU when threshold exceeded) and the range. However, it does not state side effects like whether the change is persistent, affects running models, or requires a restart. For a setting tool, this is adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: first defines the action and range, second explains the consequence. No wasted words, front-loaded with key info. Ideal conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description covers purpose, range, and effect. It could mention persistence or validation of out-of-range values, but overall it is reasonably complete for an AI agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does by providing the valid range (50-95%) and the effect, adding meaning beyond the schema's default of 82 and type integer. This is a strong compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Set the VRAM auto-management threshold' with a specific verb and resource. It explains the range (50-95%) and the effect (models offloaded to CPU when VRAM exceeds). This distinguishes it from sibling tools like gpu_auto_manage or gpu_flush_models.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage is implied (when you want to change the threshold), but no explicit guidance is given on when to use this vs. alternatives like gpu_auto_manage (likely toggles auto-management) or gpu_optimize. No exclusions or prerequisites mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gpu_statusA
Get current GPU status: VRAM usage, utilization, temperature, and power draw.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses the tool's read-only nature by listing the metrics it returns. It doesn't mention potential refresh rates or data format, but for a simple status tool, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys all necessary information with no redundancy. It is appropriately front-loaded with the purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations. The description lists the key metrics returned, but lacks details on units or typical response format. Given the tool's simplicity, it is mostly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the baseline is 4 as per instructions. The description adds no parameter info because none exist, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'GPU status', and lists the specific metrics included (VRAM usage, utilization, temperature, power draw). This differentiates it from sibling tools like gpu_processes or gpu_memory_map.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. However, the simplicity of the tool (no parameters) implies it's for a quick status check, but it doesn't contrast itself with siblings like gpu_auto_manage or gpu_set_threshold.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vram_flushA
Kill ALL GPU compute processes and free VRAM. Use with caution.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden for behavioral traits. It clearly states a destructive action: killing all compute processes and freeing VRAM. The warning adds a cautionary note. However, it does not detail required permissions, reversibility, or impact on running jobs, which would improve transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two short sentences. The first sentence states the action, the second adds a necessary warning. Every word earns its place with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no parameters and no output schema, the description adequately covers the essential information. It tells the agent what the tool does and includes a caution. However, additional context about when to use it or potential side effects would make it more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters and schema coverage is 100%, so the description's job is to explain the tool's effect. It does so effectively by describing the action in plain language. No additional parameter meaning is needed, but the description does not add extra context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb-resource pair ('Kill ALL GPU compute processes and free VRAM') that clearly states the tool's action and scope. It distinguishes from siblings like gpu_flush_models or gpu_processes by indicating it kills all processes, not just a subset.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes 'Use with caution' as a warning but provides no explicit context on when to use this tool versus alternatives like gpu_flush_models or gpu_auto_manage. It does not mention prerequisites, safety considerations, or situations where this tool is appropriate versus inappropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools have distinct purposes (ComfyUI lifecycle vs GPU management), but gpu_flush_models and vram_flush both free VRAM with slightly different scopes, causing minor overlap. Overall clear separation.
Tools follow a verb_noun pattern with prefixes (comfyui_, gpu_), but vram_flush breaks the pattern by using a different style. The naming is mostly predictable but has one inconsistency.
14 tools is reasonable for managing a GPU-optimizer server. It covers ComfyUI operations and GPU/VRAM management without being excessive, though slightly above the ideal 3-15 range.
The tool set covers core workflows: start/stop/restart ComfyUI, VRAM monitoring and management, and GPU status. Missing advanced features (e.g., configuring GPU device) but no critical gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Remote MCP server for RunComfy Serverless API (ComfyUI): deployments and async inference.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for Wan AI video generation
MCP server for Google Veo AI video generation
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for ComfyUI — text-to-image, variations, img2img refine, upscale, image proxy, and workflow runner.151481MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that enables Claude.ai to interact with Jim Brain's persistent memory, project state, and vault, and to dispatch headless Claude Code build sessions on a VPS.
- AlicenseAqualityAmaintenanceMCP server + Claude Code plugin for ComfyUI: execute workflows, generate images, visualize pipelines as Mermaid diagrams, compose/validate workflows, manage and download models, control VRAM, and explore custom nodes. 36 tools, cross-platform, installs via npx -y comfyui-mcp.41141,905716MIT
- FlicenseNot gradedqualityBmaintenanceMCP server that connects local ComfyUI to AI agents, enabling natural language control of ComfyUI for creating workflows, generating images, and managing the queue.
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