# GPU MCP server

> Exposes real-time NVIDIA GPU metrics like utilization, memory, temperature, and power to AI agents via the Model Context Protocol.

- Repository: https://github.com/pmady/gpu-mcp-server
- Page: https://hostedmcp.org/servers/pmady/gpu-mcp-server
- Transport: stdio
- Stars: 15
- License: Apache-2.0
- Latest version: 0.1.0

## Install

### Claude Code

```sh
claude mcp add gpu-mcp-server -- docker run -i --rm ghcr.io/pmady/gpu-mcp-server:v0.1.0
```

### Cursor (`~/.cursor/mcp.json`)

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

### VS Code (`.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"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"gpu-mcp-server","type":"stdio","command":"docker","args":["run","-i","--rm","ghcr.io/pmady/gpu-mcp-server:v0.1.0"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

```sh
codex mcp add gpu-mcp-server -- docker run -i --rm ghcr.io/pmady/gpu-mcp-server:v0.1.0
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.gpu-mcp-server]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/pmady/gpu-mcp-server:v0.1.0"]
```

### Gemini CLI

```sh
gemini mcp add -s user gpu-mcp-server docker -- run -i --rm ghcr.io/pmady/gpu-mcp-server:v0.1.0
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## Tools (4)

- `list_gpus`
- `get_gpu_metrics`
- `get_gpu_processes`
- `gpu_summary`

## FAQ

### Does this require Prometheus or dcgm-exporter?

No, the server queries NVIDIA GPU metrics directly without needing a Prometheus or dcgm-exporter setup.

### Does it support Multi-Instance GPU (MIG)?

Yes, all tools support MIG, where instances appear as separate devices with shared parent metrics like temperature and power.

### Can I run this using Docker?

Yes, prebuilt multi-arch Docker images are available on GHCR, provided the host has the NVIDIA Container Toolkit installed.
