# GPU MCP Server

Hands an agent live NVIDIA GPU telemetry: load, memory, temperature, power, PCIe and NVLink. Useful when you want to ask about the cards from the chat window.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 15
- Author: pmady
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pmady/gpu-mcp-server
- Updated: 2026-10-17
- HTML: https://affpapa.org/en/nevibecode/mcp/gpu-mcp-server

## What it does

The server is written in Go on top of the official MCP SDK and NVIDIA go-nvml. It speaks stdio and runs as a local process next to your agent, calling NVML directly through cgo, so there is no metric pipeline to stand up first.

Four tools come with it. `list_gpus` enumerates devices with load and memory figures, `get_gpu_metrics` takes an index or UUID and returns the detailed set, `get_gpu_processes` maps usage to PIDs, and `gpu_summary` aggregates across every device. MIG instances show up as separate devices and inherit the parent card's shared readings, including temperature, power and PCIe.

Building from source needs Go 1.23+, CGO, NVML headers on Linux and NVIDIA drivers on the host. A prebuilt image on GHCR skips the toolchain: `docker run --rm -i --gpus all ghcr.io/pmady/gpu-mcp-server:latest`. The `--gpus all` flag only works with the NVIDIA Container Toolkit installed. Keep `-i` in place, or the stdio transport has nothing to talk over.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add gpu-mcp-server -- docker run -i --rm ghcr.io/pmady/gpu-mcp-server:v0.1.0
```

### Codex

**Platform CLI**
```bash
codex mcp add gpu-mcp-server -- docker run -i --rm ghcr.io/pmady/gpu-mcp-server:v0.1.0
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "gpu-mcp-server": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/pmady/gpu-mcp-server:v0.1.0"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "gpu-mcp-server": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/pmady/gpu-mcp-server:v0.1.0"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add gpu-mcp-server docker run -i --rm ghcr.io/pmady/gpu-mcp-server:v0.1.0
```

## When to use it
- check which GPU is busy without opening nvidia-smi
- trace memory on a card back to a PID
- read temperature and power draw per device
- average utilization and total memory across all cards
- tell MIG instances apart from their parent GPU

## Example prompts
- List the GPUs on this machine with their utilization
- Show detailed metrics for GPU index 0
- Which processes are using the GPU right now?

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
