vram-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vram-mcpFree up 2GB of VRAM"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vram-mcp
An MCP server that lets AI agents inspect and free NVIDIA GPU VRAM by managing Ollama models. Handy when you juggle several local models across projects on a single GPU and an agent needs to make room before loading the next one.
NVIDIA + Ollama only for v1.
Degrades gracefully when
nvidia-smiis absent: VRAM readings becomeunknown, but model list / unload / warm still work.
Tools
Tool | Behavior |
| Per-GPU VRAM (total/used/free) + loaded Ollama models (with claims, busy signal, CPU-offload) + every other VRAM-holding process + best free MB. |
| The models currently resident in VRAM (name, VRAM MB, expiry, claims, busy). |
| Evict one model from VRAM now ( |
| Unload models largest-first until at least |
| Load/pin a model into VRAM for a duration. |
| Heuristic suggestions (e.g. |
| Declare you're using a model, so others see who/why before evicting it. |
| Extend a claim before it expires. |
| Release a claim early. |
| See active claims (all models, or one). |
Related MCP server: Ollama MCP Server
Requirements
Ollama running locally (or reachable via
OLLAMA_BASE_URL).NVIDIA GPU + drivers for VRAM numbers.
nvidia-smiis optional — without it, VRAM is reported asunknownand model operations still function.Python 3.10+.
Install
Run directly with uv (no install needed):
uvx vram-mcpOr install from source for development:
git clone https://github.com/sushiHex/vram-mcp
cd vram-mcp
pip install -e .Run
vram-mcpThe server speaks MCP over stdio, so it is normally launched by an MCP client rather than by hand.
MCP client config
Add this to your MCP client's mcpServers config (e.g. Claude Code / Claude
Desktop):
{
"mcpServers": {
"vram": {
"command": "uvx",
"args": ["vram-mcp"]
}
}
}Configuration
OLLAMA_BASE_URL— Ollama endpoint. Defaults tohttp://127.0.0.1:11434.
Multi-session coordination
Since every session runs its own vram-mcp process, coordination happens via:
Claims — a shared, file-based ledger (
~/.cache/vram-mcp/claims.json) recording who's using a model and why. Callclaim()when you start relying on a model;renew()periodically if still in use. An un-renewed claim simply expires — no cleanup needed if your session ends unexpectedly.Busy detection — best-effort, via NVML's per-process GPU utilization (not point-in-time; reads a short recent window so brief gaps between tokens don't misread as idle). Requires no changes to how you call Ollama — it's entirely on vram-mcp's side.
Protection —
unload()/ensure_free()refuse to evict a model that's claimed OR busy, by default. Passforce=Truewhen you've already decided it's worth it.
Requires the nvidia-ml-py dependency (installed automatically). Falls back gracefully — claims/busy report as empty/null — on non-NVIDIA GPUs or if NVML is unavailable.
Development
pip install -e .
python -m pytest -qThe logic modules (gpu.py, ollama.py, core.py) are free of any mcp
import and are fully unit-tested with mocks — no real GPU, Ollama daemon, or
mcp package required to run the test suite.
Roadmap
Other backends: AMD (ROCm/
rocm-smi), Intel (xpu-smi).Other runtimes: vLLM, llama.cpp.
License
MIT © 2026 sushiHex
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sushiHex/vram-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server