GPU Server

io.github.mesutoezdil由 GitHub 帳號 mesutoezdil 發布v0.1.3更新於 Nov 3, 2026

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

概覽

AI 產生的概覽

本機 MCP 伺服器,把 NVIDIA GPU 的名稱、驅動、CUDA、使用率、VRAM 與溫度等指標以唯讀工具形式提供給助理查詢。

可以做什麼
  • 讀取 GPU 名稱與驅動、CUDA 版本
  • 查看核心使用率與記憶體控制器忙碌百分比
  • 回報 VRAM 總量、已用、可用(MiB)及使用百分比
  • 讀取 GPU 核心溫度(攝氏)
  • 一次呼叫回傳以上全部資訊
適用情境
適合想直接向助理詢問所在機器 GPU 狀態時使用,例如載入模型前確認 VRAM 餘量、在工作負載進行中觀察使用率與溫度,而不必手動執行 nvidia-smi。
執行需求
以 Python 套件形式透過 stdio 在本機執行(pip install gpu-server,或以 uvx gpu-server 免安裝執行)。需要 Python 3.10 以上、MCP Python SDK 2.x,以及已安裝驅動的 NVIDIA GPU;優先查詢 NVML,無法使用時改用 nvidia-smi。未宣告帳號、金鑰或環境變數。
安裝前請注意
五個工具皆標示為唯讀,不會改變 GPU 狀態。僅能在裝有 NVIDIA GPU 與驅動的機器上使用;nvidia-smi 備援路徑不提供 CUDA 版本。注意套件改名:舊 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

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。