PG

pmady/gpu-mcp-server

部署与 DevOps

本页由 AI 翻译,技术细节请以原文为准。 查看原文

15 stars 12 forks 质量 82 趋势 41Apache-2.0

MCP server for NVIDIA GPU metrics give AI agents real-time access to GPU utilization, memory, temperature, and power

概览

the OpenSSF Best Practices questionnaire is in progress. Once the project entry is registered at https://www.bestpractices.dev/en, swap the static badge above for the live one: An MCP server that exposes NVIDIA GPU metrics as tools. Any MCP-compatible AI agent (Claude, Goose, Cursor, etc.) can query real-time GPU utilization, memory, temperature, power, PCIe and NVLink throughput no Prometheus or dcgm-exporter required. Built on the official Go MCP SDK and NVIDIA go-nvml. All tools support MIG (Multi-Instance GPU) - MIG instances appear as separate devices with their parent GPU's shared metrics (temperature, power, PCIe). Each tool returns structured JSON. The examples below show the shape of the data an agent receives from a node with two NVIDIA A100 GPUs. get_gpu_metrics (with {"index": 0} or {"uuid": "GPU-aaaa-1111"}): MIG instances add is_mig, parent_gpu, and mig_profile fields to the get_gpu_metrics and list_gpus payloads. Add to .cursor/mcp.json for a project, or ~/.

README

以下为原文 README 节选,完整内容请查看原文。

gpu-mcp-server

Note: the OpenSSF Best Practices questionnaire is in progress. Once the project entry is registered at , swap the static badge above for the live one: [![OpenSSF Best Practices](https://www.bestpractices.dev/projects//badge)](https://www.bestpractices.dev/projects/)

An MCP server that exposes NVIDIA GPU metrics as tools. Any MCP-compatible AI agent (Claude, Goose, Cursor, etc.) can query real-time GPU utilization, memory, temperature, power, PCIe and NVLink throughput no Prometheus or dcgm-exporter required.

Built on the official Go MCP SDK and NVIDIA go-nvml.

Tools

Tool Description
list_gpus List all GPUs with utilization and memory info
get_gpu_metrics Detailed metrics for a GPU by index or UUID
get_gpu_processes PID-level GPU process attribution
gpu_summary Aggregate stats across all devices

All tools support MIG (Multi-Instance GPU) - MIG instances appear as separate devices with their parent GPU’s shared metrics (temperature, power, PCIe).

Sample output

Each tool returns structured JSON. The examples below show the shape of the data an agent receives from a node with two NVIDIA A100 GPUs.

list_gpus:

{
  "count": 2,
  "devices": [
    {
      "index": 0,
      "uuid": "GPU-aaaa-1111",
      "name": "NVIDIA A100-SXM4-80GB",
      "gpu_utilization_percent": 85,
      "memory_used_mib": 57344,
      "memory_total_mib": 81920
    },
    {
      "index": 1,
      "uuid": "GPU-bbbb-2222",
      "name": "NVIDIA A100-SXM4-80GB",
      "gpu_utilization_percent": 20,
      "memory_used_mib": 12288,
      "memory_total_mib": 81920
    }
  ]
}
在 GitHub 查看完整 README

安装

docker run --rm -i --gpus all ghcr.io/pmady/gpu-mcp-server:latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "gpu": { "command": "/path/to/gpu-mcp-server" } } }