GPU Server

io.github.moezdil由 GitHub 账号 moezdil 发布v0.2.2更新于 Nov 5, 2026

MCP server for GPU monitoring: nvidia-smi, VRAM, utilization, temperature

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

本地 MCP 服务器,暴露 NVIDIA GPU 指标(型号、驱动、CUDA、显存、利用率、温度),让助手在对话中报告 GPU 状态。

可以做什么
  • 读取 GPU 身份信息:每块设备的型号、驱动版本和 CUDA 版本
  • 读取利用率:核心与显存控制器占用百分比
  • 读取显存:总量、已用、空闲(MiB)及使用百分比
  • 读取温度:每块设备的核心温度(摄氏度)
  • 一次性获取完整快照:汇总所有设备的信息、显存、利用率和温度
适用场景
适合在装有 NVIDIA 硬件的机器上查看 GPU 健康状况、显存余量和温度,例如训练模型或运行本地模型时,无需手动执行 nvidia-smi。
运行要求
以本地 Python 进程运行(Python 3.10 及以上,MCP Python SDK 2.x),可从 PyPI 安装 gpu-server 或用 uvx 直接运行。需要主机上装有驱动程序的 NVIDIA GPU;优先直接查询 NVML,不可用时回退到 nvidia-smi。未声明账号、密钥或环境变量。
安装前请注意
五个工具均标注为只读,不会修改数据。走 nvidia-smi 回退路径时 CUDA 版本为 null。该包在 PyPI 上已改名,旧名称停留在旧版本且无法配合 MCP 2.x 启动,应安装当前名称。

安装

在 SourceWeft 中

  1. 打开 控制台中的 GPU Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-name: io.github.moezdil/mcp-gpu-server

mcp-gpu-server

[PyPI]

An MCP server that exposes NVIDIA GPU metrics as tools. Once connected, any MCP-compatible client can query your GPU status in real time directly from a conversation.

What it does

Instead of running nvidia-smi manually, you ask your AI assistant and it calls these tools automatically:

gpu_info         GPU name, driver version, CUDA versiongpu_utilization  core utilization % and memory controller busy %gpu_vram         total, used, free VRAM in MiB and usage %gpu_temperature  GPU core temperature in Celsiusgpu_stats        everything above in one call

Example response from gpu_stats:

{  "count": 1,  "gpus": [{    "index": 0,    "name": "NVIDIA L40S",    "driver": "580.126.09",    "cuda": "13.0",    "temp_c": 29,    "gpu_pct": 0,    "mem_pct": 0,    "vram": {      "total_mib": 46068,      "used_mib": 610,      "free_mib": 45457,      "pct": 1.3    }  }]}

How it works

Queries NVML (pynvml) directly when available. Falls back to nvidia-smi subprocess if NVML is not accessible. Returns clean JSON in both cases. The nvidia-smi query does not include the CUDA version, so cuda is null on that path.

Install

pip install gpu-server

The package moved from mcp-gpu-server to gpu-server on PyPI in 0.2.1. The old name is frozen at 0.1.3, which does not start with mcp 2.x. The mcp-gpu-server command still works, and since 0.2.2 gpu-server does too.

Listed on the official MCP Registry as io.github.moezdil/mcp-gpu-server.

Connect to your MCP client

Add this to your MCP client config file:

{  "mcpServers": {    "gpu": {      "command": "mcp-gpu-server"    }  }}

Or without installing anything, using uv:

{  "mcpServers": {    "gpu": {      "command": "uvx",      "args": ["gpu-server"]    }  }}

Run tests

uv run pytest tests/test_server.py   # no GPU neededuv run python tests/test_gpu.py      # on a GPU host

Tested on real hardware

Release 0.2.2 was installed from PyPI into a clean virtual environment on a Linux host and tested against a real GPU on 2026-10-21.

GPUNVIDIA GeForce RTX 3090, 24 GB
Driver / CUDA580.178.04 / 13.0
Python3.14.4
Packagesgpu-server 0.2.2, mcp 2.3.0, nvidia-ml-py 13.615.71

Install the published package and run the GPU integration test:

python3 -m venv venvvenv/bin/pip install gpu-server==0.2.2git clone --depth 1 https://github.com/moezdil/mcp-gpu-server.git repovenv/bin/python repo/tests/test_gpu.py

Result: all 37 checks passed. They exercise the NVML path; the nvidia-smi fallback is only checked for presence, not parsed.

Then call every tool through a real MCP client over stdio:

import anyio, json, sysfrom mcp import Client, StdioServerParameters
async def main():    async with Client(StdioServerParameters(command=sys.argv[1])) as c:        print("protocol:", c.protocol_version)        for t in (await c.list_tools()).tools:            r = await c.call_tool(t.name, {})            print(t.name, t.annotations.read_only_hint, json.dumps(r.structured_content))
anyio.run(main)

Saved as e2e.py and run with venv/bin/python e2e.py venv/bin/gpu-server. Result: the client and server negotiated protocol 2026-07-28, all five tools are listed as read-only, and every call returned structured content without errors:

gpu_stats {"count": 1, "gpus": [{"index": 0, "name": "NVIDIA GeForce RTX 3090",  "driver": "580.178.04", "cuda": "13.0", "temp_c": 42, "gpu_pct": 0, "mem_pct": 0,  "vram": {"total_mib": 24576, "used_mib": 451, "free_mib": 24124, "pct": 1.8}}]}

Requirements

Python 3.10 or higher, MCP Python SDK 2.x. NVIDIA GPU with drivers installed on the host machine.

Links

来源:README.md,提交 a52bdcf

工具

5

gpu_info

GPU name, driver version, and CUDA version for each device.

无需输入参数。

gpu_utilization

GPU core and memory utilization percentage for each device.

无需输入参数。

gpu_vram

VRAM total, used, free (MiB) and utilization % for each device.

无需输入参数。

gpu_temperature

Core temperature in °C for each device.

无需输入参数。

gpu_stats

Full snapshot: info, VRAM, utilization, and temperature for every device.

无需输入参数。

版本历史

1
  1. v0.2.2最新Oct 21, 2026

评分

已满足适用检查项的 80%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。