TL;DR — Key Takeaways
- AI agents can generate infrastructure and CUDA code, but without a GPU-aware MCP server they cannot see real-time utilization, VRAM, temperatures or active GPU processes.
gpu-mcp-serverconnects directly to NVIDIA’s NVML library and exposes fresh, structured GPU telemetry to MCP-compatible agents without relying on text parsing or a time-series database.- The server supports local development, Kubernetes DaemonSet deployments and MIG-aware environments, enabling faster troubleshooting, smarter workload placement and more autonomous infrastructure operations.
If you are running GPU workloads, whether it’s LLM inference endpoints, distributed training or autonomous AI pipelines, you have likely had this exact conversation with your AI coding assistant or agent:
User: “What’s the current GPU utilization on this node?”
Agent: “I apologize, but I do not have access to real-time hardware telemetry or the underlying infrastructure state.”
Your agent can write complex CUDA kernels, optimize transformer architectures and generate flawless Kubernetes manifests. However, it remains fundamentally blind to whether the $30,000 GPU sitting in your cluster is completely idle or running dangerously close to thermal throttling.
As AI agents transition from simple code-completion widgets to autonomous infrastructure operators, this visibility gap is becoming an active operational bottleneck.
The Protocol Gap: Why GPUs Are Invisible to Agents
Modern AI agents reason and interact with their environments using the model context protocol (MCP). MCP standardizes how a model connects to external data sources and tools, but the protocol itself defines no native GPU telemetry primitives. Without a GPU-aware MCP server acting as a bridge, an agent simply cannot see VRAM allocation, compute utilization or hardware temperatures.
GPU metrics live close to the metal, handled by the native NVIDIA Management Library (NVML) C API. As AI agents operate primarily in a world of text, runtime environments and structured JSON APIs, they have no direct way to query these low-level device drivers. When engineers attempt to bridge this gap, they usually run into three distinct points of friction:
- The Text Parsing Trap (nvidia-smi): Executing raw shell commands inside an agent environment returns human-readable text blocks. Agents struggle to parse this unpredictably formatted stdout reliably under heavy load.
- The Custom Script Mire: Teams build ad hoc, fragile Python or bash scripts to parse metrics into JSON. These solutions lack standardization, introduce security vulnerabilities and must be rewritten for every new cluster topology.
- The Time-Series Database Overkill: Routing point-in-time agent queries through an enterprise monitoring pipeline introduces unnecessary architectural layers for interactive developer environments.
Point-in-Time Introspection Vs. Fleet Monitoring
The standard operational playbook for GPU monitoring relies on a robust cloud-native stack:
NVIDIA’s DCGM Exporter scrapes hardware metrics, exposes them to a Prometheus or OpenTelemetry Collector and feeds long-term metrics to centralized Grafana dashboards. This architecture is necessary for fleet-level observability, alerting and long-horizon service level objectives (SLOs). However, it is an architectural mismatch for conversational, interactive agent queries in developer inner loops:
- Stale Sampling: Prometheus works on a scrape interval (typically 15–60 seconds). For an AI agent executing step-by-step debugging or load testing in a chat loop, a 30-second-old sample means it is reasoning against stale infrastructure states.
- Tool Sprawl for Single Metrics: Forcing a local development tool or an ephemeral AI assistant to authenticate against and query a massive time-series database just to discover point-in-time VRAM availability introduces immense operational overhead.
To solve this, we need to treat interactive agent queries as low-latency, point-in-time hardware reads rather than historical data mining.
A Direct Telemetry Plane: Gpu-mcp-server
To close this gap, we built gpu-mcp-server, an open-source MCP server designed to expose real-time NVIDIA GPU metrics directly to any MCP-compliant agent (such as Claude Desktop, Cursor, Windsurf or Goose).
Instead of routing requests through an external database or scraping an intermediate metrics endpoint, the server interfaces straight with the hardware layer.
Written in Go, gpu-mcp-server utilizes low-level C bindings (cgo) to execute direct calls against the native NVML library on the host node. This design bypasses the intermediate monitoring stack completely for interactive use cases, allowing the agent to pull fresh hardware state with low-millisecond latency on demand.
The server exposes four highly structured, JSON-native MCP tools:
When an agent invokes the gpu_summary tool, it receives a clean, machine-parseable JSON payload:
With structured data, the agent no longer needs to guess or regex text blocks. It can instantly calculate whether a node has the capacity to spin up an additional worker, or pinpoint exactly which process is causing an out-of-memory error.
Multi-Instance GPU Support
For enterprise architectures running partitioned infrastructure, the tool provides native multi-instance GPU (MIG) awareness. When MIG mode is enabled on A100 or H100 hardware, NVML enumerates the individual compute and memory instances. The gpu-mcp-server respects these boundaries, exposing MIG slices as distinct logical devices with their own addressable UUIDs, while accurately attributing shared physical characteristics such as power draw and temperature to the underlying parent card.
Deployment Architectures: Local to Kubernetes
The tool adapts directly to your active platform engineering workflows, supporting both local execution and multitenant orchestration.
Local Inner-Loop Development
For local workstations or individual GPU instances, the server runs via standard input/output (stdio), which is the lowest-friction transport model for MCP.
Adding the tool to a local environment takes less than a minute via a standard configuration file (e.g., claude_desktop_config.json):
Production Cluster Orchestration
For distributed environments, gpu-mcp-server scales out across cloud infrastructure via a native Helm deployment model. It deploys as a Kubernetes DaemonSet mapped specifically to your GPU-enabled node pools.
In this architecture, the DaemonSet spins up node-local pods that communicate with the host’s NVIDIA Container Runtime to access device files. Rather than utilizing stdio, the server switches to an HTTP transport layer (–transport http), exposing secure, authenticated network endpoints. Remote or centralized AI agents can then query the specific node-level servers over the network without consuming allocatable request capacity.
Why This Matters for Platform Engineering and DevOps
Giving an AI assistant access to hardware metrics is about more than just rendering pretty numbers in a chat UI; it is a foundational requirement for building autonomous infrastructure operations (AgenticOps).
Root Cause Analysis for Silent Failures
When an infrastructure agent is tasked with triaging a failing AI pipeline, it needs to see beyond general Kubernetes event logs. An agent equipped with get_gpu_processes can instantly correlate a sudden pod restart with a sharp VRAM spike from a specific PID. It can diagnose an out-of-memory (OOM) event or identify a ‘noisy neighbor’ workload hogging shared resources before a human engineer can even open a terminal.
Intelligent Workload Placement and FinOps
GPU nodes are some of the most expensive resources in modern data centers. An agent with point-in-time telemetry can analyze real-time interconnect speeds (NVLink throughput) and VRAM fragmentation across a cluster to recommend optimal placement for incoming batch training or inference jobs, maximizing hardware ROI.
A Unified Telemetry Plane
This tool shares a core engineering philosophy with its sister project, keda-gpu-scaler (a Kubernetes External Scaler developed to drive hardware-aware autoscaling). Both projects leverage the same node-local NVML telemetry layer, but route it to different control surfaces:
- keda-gpu-scaler routes NVML data directly to a gRPC control loop to drive horizontal pod autoscaling and scale-to-zero logic based on real-time VRAM pressure.
- gpu-mcp-server routes the same NVML telemetry format into an MCP transport layer to drive cognitive reasoning and interactive troubleshooting for AI agents.
By standardizing on a direct NVML data plane, you minimize tool sprawl and establish a single, unified hardware-to-software feedback loop.
The Infrastructure Shift
Kubernetes and modern cloud-native platforms were built to abstract away general-purpose CPUs and memory. As AI workloads dominate the enterprise, our infrastructure toolchain must evolve to make hardware accelerators first-class citizens.
Whether it is scheduling engines such as Volcano adding NUMA-aware topologies, virtualization platforms such as HAMi sharing raw hardware or agents utilizing MCP to reason about active compute clusters, the goal remains identical: Closing the gap between raw hardware capabilities and software control loops.
Exposing real-time hardware telemetry to the software layers that orchestrate it isn’t an edge-case optimization — it is the foundation of scalable, autonomous infrastructure.

