
Vllm Ops Mcp
io.github.jaimenbell由 GitHub 帳號 jaimenbell 發布v0.1.0更新於 Oct 24, 2026
Read-only ops/health MCP server for a local vLLM instance: health tiers, GPU/VRAM, service status.
概覽
針對本機 vLLM 執行個體的唯讀維運與健康檢查伺服器:存活與真實生成兩級探測、GPU/VRAM 狀態、systemd 服務狀態與啟動參數。
- 可以做什麼
- 分兩級檢查 vLLM 健康:/v1/models 存活探測,或觸發一次真實對話補全的深度探測
- 列出已載入模型,並以自訂提示詞按需執行一次測試補全
- 透過 nvidia-smi 讀取各 GPU 的 VRAM 使用量與使用率
- 檢視 systemd 單元的載入/執行狀態、重啟次數、主行程 PID 與最後活躍時間
- 從執行中行程的命令列讀取實際啟動參數,服務未執行時回退到 exec 腳本
- 適用情境
- 當你把 vLLM 以 systemd 單元(通常跑在 WSL2 中)部署,希望助理判斷它是否真的能生成、佔用多少 VRAM、以哪些參數啟動,而不必自己登入機器排查時適用。
- 執行需求
- 本機 Python 環境(PyPI 套件 vllm-ops-mcp,stdio)。需要已執行的 vLLM OpenAI 相容端點、nvidia-smi,以及可透過 wsl -d 或原生方式存取的 systemctl。選用環境變數可設定基礎 URL、模型名稱、WSL 發行版、服務單元、exec 腳本路徑與限流;預設指向 127.0.0.1:8000 與單元 vllm。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Vllm Ops Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
vllm-ops-mcp
Read-only ops/health MCP server for a local, WSL2/systemd-managed vLLM server -- liveness vs. real-completion health tiers, GPU/VRAM status, systemd service status, and live serve-flag introspection. Built to the same standard as mcp-factory and desktop-mcp, and other local tooling in this operator's portfolio: own pyproject, own fastmcp server, honest README, real test suite, no product code before a spec was confirmed.
This is not a container-lifecycle manager. It assumes vLLM already runs
as a bare-metal systemd unit inside WSL2 (this operator's actual setup --
see vllm-autostart), not inside Docker/Podman.
Quickstart
Tools (Phase 1 -- all read-only, no gating required beyond a throughput cap)
Future extension: restart_service (Phase 2, not built)
Deliberately not implemented in this release. Per the spec: vLLM is
shared infra other bots/tools depend on (options-bot, qwen_cli.py
callers, DeerFlow fallback), so a restart tool needs its own gating design
(off by default, VLLM_OPS_MCP_ENABLE_RESTART=1, refuse to touch a healthy
instance unless force=True, rate-capped) before it ships -- not
retrofitted onto a read-only MVP. Tracked as a v2 idea, not a current
capability. If built, it should wrap run-vllm.cmd's exact recipe (systemctl start vllm only, never blind stop/restart) rather than reinvent it.
The differentiator: probe HTTP, not the listener
Every health signal in this server comes from an actual HTTP request to the
OpenAI-compatible API (urllib.request, not a socket/connect check). This
is deliberate, not incidental: Get-NetTCPConnection and other
listener-based checks miss WSL2-mirrored-networking-relayed ports
entirely -- a genuinely healthy 127.0.0.1:8000 can be invisible to a
listener probe run from the Windows host. check-vllm.cmd already embodies
this lesson; this server generalizes it into two tiers (liveness vs. real
generation) that nothing else in this operator's fleet exposes as MCP tools.
Security
Read this before you register vllm-ops-mcp. Honesty about blast radius is the point.
- This server shells out to
nvidia-smi,systemctl(viawsl -d), and reads/proc/<pid>/cmdline. All six tools are read-only -- nothing here starts, stops, restarts, or kills a process, and no tool accepts an argument that gets passed to a shell unescaped (unit/distro names come from server-side config, not caller input;shlex.quotewraps the one caller-adjacent path that does reach a shell string, the unit name insystemctl show). check_health(deep=True)andtest_completionfire a real inference call against a shared GPU server. Rate-limited (default 20 calls/min,VLLM_OPS_MCP_DEEP_RATE_LIMIT_PER_MIN) specifically because this vLLM instance is shared infra other bots/tools depend on -- a caller hammering this MCP could starve or slow other consumers even though every call individually looks "read-only."get_serve_config's live-process path reads/proc/<pid>/cmdline, which can include secrets if any were ever passed as CLI flags (none are, in this operator's actual setup -- the model path and flags are all non-secret; auth, if any, is environment-injected inside the exec script, not passed as an argv flag). Defense-in-depth: any argv entry whose preceding flag name matches a known-sensitive pattern (token,key,secret,password,passwd,credential--config. SENSITIVE_ARGV_FLAG_PATTERNS) has its value redacted to[REDACTED]before being returned, in both the structuredargv/flagsfields andraw_text; the flag name itself is left visible so the shape is still diagnosable. This applies across all three sources (live_process,exec_script,local_config_mirror).- No tool has any write/mutate capability in this release. There is no
env var that turns one on --
restart_servicedoesn't exist in this codebase yet (see Future extension above), so there's nothing to accidentally enable.
Honest-capabilities table
Limitations (read before relying on this)
- Per-process VRAM attribution is unreliable under this operator's actual
WSL2 GPU-passthrough config.
get_gpu_status's live smoke test (realnvidia-smi.exeagainst the real running vLLM process) returned an emptyprocesseslist even though the same call'sgpus[0]. memory_used_mibcorrectly showed 13.7GB in use by that process. This is a documentednvidia-smi --query-compute-appslimitation under some WSL2/passthrough configurations, not a bug in this server's parsing -- the tool reports the empty result honestly (ok: true, processes: []) rather than fabricating attribution. Don't rely onprocessesfor VRAM-overshoot root-causing on this setup;gpus[].memory_used_mibis the reliable signal. - No computed service uptime.
get_service_statusreturns the rawActiveEnterTimestampstring fromsystemctl(already timezone-labeled, e.g.MDT) rather than computing an elapsed duration server-side -- deliberately, per this operator's own clock-discipline rule (never state an elapsed/ETA time from estimation; artifact timestamps are often UTC while local is UTC-6/-7). Compute the delta at the call site if you need it, with an explicit timezone conversion. get_serve_config's exec-script fallback is best-effort shell-text parsing, not an exact argv array -- it handles\line continuations and basic quoting viashlex.split, but a sufficiently unusual exec script could parse incorrectly. The live-process path (/proc/<pid>/ cmdline) does not have this limitation (it's the kernel's exact argv, null-separated) and is always preferred when the unit is up.- WSL2-specific by default, but the seam is explicit.
get_service_statusandget_serve_config's live-process path assume this server runs on the Windows host and shells into WSL2 viawsl -d <distro>. SetVLLM_OPS_MCP_RUNS_IN_WSL=1if this server process itself runs inside WSL2/Linux natively (nativesystemctl/cat, nowsl -dhop) -- both paths are unit-tested (TestGetServiceStatus::test_uses_wsl_prefix_on_windows/test_no_wsl_prefix_when_native), but only the Windows-host path has been live-verified against this operator's actual setup. - Single vLLM instance, single GPU, this operator's setup. No
multi-instance/multi-GPU aggregation;
get_gpu_statusreturns whatevernvidia-smi --query-gpuenumerates, which is every GPU visible to the process, not scoped to "the GPU vLLM is using" if more than one exists. - No lifecycle control whatsoever in this release. See "Future extension" above -- this is intentional, not an oversight.
Env vars
Usage examples
Testing
CI (.github/workflows/ci.yml) runs this suite on every push/PR (ubuntu-latest --
the unit suite mocks HTTP/subprocess, no live server/GPU/WSL required) and
fails the build if the Tests badge above drifts from what the suite
actually reports -- see scripts/check_readme_counts.py.
Install
Registered in ~/.claude.json as vllm-ops-mcp (stdio, own .venv, no env
overrides needed for this operator's default setup).
Commercial support
Maintained by Jaimen Bell. For production MCP integrations, custom servers, or agent-reliability work, see jaimenbell.dev.
Building your own MCP server? The MCP Starter Kit has templates, a build playbook, and packaging war-stories from shipping this one.
mcp-name: io.github.jaimenbell/vllm-ops-mcp
來源:README.md,提交 28be4a0
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分