Proxmox MCP (local LLM)¶
Chat with the Proxmox cluster from Open WebUI, using only the local Ollama models on the
NVIDIA and AMD GPU hosts. No cluster data leaves the house. The idea comes from
I connected AI to my Proxmox cluster using MCP.
That article used Cursor and a cloud model with root@pam and no TLS check. This setup uses
local models and a least-privilege token instead.
| Runs in | LXC 165 proxmox-mcp on node04 (home-cluster), Debian 13 |
| MCP server | proxmox-mcp-server (pinned in roles/proxmox_mcp/defaults/main.yml), one process per Proxmox endpoint |
| Bridge | mcpo on :8000: MCP (stdio) → OpenAPI, proxmox-mcp.service |
| Endpoints | /node01, /node02, /home-cluster, /node08 (one tool server each) |
| Auth to Proxmox | mcp@pve!mcp token on every endpoint. The secret lives only on the LXC (/etc/proxmox-mcp/tokens/) |
| Auth to mcpo | Bearer key in /etc/proxmox-mcp/mcpo.env (made on the LXC, never in the repo) |
| Chat UI | Open WebUI https://openweb.home.janwiebe.eu, Ollama on ollama-nvidia-20gb (10.0.3.177) and ollama-amd-64gb (10.0.3.206) |
| Deployed by | ansible-playbook playbooks/proxmox_mcp.yml (role proxmox_mcp) |
flowchart LR
U[Browser] --> OW[Open WebUI]
OW -- chat --> N[Ollama NVIDIA<br/>RTX 3080 + RTX 4000]
OW -- chat --> A[Ollama AMD<br/>2x V620]
OW -- "tool calls (Bearer)" --> M[mcpo :8000<br/>proxmox-mcp LXC]
M --> P1[node01] & P2[node02] & P3[home-cluster] & P4[node08]
Safety¶
- Read-only by default (
proxmox_mcp_mode: readonly). The token user hasPVEAuditorand the server runs withPROXMOX_READ_ONLY=true, which refuses every non-GET call before it reaches Proxmox. The playbook checks this on every run. proxmox_mcp_mode: operatoradds start/stop/shutdown, snapshots and console through the customMCPOperatorrole (proxmox_mcp_operator_privs). It still can't create, delete or reconfigure anything, andproxmox_api_rawis switched off. Switching back toreadonlyremoves the operator ACL.- The tool servers in Open WebUI are admin-only (empty
access_grants). - Tool routing: the server has ~300 tools, which is far too much context for a local model.
With
TOOL_ROUTING=truethe model sees three tools:route_toolsfinds the right ones by embedding (bge-small-en-v1.5, downloaded once by the playbook), thencall_routed_toolruns them.
First deploy¶
ansible-playbook playbooks/provision.yml # creates LXC 165 on node04 (Ceph "data")
ansible-playbook playbooks/proxmox_mcp.yml # PVE users/tokens, install, test, Open WebUI
ansible-playbook playbooks/site.yml # monitoring, Traefik route, DNS, NetBox, docs
Or from GitHub: Actions → deploy → Run workflow, playbook provision.yml, then
proxmox_mcp.yml.
Open WebUI¶
When vault_open_webui_api_key (an admin API key) is in the vault, the playbook adds:
- Connections → Ollama API:
http://10.0.3.177:11434(tagnvidia) andhttp://10.0.3.206:11434(tagamd). Models with the same name on both are load-balanced. - Tools: one OpenAPI server per endpoint,
http://<lxc-ip>:8000/<endpoint>, pathopenapi.json, auth Bearer.
Existing connections are left alone. Without the key, the playbook prints the values so you can enter them by hand. Get the bearer key with:
pct exec 165 -- cat /etc/proxmox-mcp/mcpo.env # on node04
Ready-made models in Open WebUI (set up 29 Nov 2026)¶
| Model | Base | Speed |
|---|---|---|
| Proxmox Assistant (fast, NVIDIA) | qwen3.6:35b-a3b | ~1 min, recommended |
| Proxmox Assistant | qwen3:30b-a3b (AMD V620) | ~2 min |
Both use the Open WebUI tool Proxmox Summary
(roles/proxmox_mcp/files/open_webui_tool_proxmox_summary.py). It has four functions:
cluster_overview, find_guest, node_status and storage_status. Each calls mcpo
(proxmox_api_raw GET /cluster/resources) and does the counting in Python, so the model
gets a few lines of exact text instead of ~25 KB of JSON. That fixed both problems from the
first live tests: wrong counts and 10+ minute answers. The four raw MCP tool servers are
still available under + → Tools for questions the summary tool can't answer.
Using it¶
- In a new chat, pick a model with good tool calling:
qwen3:30b-a3b(AMD) orqwen3-coder:30b(NVIDIA). Under Advanced params, set Function Calling = Native and Context Length (num_ctx) to at least 40960. Oneget_cluster_resourcesanswer for the home-cluster is ~40 KB. With the 16k default the model only sees part of it and answers wrongly, or forgets the question (seen in the first live test). Paste this as the System Prompt (model or chat settings):
You manage a Proxmox VE cluster through tools. For anything about the whole cluster (counts,
which node has most, totals) call call_routed_tool with name get_cluster_resources and
arguments {"type": "vm"} (or "node", "storage") ONCE; do not loop over nodes. LXC guests have
"type": "lxc" in that output. Count exactly from the tool output, never estimate. If a tool
fails, read the error and retry.
- Under + → Tools, switch on the endpoint(s) you want, for example Proxmox home-cluster.
- Ask something like:
- "Give me a health report of the home-cluster: nodes, Ceph, storage, and which guests use the most memory."
- "Which LXCs on node02 are stopped?"
- "Are all SDN zones present on every node?" (the check that caught a problem in the article)
Testing it without Open WebUI¶
scripts/proxmox-mcp-e2e.py runs the same loop Open WebUI does. It asks both Ollama hosts a
question, executes their route_tools / call_routed_tool calls against mcpo, and prints
every call and the answer:
pct push 165 scripts/proxmox-mcp-e2e.py /root/e2e.py && pct exec 165 -- python3 /root/e2e.py
What to expect (live test, 28 Nov 2026)¶
Question: "How many LXCs run in the home-cluster and which node has the most?" Real answer: 62, node05 (23).
| Model (host) | Without system prompt | With system prompt |
|---|---|---|
| qwen3-coder:30b (NVIDIA) | looped over nodes, stopped after 3, wrong | 1 call, 5 s: 59 / node04 (close, wrong) |
| qwen3:30b-a3b (AMD) | looped, wrong | 1 call, 2 min: 62 / node05 (count per node 27, a bit high) |
The tools always return the right data. Exact counting over ~25 KB of JSON is where local 30B models still slip, so check numbers that matter. Questions like "is X running", "show node02's storage" or "which SDN zones exist where" are reliable.
Operations¶
| Logs | pct exec 165 -- journalctl -u proxmox-mcp -f |
| API docs | https://proxmox-mcp.home.janwiebe.eu/docs (tool calls need the bearer key) |
| Rotate tokens | ansible-playbook playbooks/proxmox_mcp.yml -e proxmox_mcp_rotate_tokens=true |
| New bearer key | delete /etc/proxmox-mcp/mcpo.env on the LXC and run the playbook. Open WebUI gets the new key |
| Upgrade | bump proxmox_mcp_server_version / proxmox_mcp_mcpo_version |
| Remove | pveum user delete mcp@pve on every endpoint, then destroy LXC 165 |