Skip to main content
Glama

gpu-mcp

Sovereign local compute over the Model Context Protocol.

gpu-mcp is a zero-dependency (stdlib-only), air-gappable MCP server that exposes your local NVIDIA GPU (CUDA) and Rust → WASM toolchain to any MCP client — Claude Desktop, Cursor, gemini-cli, or Hermes Agent — as protocol-native tools. Nothing leaves the machine: the brain is a local model socket, the hands are local processes.

Canonical scheme (Hermes): ae://glocal-agent (alias +ae://cc, home://).

Tools

tool

what it does

probe_gpu

Live nvidia-smi telemetry on the local machine

compile_kernel

Compile a CUDA matmul kernel with nvcc (via MSVC vcvars64)

run_kernel

Execute the compiled CUDA kernel on the local GPU, host-side timed

rust_build_wasm

Compile a Rust crate to wasm32-unknown-unknown (local)

rust_run_wasm

Run a .wasm via wasmtime if present; else report capability

Related MCP server: WEATHGARDS

Install

pip install gpu-mcp
# or, from source
git clone https://github.com/MYaelMendez/gpu-mcp && cd gpu-mcp
pip install -e .

Run the server

python -m gpu_mcp                 # stdio MCP server (register this with your client)
python -m gpu_mcp --self-test    # MCP handshake self-check (no GPU required)

Register with an MCP client

Point any MCP client at:

{
  "mcpServers": {
    "gpu-mcp": {
      "command": "python",
      "args": ["-m", "gpu_mcp"]
    }
  }
}

Works with Claude Desktop, Cursor, gemini-cli, and the Hermes Agent ae://glocal-agent surface.

Hermes Agent integration

gpu-mcp is a first-party primitive of the Hermes Agent sovereign stack. In hermes-fork, the VS Code extension bundles it and the conductor resolves ae://glocal-agent → mcp://gpu-mcp. This repo is the canonical, standalone, pip-installable source of truth.

Tests

pytest                              # MCP handshake + offline hands
python -m gpu_mcp --self-test     # quick in-process handshake check

GPU/wasm tool tests exercise real nvidia-smi, nvcc, and cargo when present; they fail loud (not silent) when the local toolchain is missing.

Python on the RTX — verified optional compute environment

The MCP transport remains stdlib-only. The optional CuPy environment runs actual Python array kernels and cuBLAS locally, without uploading code or introducing an arbitrary remote run_python endpoint.

On Windows, create the GPU virtual environment in an ASCII-only physical path (the Victus reference uses C:/gpu). Preserve æ:// and Unicode in the language, source and UI; NVRTC's filesystem/include handling is a separate concern. Use uv pip --python <GPU interpreter> rather than a pip belonging to another Python.

uv venv --python 3.12 C:/gpu
uv pip install --python C:/gpu/Scripts/python.exe -r requirements-gpu.txt
C:/gpu/Scripts/python.exe tools/python_gpu_check.py --size 256 --repeats 5 --output receipt.json

Do not recreate an existing environment blindly. Install only one CuPy wheel family: cupy-cuda13x for the CUDA 13 reference toolchain. The older CUDA 12 wheel could perform NVRTC arithmetic after moving to an ASCII path, but its cuBLAS import failed because the local toolkit provides CUDA 13 libraries. Changing paths and selecting the matching wheel solved different problems.

The bounded verifier checks NVRTC sum-of-squares and GPU float32 matrix multiplication against NumPy CPU references. It reports CUDA-event and host enqueue/synchronize timings separately, excludes initialization/transfers/validation from those timings, and fails instead of substituting CPU execution. Existing receipt files are never overwritten. Its SHA-256 protects record integrity; it is not a signature, independent witness, settlement proof or performance SLA.

Reference run: Python 3.12.13, CuPy 14.2.0, NumPy 2.5.3; RTX 3050 Laptop, compute capability 8.6; 256×256 float32 matmul, five warm repeats, CUDA-event median 0.075584 ms, maximum absolute error 0.0000686646. This is a small validated workload, not a whole-system throughput claim. Only the Windows reference was exercised.

Why

Cloud agents can't give you your own GPU. gpu-mcp is the command-&-control surface for a bounded, offline local agent — your silicon, your weights, your rules. #opensourceware #hermiphicationisinevitable


MIT — © Yael Mendez · æ.store

Available Tools

5 tools
compile_kernelB

Compile a CUDA matmul kernel with nvcc (via MSVC vcvars).

Inputs: name (required).

probe_gpuA

Read live NVIDIA GPU telemetry (nvidia-smi) on the local machine.

Inputs: no named parameters.

run_kernelB

Run a previously compiled CUDA kernel on the local GPU.

Inputs: name (required).

rust_build_wasmB

Compile a Rust crate to wasm32-unknown-unknown (local).

Inputs: crate_dir (required).

rust_run_wasmA

Run a .wasm via wasmtime if present; else report capability.

Inputs: wasm_path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation3/5

    The GPU tools (compile_kernel, run_kernel, probe_gpu) are distinct from the Rust/WASM tools (rust_build_wasm, rust_run_wasm), but the mixing of two unrelated domains under the 'gpu-mcp' name creates confusion about which tool to use for a given task.

    Naming Consistency4/5

    All tools follow a verb_noun pattern (e.g., compile_kernel, probe_gpu), but the Rust tools include a 'rust_' prefix while the GPU tools do not, introducing a minor inconsistency.

    Tool Count5/5

    With only 5 tools, the number is well-suited for a focused MCP server. Each tool serves a specific purpose without unnecessary redundancy.

    Completeness3/5

    The GPU toolset covers compilation, execution, and monitoring, but lacks features like device management or memory operations. The Rust/WASM subset is minimal and feels like an afterthought, leaving both domains incomplete.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Exposes NVIDIA GPU metrics (info, utilization, VRAM, temperature) via MCP tools for real-time querying from AI assistants.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Unified MCP server for managing local model runtimes (Ollama, LM Studio, etc.), enabling provider-agnostic discovery, lifecycle management, hardware-fit checks, and delegated inference.
      22
      516 npm
      Creative Commons Attribution Non Commercial No Derivatives 4.0 International
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables peer-to-peer AI inference donation by exposing MCP tools to check node status and request capacity, with local-first compute sharing, consent, and metering.
      89 npm
      MIT