@solomonneas/proxmox-mcp 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -586
- package/dist/cli.js +19 -2
- package/dist/mcp-bin.js +19 -2
- package/dist/mcp-server.js +19 -2
- package/package.json +19 -2
package/README.md
CHANGED
|
@@ -1,666 +1,191 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="docs/assets/proxmox-mcp-social-preview.jpg" alt="proxmox-mcp banner" width="900">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
<a href="https://lidless.dev"><img src="docs/assets/marks/proxmox-mcp-circle.png" width="48" alt="Lidless Labs"></a>
|
|
7
|
-
</p>
|
|
8
|
-
<h1 align="center">proxmox-mcp</h1>
|
|
9
|
-
|
|
10
|
-
<p align="center">
|
|
11
|
-
<strong>An MCP server that lets an AI client read and operate a Proxmox VE cluster, VMs, containers, and nodes, over plain API-token auth.</strong>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
<p align="center">
|
|
15
|
-
Why: your homelab lives in Proxmox, and you want an agent to inventory it, boot a guest, or trace a task without you clicking through the web UI. How it differs: a strict three-tier write gate is built into every tool, so reads are open but anything that changes state needs an explicit confirm flag, and anything destructive needs two more gates on top. <strong>Status: WIP.</strong> The tool surface and the safety model are stable, but the package is still pre-1.0. The package version is <code>0.13.1</code>.
|
|
16
|
-
</p>
|
|
17
|
-
|
|
18
|
-
<p align="center">
|
|
19
|
-
<a href="https://lidless.dev/proxmox-mcp"><strong>Website & docs → lidless.dev/proxmox-mcp</strong></a>
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
<p align="center">
|
|
23
|
-
<img src="https://shieldcn.dev/github/ci/lidless-labs/proxmox-mcp.svg?branch=master&workflow=ci.yml" alt="CI status">
|
|
24
|
-
<img src="https://shieldcn.dev/npm/@solomonneas/proxmox-mcp.svg" alt="npm version">
|
|
25
|
-
<img src="https://shieldcn.dev/badge/MCP-server-8A2BE2.svg" alt="MCP server">
|
|
26
|
-
<img src="https://shieldcn.dev/badge/license-MIT-green.svg" alt="MIT license">
|
|
27
|
-
</p>
|
|
28
|
-
|
|
29
|
-
## What it does
|
|
30
|
-
|
|
31
|
-
proxmox-mcp is an open-source [Model Context Protocol](https://modelcontextprotocol.io) server for [Proxmox VE](https://www.proxmox.com/en/proxmox-virtual-environment/overview), the open-source virtualization platform. It gives an AI client (Claude Desktop, Claude Code, OpenClaw, Codex CLI, or any MCP host) a structured, gated interface to a Proxmox cluster: inventory VMs and LXC containers, inspect node and storage status, read RRD metrics, trace tasks, manage snapshots and backups, run gated reads and shell commands inside guests, and provision, clone, or destroy resources, all over Proxmox API-token auth.
|
|
32
|
-
|
|
33
|
-
It is built for homelab and virtualization operators who want to point an agent at their cluster without handing it a root shell. The differentiator is the write-safety model: 102 tools split across four tiers, where reads need nothing, safe writes need `confirm: true`, and destructive operations need `confirm: true` + `destructive: true` + a process-level `PROXMOX_ENABLE_DESTRUCTIVE=1` env flag. A hallucinated or careless tool call fails closed, before any HTTP traffic reaches Proxmox.
|
|
34
|
-
|
|
35
|
-
## Proof
|
|
36
|
-
|
|
37
|
-
A real MCP client config. Drop this into Claude Desktop (`claude_desktop_config.json`) and the 102 tools appear in the client. Reads work immediately; the destructive env gate stays off until you opt in.
|
|
38
|
-
|
|
39
|
-
```json
|
|
40
|
-
{
|
|
41
|
-
"mcpServers": {
|
|
42
|
-
"proxmox": {
|
|
43
|
-
"command": "npx",
|
|
44
|
-
"args": ["-y", "@solomonneas/proxmox-mcp"],
|
|
45
|
-
"env": {
|
|
46
|
-
"PROXMOX_URL": "https://192.0.2.10:8006",
|
|
47
|
-
"PROXMOX_TOKEN_ID": "pve-admin@pam!api-token-1",
|
|
48
|
-
"PROXMOX_TOKEN_SECRET": "REPLACE_WITH_TOKEN_SECRET",
|
|
49
|
-
"PROXMOX_TLS_INSECURE": "false"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Tool list (102 tools: 49 Tier-1 read, 44 Tier-2 including 4 gated guest reads, and 9 Tier-3; verified against source)
|
|
57
|
-
|
|
58
|
-
Tier markers below are authoritative: each tool's gate is enforced in code (`src/gates.ts` + per-tool schema), and `WriteGateError` fires before any HTTP call when a gate is unmet.
|
|
59
|
-
|
|
60
|
-

|
|
61
|
-
|
|
62
|
-
Generated from [`docs/assets/workflows/proxmox-safety.json`](docs/assets/workflows/proxmox-safety.json) with `lidless workflow`.
|
|
63
|
-
|
|
64
|
-
| Tool | Tier | Notes |
|
|
65
|
-
| --- | --- | --- |
|
|
66
|
-
| `proxmox_status` | 1 read | Cluster + node status. |
|
|
67
|
-
| `proxmox_list_containers` | 1 read | LXC inventory across all nodes. |
|
|
68
|
-
| `proxmox_list_vms` | 1 read | QEMU inventory across all nodes. |
|
|
69
|
-
| `proxmox_get_resource` | 1 read | Single container or VM config + status by vmid. |
|
|
70
|
-
| `proxmox_get_vm_config` | 1 read | QEMU VM config by vmid. |
|
|
71
|
-
| `proxmox_get_container_config` | 1 read | LXC container config by vmid. |
|
|
72
|
-
| `proxmox_validate_qemu_smoke_source` | 1 read | Preflight a QEMU VM before live smoke cloning. |
|
|
73
|
-
| `proxmox_audit_permissions` | 1 read | Inspect effective permissions across smoke-relevant paths. |
|
|
74
|
-
| `proxmox_recent_tasks` | 1 read | Recent UPID task list per node. |
|
|
75
|
-
| `proxmox_list_backups` | 1 read | Backup inventory by storage. |
|
|
76
|
-
| `proxmox_resource_usage` | 1 read | CPU/mem/disk RRD metrics. |
|
|
77
|
-
| `proxmox_list_templates` | 1 read | LXC + VM templates available for cloning + container creation. |
|
|
78
|
-
| `proxmox_list_storage` | 1 read | Storage status on one node or all nodes. |
|
|
79
|
-
| `proxmox_list_snapshots` | 1 read | Snapshot inventory for one LXC or VM. |
|
|
80
|
-
| `proxmox_guest_network` | 1 read | Guest network interfaces and usable IPv4 addresses. |
|
|
81
|
-
| `proxmox_wait_task` | 1 read | Poll a UPID until stopped or timeout. |
|
|
82
|
-
| `proxmox_next_vmid` | 1 read | Get the next available VMID for provisioning. |
|
|
83
|
-
| `proxmox_list_pool_resources` | 1 read | Inspect resources assigned to a Proxmox pool, defaulting to `mcp-smoke`. |
|
|
84
|
-
| `proxmox_get_task_status` | 1 read | Single UPID status lookup. |
|
|
85
|
-
| `proxmox_get_task_log` | 1 read | Task log tail for a UPID. |
|
|
86
|
-
| `proxmox_list_storage_content` | 1 read | List volumes on a storage: ISOs, templates, disk images, backups. |
|
|
87
|
-
| `proxmox_list_node_services` | 1 read | Host systemd service states (pveproxy, pvedaemon, corosync). |
|
|
88
|
-
| `proxmox_list_disks` | 1 read | Physical disks with model/size/SMART health/wearout. |
|
|
89
|
-
| `proxmox_list_updates` | 1 read | Pending APT updates on a node (needs a Sys.Modify token). |
|
|
90
|
-
| `proxmox_list_firewall_rules` | 1 read | Firewall rules at cluster/node/guest scope. |
|
|
91
|
-
| `proxmox_get_firewall_options` | 1 read | Firewall enable state + default policy at a scope. |
|
|
92
|
-
| `proxmox_firewall_log` | 1 read | Firewall log for a node (requires `Sys.Syslog` on `/nodes/{node}`) or guest (requires `VM.Console` on `/vms/{vmid}`). |
|
|
93
|
-
| `proxmox_list_storage_config` | 1 read | Datacenter storage definitions (id/type/content/nodes). |
|
|
94
|
-
| `proxmox_list_backup_jobs` | 1 read | Scheduled vzdump backup jobs. |
|
|
95
|
-
| `proxmox_list_unprotected_guests` | 1 read | Guests Proxmox reports not covered by any backup job; disabled jobs still count as coverage. Results include only guests the token holds `VM.Audit` on. |
|
|
96
|
-
| `proxmox_list_users` | 1 read | Access users (userid, realm, enabled state). |
|
|
97
|
-
| `proxmox_list_roles` | 1 read | Roles and their privileges. |
|
|
98
|
-
| `proxmox_list_acl` | 1 read | ACL entries: who holds which role on which path. |
|
|
99
|
-
| `proxmox_list_pools` | 1 read | All resource pools. |
|
|
100
|
-
| `proxmox_list_tokens` | 1 read | API tokens for a user. |
|
|
101
|
-
| `proxmox_list_tfa` | 1 read | TFA enrollment metadata, with secret fields omitted. |
|
|
102
|
-
| `proxmox_list_groups` | 1 read | Access groups and their user memberships. |
|
|
103
|
-
| `proxmox_list_auth_domains` | 1 read | Authentication domains and configured TFA provider. |
|
|
104
|
-
| `proxmox_cluster_status` | 1 read | Cluster membership + quorum per node. |
|
|
105
|
-
| `proxmox_ha_status` | 1 read | HA manager status: quorum, fencing, resource states. |
|
|
106
|
-
| `proxmox_list_ha_resources` | 1 read | HA-managed resources. |
|
|
107
|
-
| `proxmox_list_ha_rules` | 1 read | HA rules (PVE 9+ replacement for HA groups). |
|
|
108
|
-
| `proxmox_list_replication` | 1 read | Storage replication jobs. |
|
|
109
|
-
| `proxmox_list_sdn_zones` | 1 read | SDN zones. |
|
|
110
|
-
| `proxmox_list_sdn_vnets` | 1 read | SDN virtual networks. |
|
|
111
|
-
| `proxmox_list_metric_servers` | 1 read | External metrics servers (InfluxDB/Graphite). |
|
|
112
|
-
| `proxmox_get_cluster_options` | 1 read | Datacenter options (keyboard, MAC prefix, tags). |
|
|
113
|
-
| `proxmox_cluster_log` | 1 read | Recent cluster-wide log entries. |
|
|
114
|
-
| `proxmox_node_journal` | 1 read | Pre-rendered node journal text with cursor entries removed. Priority, service, and kernel filters require pve-manager 9.2.4 or later. |
|
|
115
|
-
| `proxmox_read_file` | 2 gated guest read | Read a file from inside an LXC or QEMU VM (SSH + `cat`). Requires `confirm: true`. |
|
|
116
|
-
| `proxmox_stat_path` | 2 gated guest read | Inspect guest path metadata. Requires `confirm: true`. |
|
|
117
|
-
| `proxmox_list_directory` | 2 gated guest read | List one guest directory. Requires `confirm: true`. |
|
|
118
|
-
| `proxmox_service_status` | 2 gated guest read | Read systemd service state inside a guest. Requires `confirm: true`. |
|
|
119
|
-
| `proxmox_start_resource` | 2 safe-write | Boot container or VM. Requires `confirm: true`. |
|
|
120
|
-
| `proxmox_stop_resource` | 2 safe-write | Graceful shutdown. Requires `confirm: true`. |
|
|
121
|
-
| `proxmox_reboot_resource` | 2 safe-write | Reboot in place. Requires `confirm: true`. |
|
|
122
|
-
| `proxmox_snapshot_resource` | 2 safe-write | Create named snapshot. Requires `confirm: true`. |
|
|
123
|
-
| `proxmox_run_backup` | 2 safe-write | Trigger vzdump for a vmid. Requires `confirm: true`. |
|
|
124
|
-
| `proxmox_create_container` | 2 safe-write | Provision new LXC from template (`POST /nodes/{node}/lxc`). Requires `confirm: true`. |
|
|
125
|
-
| `proxmox_create_vm` | 2 safe-write | Provision new QEMU VM (`POST /nodes/{node}/qemu`). Requires `confirm: true`. |
|
|
126
|
-
| `proxmox_clone_resource` | 2 safe-write | Clone existing container or VM into a fresh vmid. Requires `confirm: true`. |
|
|
127
|
-
| `proxmox_exec` | 2 safe-write | Run a shell command inside an LXC or QEMU VM. Returns stdout/stderr/exit_code. Requires `confirm: true`. |
|
|
128
|
-
| `proxmox_write_file` | 2 safe-write | Write a text file (with parent dirs) inside an LXC or QEMU VM. Requires `confirm: true`. |
|
|
129
|
-
| `proxmox_service_start` | 2 safe-write | Start a systemd service inside a guest. Requires `confirm: true`. |
|
|
130
|
-
| `proxmox_service_stop` | 2 safe-write | Stop a systemd service inside a guest. Requires `confirm: true`. |
|
|
131
|
-
| `proxmox_service_restart` | 2 safe-write | Restart a systemd service inside a guest. Requires `confirm: true`. |
|
|
132
|
-
| `proxmox_update_vm_config` | 2 safe-write | Edit an existing QEMU VM config (cores/memory/net/etc, `PUT .../qemu/{vmid}/config`). Requires `confirm: true`. |
|
|
133
|
-
| `proxmox_update_container_config` | 2 safe-write | Edit an existing LXC config (cores/memory/hostname/etc, `PUT .../lxc/{vmid}/config`). Requires `confirm: true`. |
|
|
134
|
-
| `proxmox_resize_disk` | 2 safe-write | Grow a VM or container disk (`PUT .../{type}/{vmid}/resize`). Grow-only. Requires `confirm: true`. |
|
|
135
|
-
| `proxmox_migrate_resource` | 2 safe-write | Migrate a VM or container to another node (`POST .../migrate`). Requires `confirm: true`. |
|
|
136
|
-
| `proxmox_suspend_resource` | 2 safe-write | Suspend/pause a running guest (QEMU can hibernate to disk). Requires `confirm: true`. |
|
|
137
|
-
| `proxmox_resume_resource` | 2 safe-write | Resume a suspended guest. Requires `confirm: true`. |
|
|
138
|
-
| `proxmox_reset_resource` | 2 safe-write | Hard-reset a QEMU VM (reset button; no graceful shutdown). Requires `confirm: true`. |
|
|
139
|
-
| `proxmox_convert_to_template` | 2 safe-write | Convert a stopped guest into a clone template (one-way). Requires `confirm: true`. |
|
|
140
|
-
| `proxmox_download_url` | 2 safe-write | Download an ISO or container template from a URL onto a storage. Requires `confirm: true`. |
|
|
141
|
-
| `proxmox_cancel_task` | 2 safe-write | Stop a running task by UPID (abort a stuck migration/backup). Requires `confirm: true`. |
|
|
142
|
-
| `proxmox_add_firewall_rule` | 2 safe-write | Add a firewall rule at cluster/node/guest scope. Requires `confirm: true`. |
|
|
143
|
-
| `proxmox_delete_firewall_rule` | 2 safe-write | Delete a firewall rule by position at a scope. Requires `confirm: true`. |
|
|
144
|
-
| `proxmox_set_firewall_enabled` | 2 safe-write | Enable/disable the firewall at a scope. Requires `confirm: true`. |
|
|
145
|
-
| `proxmox_move_disk` | 2 safe-write | Relocate a VM disk or container volume to another storage. Requires `confirm: true`. |
|
|
146
|
-
| `proxmox_create_storage` | 2 safe-write | Define a new datacenter storage (dir/nfs/lvm/pbs/etc). Requires `confirm: true`. |
|
|
147
|
-
| `proxmox_create_backup_job` | 2 safe-write | Create a scheduled vzdump backup job. Requires `confirm: true`. |
|
|
148
|
-
| `proxmox_delete_backup_job` | 2 safe-write | Delete a scheduled backup job (archives untouched). Requires `confirm: true`. |
|
|
149
|
-
| `proxmox_set_acl` | 2 safe-write | Grant or revoke a role for a user/token/group on a path. Requires `confirm: true`. |
|
|
150
|
-
| `proxmox_create_token` | 2 safe-write | Create an API token; returns the secret once. Requires `confirm: true`. |
|
|
151
|
-
| `proxmox_delete_token` | 2 safe-write | Revoke an API token. Requires `confirm: true`. |
|
|
152
|
-
| `proxmox_create_pool` | 2 safe-write | Create a resource pool. Requires `confirm: true`. |
|
|
153
|
-
| `proxmox_update_pool` | 2 safe-write | Add/remove guests or storage in a pool. Requires `confirm: true`. |
|
|
154
|
-
| `proxmox_delete_pool` | 2 safe-write | Delete an empty resource pool. Requires `confirm: true`. |
|
|
155
|
-
| `proxmox_add_ha_resource` | 2 safe-write | Place a VM/container under HA management. Requires `confirm: true`. |
|
|
156
|
-
| `proxmox_delete_ha_resource` | 2 safe-write | Remove a guest from HA management. Requires `confirm: true`. |
|
|
157
|
-
| `proxmox_create_replication` | 2 safe-write | Create a storage replication job to another node. Requires `confirm: true`. |
|
|
158
|
-
| `proxmox_delete_replication` | 2 safe-write | Delete a replication job. Requires `confirm: true`. |
|
|
159
|
-
| `proxmox_rollback_snapshot` | 3 destructive | Roll back a resource to a named snapshot. |
|
|
160
|
-
| `proxmox_destroy_resource` | 3 destructive | Permanently delete an LXC or VM (`DELETE /nodes/{node}/{type}/{vmid}`). |
|
|
161
|
-
| `proxmox_cleanup_smoke_resources` | 3 destructive | Dry-run or destroy smoke-prefixed LXC/QEMU guests from a smoke pool. |
|
|
162
|
-
| `proxmox_delete_snapshot` | 3 destructive | Delete a named snapshot. |
|
|
163
|
-
| `proxmox_force_stop_resource` | 3 destructive | Non-graceful hard stop of a running container or VM. |
|
|
164
|
-
| `proxmox_delete_volume` | 3 destructive | Permanently delete a storage volume (backup, ISO, template, disk image). |
|
|
165
|
-
| `proxmox_node_power` | 3 destructive | Reboot or shut down an entire node, taking down every guest on it. |
|
|
166
|
-
| `proxmox_delete_storage` | 3 destructive | Remove a storage definition from the datacenter config. |
|
|
167
|
-
| `proxmox_restore_backup` | 3 destructive | Restore a vzdump/PBS archive into a VMID. Overwriting an existing VMID wipes its disks and requires the destructive gate. |
|
|
168
|
-
|
|
169
|
-
**Reads (46):** open; no flags required.
|
|
170
|
-
**Gated guest reads (4):** guest file/path/directory/service inspection tools require `confirm: true` because they expose in-guest state through host-backed SSH.
|
|
171
|
-
**Safe writes (40):** require `confirm: true`. The schema documents the gate on every tool. `WriteGateError` fires before any HTTP call.
|
|
172
|
-
**Destructive (9):** require `confirm: true` + `destructive: true` + env `PROXMOX_ENABLE_DESTRUCTIVE=1`. All three gates must be satisfied; if any one is missing the tool throws `WriteGateError` before resolving the resource.
|
|
173
|
-
|
|
174
|
-
**MCP annotations.** `tools/list` reports `readOnlyHint`, `destructiveHint` and `openWorldHint` on every tool (`true` only for `proxmox_download_url`, which fetches from a host outside the cluster, and `proxmox_exec`, whose shell command can contact any host), plus `idempotentHint` where it applies, so clients that ask a person before running a tool can do so. The annotations follow the tier with these refinements: the four gated guest reads report `readOnlyHint: true`, and the safe-write tools that execute commands, write files, stop or reset workloads, or change credentials, permissions, firewall or storage placement report `destructiveHint: true` even though their gate stays `confirm: true`. The gate arguments a call must carry are unchanged; the hint only changes how a client presents the call. The full list lives in `src/registry.ts`.
|
|
175
|
-
|
|
176
|
-
> Nine tools use the destructive gate and can delete, overwrite guest disks, hard-stop, or power off resources: `proxmox_destroy_resource`, `proxmox_cleanup_smoke_resources`, `proxmox_rollback_snapshot`, `proxmox_delete_snapshot`, `proxmox_force_stop_resource`, `proxmox_delete_volume`, `proxmox_node_power`, `proxmox_delete_storage`, and `proxmox_restore_backup`. Overwriting an existing VMID with `proxmox_restore_backup` wipes its disks. These tools are gated behind the `PROXMOX_ENABLE_DESTRUCTIVE=1` process env flag. See [SECURITY.md](SECURITY.md) and the [Safety](#safety) section.
|
|
177
|
-
|
|
178
|
-
## Quickstart
|
|
179
|
-
|
|
180
|
-
Install globally or run on demand with `npx`:
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
npm install -g @solomonneas/proxmox-mcp
|
|
184
|
-
# or, no install:
|
|
185
|
-
npx -y @solomonneas/proxmox-mcp
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Set the three required credential env vars (scrub real hosts and IPs out of any shared config):
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
export PROXMOX_URL=https://192.0.2.10:8006
|
|
192
|
-
export PROXMOX_TOKEN_ID=pve-admin@pam!api-token-1
|
|
193
|
-
export PROXMOX_TOKEN_SECRET=REPLACE_WITH_TOKEN_SECRET
|
|
194
|
-
|
|
195
|
-
# Optional: skip TLS cert validation for homelab self-signed certs.
|
|
196
|
-
# Accepts true/1/yes (case-insensitive). Defaults to false.
|
|
197
|
-
export PROXMOX_TLS_INSECURE=false
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
Wire it into your MCP client (full per-client config in [Setup](#setup)):
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
# Claude Code
|
|
204
|
-
claude mcp add proxmox -s user -- npx -y @solomonneas/proxmox-mcp
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Then ask your agent to list your cluster's containers. Reads work with nothing but the three credential vars; write and destructive tiers stay gated until you opt in.
|
|
208
|
-
|
|
209
|
-
> Note: the repository version is `0.13.1`. `npx` and `npm install` select the published release. This repository may track ahead between releases.
|
|
1
|
+
# proxmox-mcp
|
|
210
2
|
|
|
211
|
-
##
|
|
3
|
+
## What it is
|
|
212
4
|
|
|
213
|
-
|
|
5
|
+
proxmox-mcp connects an MCP client to Proxmox VE. It can list VMs and LXC containers, inspect storage and task logs, and run operations such as starting a guest or creating a snapshot. Guest tools can also inspect files and services or run commands inside a guest.
|
|
214
6
|
|
|
215
|
-
|
|
216
|
-
PROXMOX_URL=https://192.0.2.10:8006
|
|
217
|
-
PROXMOX_TOKEN_ID=pve-admin@pam!api-token-1
|
|
218
|
-
PROXMOX_TOKEN_SECRET=REPLACE_WITH_TOKEN_SECRET
|
|
219
|
-
|
|
220
|
-
# Optional: maximum duration for each Proxmox API request, including its response body.
|
|
221
|
-
# Defaults to 30000 ms; accepted range is 1000 to 300000 ms.
|
|
222
|
-
PROXMOX_REQUEST_TIMEOUT_MS=30000
|
|
223
|
-
|
|
224
|
-
# Optional: skip TLS cert validation (homelab self-signed certs).
|
|
225
|
-
# Accepts true/1/yes (case-insensitive). Defaults to false.
|
|
226
|
-
PROXMOX_TLS_INSECURE=false
|
|
7
|
+
## Install
|
|
227
8
|
|
|
228
|
-
|
|
229
|
-
# Accepts true/1/yes (case-insensitive). Defaults to false. See "Deferred tool loading".
|
|
230
|
-
PROXMOX_DEFERRED_TOOLS=false
|
|
231
|
-
```
|
|
9
|
+
The published package is `@solomonneas/proxmox-mcp@0.13.1`. It requires Node.js 22 or later. The repository tests Node.js 22 and 24 in CI. [Package manifest](package.json) · [CI workflow](.github/workflows/ci.yml)
|
|
232
10
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
Each Proxmox API request is bounded by `PROXMOX_REQUEST_TIMEOUT_MS`, including response-body reads. Timed-out GET requests receive the usual single retry. A timed-out write reports an unknown outcome; check `proxmox_recent_tasks` before retrying it.
|
|
236
|
-
|
|
237
|
-
Trailing slashes on `PROXMOX_URL` are stripped. The token secret is registered with the redactor on startup and masked from all log + error output.
|
|
238
|
-
|
|
239
|
-
### Deferred tool loading (experimental)
|
|
240
|
-
|
|
241
|
-
102 tool schemas cost roughly 17k tokens of context in every request, whether or not the agent needs a single one of them. Set `PROXMOX_DEFERRED_TOOLS=1` and the server instead starts with one tool, `proxmox_search_tools`. The agent describes its task, gets back matching tool descriptors, and those tools are added to that connection's tool list; the server emits `notifications/tools/list_changed`, the client re-reads the list, and the agent calls the tool it wants with its own real schema. Measured on a live connection, the visible `tools/list` payload drops from 68,495 bytes to 1,400, a 98% reduction.
|
|
242
|
-
|
|
243
|
-
Requirements and caveats:
|
|
244
|
-
|
|
245
|
-
- **Your client must honor `notifications/tools/list_changed`, and not all of them do.** Measured against a real connection:
|
|
246
|
-
|
|
247
|
-
| Client | Deferred mode | Notes |
|
|
248
|
-
| --- | --- | --- |
|
|
249
|
-
| Claude Code 2.1.219 | **works** | re-fetches `tools/list` 2ms after the notification, then calls the new tool |
|
|
250
|
-
| Cursor (cursor-agent 2026.07.23) | **does not work** | receives the notification, never re-lists; the agent is then told the tool does not exist |
|
|
251
|
-
| Codex CLI 0.145.0 | untested | could not dispatch MCP tool calls headlessly in our harness, so `list_changed` support is unknown |
|
|
252
|
-
|
|
253
|
-
A client that ignores the notification will see the search succeed, be told which tools were loaded, and then be unable to call any of them. Leave the flag unset there. Default (flag unset) is the full static tool list exactly as before, which is why static profiles remain the supported path.
|
|
254
|
-
- On clients that apply their own tool deferral, a newly listed tool may be *visible but not immediately callable* until the client fetches its schema, which costs one extra turn.
|
|
255
|
-
- **Hiding a tool is not a safety mechanism.** Destructive tools are searchable, and the gate chain is unchanged: a tool reached through search still requires `confirm: true`, `destructive: true`, and `PROXMOX_ENABLE_DESTRUCTIVE=1` exactly as it would otherwise. Search results carry each tool's tier and the gate arguments it will demand. The gates in `src/gates.ts` are the boundary; visibility is a token optimization.
|
|
256
|
-
- Calling a tool by name that search has not surfaced still works. Refusing it would create a second, weaker enforcement surface without adding safety.
|
|
257
|
-
|
|
258
|
-
### In-container exec env vars
|
|
259
|
-
|
|
260
|
-
The `proxmox_exec`, `proxmox_read_file`, and `proxmox_write_file` tools SSH to the Proxmox host (for LXC, via `pct exec`) or directly to the VM (for QEMU). All are optional; defaults derive from `PROXMOX_URL`.
|
|
261
|
-
|
|
262
|
-
| Env var | Default | Purpose |
|
|
263
|
-
| --- | --- | --- |
|
|
264
|
-
| `PROXMOX_SSH_HOST` | hostname from `PROXMOX_URL` | Proxmox host for `pct exec` |
|
|
265
|
-
| `PROXMOX_SSH_PORT` | `22` | SSH port |
|
|
266
|
-
| `PROXMOX_SSH_USER` | `root` | SSH user on Proxmox host |
|
|
267
|
-
| `PROXMOX_SSH_KEY` | `~/.ssh/id_ed25519` | Key path for Proxmox host SSH |
|
|
268
|
-
| `PROXMOX_VM_SSH_USER` | falls through to `PROXMOX_SSH_USER` | Default user for direct VM SSH |
|
|
269
|
-
| `PROXMOX_VM_SSH_KEY` | falls through to `PROXMOX_SSH_KEY` | Default key for direct VM SSH |
|
|
270
|
-
| `PROXMOX_SSH_MAX_OUTPUT_BYTES` | `1048576` | Max stdout bytes and max stderr bytes captured per SSH command |
|
|
271
|
-
| `PROXMOX_MAX_RESULT_BYTES` | `100000` | Max size of one tool result returned to the client (minimum `2048`). Larger results are replaced by a JSON envelope with `truncated: true` and a preview. |
|
|
272
|
-
| `PROXMOX_EXEC_BACKEND` | `ssh` | QEMU exec backend: `ssh` (direct SSH to the VM) or `guest-agent` (qemu-guest-agent API, no in-guest SSH key needed). LXC always uses `pct exec` over host SSH. |
|
|
273
|
-
|
|
274
|
-
Per-VM overrides (read at execute time, no MCP restart needed):
|
|
275
|
-
|
|
276
|
-
- `PROXMOX_VM_<vmid>_SSH_HOST` - pin a VM's IP (bypasses guest agent)
|
|
277
|
-
- `PROXMOX_VM_<vmid>_SSH_USER` - per-VM user override
|
|
278
|
-
- `PROXMOX_VM_<vmid>_SSH_KEY` - per-VM key override
|
|
279
|
-
|
|
280
|
-
For QEMU VMs without a per-VM env override, install `qemu-guest-agent` in the VM and enable it with `qm set <vmid> --agent 1` so the IP can be discovered automatically.
|
|
281
|
-
|
|
282
|
-
Set `PROXMOX_EXEC_BACKEND=guest-agent` to run QEMU guest commands entirely through the qemu-guest-agent API instead of SSH. This needs no in-guest SSH key and no network path from the MCP host to the VM (traffic goes through the Proxmox API), but the API token needs the `VM.GuestAgent.*` privileges (`Unrestricted` for exec, `FileRead`/`FileWrite` for file ops). LXC guests always use `pct exec` over host SSH regardless of this setting.
|
|
283
|
-
|
|
284
|
-
### Waiting for long-running tasks
|
|
285
|
-
|
|
286
|
-
Provisioning and disk operations (`proxmox_create_container`, `proxmox_create_vm`, `proxmox_clone_resource`, `proxmox_run_backup`, `proxmox_restore_backup`, `proxmox_migrate_resource`, `proxmox_resize_disk`, `proxmox_download_url`, `proxmox_destroy_resource`) return a task UPID immediately. Pass `wait: true` (with optional `wait_timeout` seconds, default 120) to block until the task finishes; the result then includes a `task` object with `done`, `exitstatus`, and `ok` (true only for an `OK` exit). Without `wait`, use `proxmox_wait_task` to poll the UPID yourself.
|
|
287
|
-
|
|
288
|
-
## CLI
|
|
289
|
-
|
|
290
|
-
The same package ships a read-only **control CLI**, `proxmoxctl` (alias `proxops`), for shells, cron, and CI. It shares the `ProxmoxClient` core with the MCP server and reads the same env config (`PROXMOX_URL`, `PROXMOX_TOKEN_ID`, `PROXMOX_TOKEN_SECRET`, `PROXMOX_TLS_INSECURE`, `PROXMOX_REQUEST_TIMEOUT_MS`). It exposes only read/inventory/audit operations; every lifecycle, snapshot, backup, and exec action stays in the MCP/plugin surface behind the safety gates.
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
npx @solomonneas/proxmox-mcp@latest status
|
|
294
|
-
# or, installed globally:
|
|
295
|
-
proxmoxctl status # PVE version + per-node status (exit 1 if a node is offline)
|
|
296
|
-
proxmoxctl vms list
|
|
297
|
-
proxmoxctl containers list
|
|
298
|
-
proxmoxctl vm config 100
|
|
299
|
-
proxmoxctl storage list --node pve
|
|
300
|
-
proxmoxctl storage content local --node pve --content backup
|
|
301
|
-
proxmoxctl disks list --node pve # physical disks + SMART health
|
|
302
|
-
proxmoxctl services list --node pve # host systemd services
|
|
303
|
-
proxmoxctl firewall rules --scope cluster
|
|
304
|
-
proxmoxctl backups list --vmid 100
|
|
305
|
-
proxmoxctl snapshots list 100
|
|
306
|
-
proxmoxctl audit-permissions
|
|
307
|
-
proxmoxctl recent-tasks --limit 20
|
|
308
|
-
proxmoxctl task status UPID:pve:...
|
|
309
|
-
proxmoxctl storage config
|
|
310
|
-
proxmoxctl backup-jobs list
|
|
311
|
-
proxmoxctl unprotected-guests
|
|
312
|
-
proxmoxctl users list
|
|
313
|
-
proxmoxctl roles list
|
|
314
|
-
proxmoxctl acl list
|
|
315
|
-
proxmoxctl pools list
|
|
316
|
-
proxmoxctl tokens list operator@pve
|
|
317
|
-
proxmoxctl tfa list operator@pve
|
|
318
|
-
proxmoxctl groups list
|
|
319
|
-
proxmoxctl auth domains
|
|
320
|
-
proxmoxctl cluster status
|
|
321
|
-
proxmoxctl ha status
|
|
322
|
-
proxmoxctl ha resources
|
|
323
|
-
proxmoxctl ha rules
|
|
324
|
-
proxmoxctl replication list
|
|
325
|
-
proxmoxctl sdn zones
|
|
326
|
-
proxmoxctl sdn vnets
|
|
327
|
-
proxmoxctl metrics servers
|
|
328
|
-
proxmoxctl cluster options
|
|
329
|
-
proxmoxctl cluster log --max=50
|
|
330
|
-
proxmoxctl node journal --node pve
|
|
331
|
-
proxmoxctl firewall log --scope node --node pve
|
|
332
|
-
proxmoxctl vms list --json # raw JSON for piping
|
|
11
|
+
```sh
|
|
12
|
+
npm install --global @solomonneas/proxmox-mcp@0.13.1
|
|
333
13
|
```
|
|
334
14
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
Run `proxmoxctl help` for the full command list. `--json` emits JSON instead of the concise summary. TFA, group, and authentication-domain output retains the MCP `<untrusted-data>` wrapper and escaped closing tags in both modes; treat the contents as data, never instructions. These access commands use the same allowlists and sanitized upstream errors as MCP. CLI results and errors use the MCP redaction and output limit (100,000 bytes by default). Larger results return a JSON truncation envelope.
|
|
338
|
-
|
|
339
|
-
Use `--` before a positional value that begins with a dash, for example `proxmoxctl tfa list -- --operator@pve`. Cluster log accepts `--max N` and `--max=N`, with an integer from 1 to 1000 and a default of 50.
|
|
340
|
-
|
|
341
|
-
Exit code `0` means success, and `2` means a usage error such as an unknown flag or invalid log limit. Exit code `1` covers runtime errors or missing health evidence. It also covers an offline node for `status` or `cluster status`, lost quorum for `cluster status` or `ha status`, and resource errors for `ha status`.
|
|
342
|
-
|
|
343
|
-
### Starting the MCP server
|
|
344
|
-
|
|
345
|
-
`proxmoxctl mcp` (or the back-compat `proxmox-mcp` bin) starts the stdio MCP server. If a launcher referenced the file path `dist/mcp-server.js` directly, it keeps working; new launchers can point at `dist/mcp-bin.js` (or `dist/cli.js mcp`). Launchers that use the `proxmox-mcp` bin name need no change.
|
|
346
|
-
|
|
347
|
-
### Shared HTTP mode
|
|
348
|
-
|
|
349
|
-
Run one persistent process for multiple MCP clients:
|
|
15
|
+
Set the variables below, then run `proxmox-mcp` to start the stdio server. To run that version without a global install:
|
|
350
16
|
|
|
351
17
|
```sh
|
|
352
|
-
|
|
353
|
-
# Or: proxmoxctl mcp --http
|
|
18
|
+
npm exec --yes --package=@solomonneas/proxmox-mcp@0.13.1 -- proxmox-mcp
|
|
354
19
|
```
|
|
355
20
|
|
|
356
|
-
|
|
357
|
-
on the server, plus an independent `PROXMOX_MCP_HTTP_TOKEN`. Generate a random
|
|
358
|
-
HTTP token, for example with `openssl rand -hex 32`. Startup refuses a missing or
|
|
359
|
-
blank token, or one equal to the Proxmox token ID, token secret, complete API
|
|
360
|
-
authorization value, or URL credentials. Tokens are compared using SHA-256 and
|
|
361
|
-
constant-time comparison. Keep the token private: every client with it shares
|
|
362
|
-
the server's Proxmox privileges and process-level destructive-operation flag.
|
|
363
|
-
|
|
364
|
-
| Variable | Default | Purpose |
|
|
365
|
-
| --- | --- | --- |
|
|
366
|
-
| `PROXMOX_MCP_HTTP_TOKEN` | Required | Bearer credential, at least 32 characters, separate from upstream credentials |
|
|
367
|
-
| `PROXMOX_MCP_HTTP_HOST` | IPv4 loopback | Listener bind address. Wildcards (`0.0.0.0`, `::`, `[::]`) are refused |
|
|
368
|
-
| `PROXMOX_MCP_HTTP_PORT` | `3100` | TCP port (`0` selects a free port) |
|
|
369
|
-
|
|
370
|
-
The resolved address is printed to stderr on startup. `/mcp` supports Streamable
|
|
371
|
-
HTTP POST, GET, and DELETE with bearer authentication on every request.
|
|
372
|
-
`GET /healthz` requires no token and returns only `{"status":"ok"}`.
|
|
373
|
-
Requests must use the bound host or a loopback alias in `Host`. A supplied
|
|
374
|
-
`Origin` must be an HTTP or HTTPS loopback origin. Request bodies are limited to
|
|
375
|
-
1 MiB. The listener accepts at most 128 sessions, reaps sessions idle for 30 minutes
|
|
376
|
-
(on a minute timer), and closes transports and the listener on SIGTERM or SIGINT.
|
|
377
|
-
Active tool requests are excluded from idle expiry. An idle SSE channel does not
|
|
378
|
-
keep a session alive. Clients must initialize again after expiry or a restart.
|
|
379
|
-
|
|
380
|
-
Each initialized MCP session gets its own server and deferred-tool visible set.
|
|
381
|
-
Confirmation gates have no pending approvals: `confirm`, `destructive`, and the
|
|
382
|
-
environment gate are checked on every tool invocation. One session's confirmation
|
|
383
|
-
cannot authorize another call. The secret-redaction registry is process-wide and
|
|
384
|
-
only adds masking, never authorization. Session IDs route connection state and
|
|
385
|
-
are not separate user identities. All clients using the shared bearer token are
|
|
386
|
-
in the same trust boundary. HTTP mode preserves the existing stdio defaults.
|
|
387
|
-
|
|
388
|
-
Keep the default loopback binding for local clients. A non-loopback listener
|
|
389
|
-
requires a trusted TLS proxy or tunnel and appropriate network access controls.
|
|
390
|
-
This transport does not provide TLS, OAuth, browser CORS access, or per-client
|
|
391
|
-
Proxmox accounts. Preserve the allowed Host header through a proxy. A wildcard
|
|
392
|
-
bind does not allow arbitrary Host headers. Use a specific bind address or host
|
|
393
|
-
name for remote clients.
|
|
394
|
-
|
|
395
|
-
#### Claude Code
|
|
396
|
-
|
|
397
|
-
Add this entry under `mcpServers` in `~/.claude.json`. Replace the token placeholder
|
|
398
|
-
with the HTTP token. Restrict access to the config file.
|
|
399
|
-
|
|
400
|
-
```json
|
|
401
|
-
{
|
|
402
|
-
"mcpServers": {
|
|
403
|
-
"proxmox": {
|
|
404
|
-
"type": "http",
|
|
405
|
-
"url": "http://localhost:3100/mcp",
|
|
406
|
-
"headers": {
|
|
407
|
-
"Authorization": "Bearer <HTTP_TOKEN>"
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
The `type` and header syntax follow the
|
|
415
|
-
[Claude Code MCP configuration](https://code.claude.com/docs/en/mcp).
|
|
21
|
+
The package also installs `proxmoxctl` and its alias `proxops`. Their inspection commands only expose reads. `proxmoxctl mcp` starts the full stdio server. Run `proxmoxctl --help` for the command list. [CLI source](cli.ts)
|
|
416
22
|
|
|
417
|
-
|
|
23
|
+
## Configure
|
|
418
24
|
|
|
419
|
-
|
|
420
|
-
that launches Codex. Its value must match the server's token, without the
|
|
421
|
-
`Bearer ` prefix. The client needs no upstream Proxmox credentials.
|
|
25
|
+
Set these variables in the server process environment. The values below are placeholders.
|
|
422
26
|
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
27
|
+
```sh
|
|
28
|
+
export PROXMOX_URL='https://pve.example.com:8006'
|
|
29
|
+
export PROXMOX_TOKEN_ID='operator@pve!mcp'
|
|
30
|
+
export PROXMOX_TOKEN_SECRET='replace-with-api-token-secret'
|
|
427
31
|
```
|
|
428
32
|
|
|
429
|
-
|
|
430
|
-
[Codex Streamable HTTP configuration](https://developers.openai.com/codex/mcp/).
|
|
33
|
+
Use the Proxmox base URL. The server appends `/api2/json` and authenticates with the token ID and secret. TLS certificate verification is on by default. `PROXMOX_TLS_INSECURE=1` disables it. `PROXMOX_REQUEST_TIMEOUT_MS` defaults to 30000 and accepts integers from 1000 to 300000. [Configuration](src/config.ts) · [API client](src/proxmox-client.ts)
|
|
431
34
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
An example unit is at
|
|
435
|
-
[`docs/systemd/proxmox-mcp-http.service`](docs/systemd/proxmox-mcp-http.service).
|
|
436
|
-
Adjust its generic installation paths, build the project there, and place the
|
|
437
|
-
server environment in `%h/.config/proxmox-mcp/http.env` with mode `0600`:
|
|
438
|
-
|
|
439
|
-
```sh
|
|
440
|
-
PROXMOX_URL=https://proxmox.example.com:8006
|
|
441
|
-
PROXMOX_TOKEN_ID=operator@pve!mcp
|
|
442
|
-
PROXMOX_TOKEN_SECRET=REPLACE_WITH_UPSTREAM_SECRET
|
|
443
|
-
PROXMOX_MCP_HTTP_TOKEN=REPLACE_WITH_INDEPENDENT_RANDOM_TOKEN
|
|
444
|
-
PROXMOX_MCP_HTTP_PORT=3100
|
|
445
|
-
```
|
|
35
|
+
### Transports
|
|
446
36
|
|
|
447
|
-
The
|
|
448
|
-
chosen tools require them. Leave `PROXMOX_ENABLE_DESTRUCTIVE` unset unless the
|
|
449
|
-
service should permit destructive calls. Installing or starting the example is
|
|
450
|
-
an operator action, separate from building the server.
|
|
451
|
-
|
|
452
|
-
## Setup
|
|
453
|
-
|
|
454
|
-
### Claude Desktop
|
|
455
|
-
|
|
456
|
-
`~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
457
|
-
|
|
458
|
-
```json
|
|
459
|
-
{
|
|
460
|
-
"mcpServers": {
|
|
461
|
-
"proxmox": {
|
|
462
|
-
"command": "npx",
|
|
463
|
-
"args": ["-y", "@solomonneas/proxmox-mcp"],
|
|
464
|
-
"env": {
|
|
465
|
-
"PROXMOX_URL": "https://192.0.2.10:8006",
|
|
466
|
-
"PROXMOX_TOKEN_ID": "pve-admin@pam!api-token-1",
|
|
467
|
-
"PROXMOX_TOKEN_SECRET": "REPLACE_WITH_TOKEN_SECRET",
|
|
468
|
-
"PROXMOX_TLS_INSECURE": "false"
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
```
|
|
37
|
+
For **stdio**, configure the client to launch `proxmox-mcp` with the environment above. For **Streamable HTTP**, set a separate `PROXMOX_MCP_HTTP_TOKEN` of at least 32 characters and start the server with `proxmoxctl mcp --http`. The listener uses loopback port 3100 by default. Override the address and port with `PROXMOX_MCP_HTTP_HOST` and `PROXMOX_MCP_HTTP_PORT`. Point the client at the listener's `/mcp` endpoint and send the HTTP token in the `Authorization: Bearer …` header. The listener serves plain HTTP. [Stdio entry point](mcp-bin.ts) · [HTTP transport](src/http.ts)
|
|
474
38
|
|
|
475
|
-
|
|
39
|
+
For calls backed by the Proxmox API, the client and server use these connections:
|
|
476
40
|
|
|
477
|
-
```
|
|
478
|
-
|
|
41
|
+
```mermaid
|
|
42
|
+
flowchart LR
|
|
43
|
+
Client[MCP client] -->|stdio| Server[proxmox-mcp]
|
|
44
|
+
Client -->|HTTP with bearer token| Server
|
|
45
|
+
Server -->|Proxmox API token| API[Proxmox VE API]
|
|
479
46
|
```
|
|
480
47
|
|
|
481
|
-
|
|
48
|
+
### Guest access
|
|
482
49
|
|
|
483
|
-
|
|
50
|
+
LXC guest commands use SSH to the Proxmox host and run through `pct exec`. Set `PROXMOX_SSH_HOST`, `PROXMOX_SSH_PORT`, `PROXMOX_SSH_USER`, and `PROXMOX_SSH_KEY` to override that connection.
|
|
484
51
|
|
|
485
|
-
|
|
52
|
+
QEMU guest commands use direct SSH by default. Set `PROXMOX_VM_SSH_USER` and `PROXMOX_VM_SSH_KEY` for VM defaults. The server uses the guest agent to look up the address unless `PROXMOX_VM_<vmid>_SSH_HOST` is set. Per-VM `SSH_USER` and `SSH_KEY` overrides use the same prefix. Set `PROXMOX_EXEC_BACKEND=guest-agent` to route QEMU guest commands through the guest agent API. [Configuration](src/config.ts) · [Guest command routing](src/tools/guest-command.ts) · [VM SSH target resolution](src/tools/ssh-target.ts)
|
|
486
53
|
|
|
487
|
-
|
|
488
|
-
{
|
|
489
|
-
"plugins": {
|
|
490
|
-
"entries": {
|
|
491
|
-
"proxmox": {
|
|
492
|
-
"package": "@solomonneas/proxmox-mcp",
|
|
493
|
-
"activation": { "onStartup": true }
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
```
|
|
54
|
+
## Tools
|
|
499
55
|
|
|
500
|
-
|
|
56
|
+
Version 0.13.1 lists **102 tools** by default over stdio and HTTP. The counts below group tools by their confirmation requirements. The four guest reads are part of the 44 tools in the registry's confirmation tier. [MCP registration](src/server.ts) · [Tool tiers](src/registry.ts)
|
|
501
57
|
|
|
502
|
-
|
|
58
|
+
| Group | Count | Examples |
|
|
59
|
+
| --- | ---: | --- |
|
|
60
|
+
| Reads | 49 | `proxmox_list_vms`, `proxmox_list_unprotected_guests`, `proxmox_node_journal`, `proxmox_firewall_log` |
|
|
61
|
+
| Guest reads with confirmation | 4 | `proxmox_list_directory`, `proxmox_read_file`, `proxmox_service_status`, `proxmox_stat_path` |
|
|
62
|
+
| Other tools with confirmation | 40 | `proxmox_start_resource`, `proxmox_snapshot_resource`, `proxmox_exec`, `proxmox_set_acl` |
|
|
63
|
+
| Destructive tier | 9 | `proxmox_destroy_resource`, `proxmox_node_power`, `proxmox_restore_backup` |
|
|
503
64
|
|
|
504
|
-
|
|
65
|
+
The full inventory is below. Each name starts with `proxmox_`.
|
|
505
66
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
command = "npx"
|
|
509
|
-
args = ["-y", "@solomonneas/proxmox-mcp"]
|
|
67
|
+
<details>
|
|
68
|
+
<summary>Reads</summary>
|
|
510
69
|
|
|
511
|
-
|
|
512
|
-
PROXMOX_URL = "https://192.0.2.10:8006"
|
|
513
|
-
PROXMOX_TOKEN_ID = "pve-admin@pam!api-token-1"
|
|
514
|
-
PROXMOX_TOKEN_SECRET = "REPLACE_WITH_TOKEN_SECRET"
|
|
515
|
-
PROXMOX_TLS_INSECURE = "false"
|
|
516
|
-
```
|
|
70
|
+
`audit_permissions`, `cluster_log`, `cluster_status`, `firewall_log`, `get_cluster_options`
|
|
517
71
|
|
|
518
|
-
|
|
72
|
+
`get_container_config`, `get_firewall_options`, `get_resource`, `get_task_log`, `get_task_status`
|
|
519
73
|
|
|
520
|
-
|
|
74
|
+
`get_vm_config`, `guest_network`, `ha_status`, `list_acl`, `list_auth_domains`
|
|
521
75
|
|
|
522
|
-
|
|
523
|
-
- **Tier 2 (gated guest reads + safe writes):** require an explicit `confirm: true` arg. Guest file/path/directory/service inspection, start, stop, reboot, snapshot create, run backup, create container, create VM, clone, VM/container config edit, disk resize, backup restore (to a new VMID), node migration, suspend/resume/reset, convert-to-template, ISO/template download, task cancel, firewall rule add/delete and enable-toggle, disk move, storage creation, backup-job create/delete, ACL grant/revoke, API-token create/delete, pool create/update/delete, HA resource add/remove, replication job create/delete, in-container `exec`, in-container `write_file`, and guest service start/stop/restart live here. A tool call without the confirm flag throws `WriteGateError` before any HTTP traffic. Restoring a backup *over an existing VMID* escalates to the Tier-3 gate because it wipes the target's disks.
|
|
524
|
-
- **Tier 3 (destructive):** require `confirm: true` + `destructive: true` + the env flag `PROXMOX_ENABLE_DESTRUCTIVE=1` on the MCP process. Permanent resource deletion, smoke pool cleanup, snapshot rollback/deletion, non-graceful force-stop, storage-volume deletion, storage-definition removal, and node reboot/shutdown live here.
|
|
76
|
+
`list_backup_jobs`, `list_backups`, `list_containers`, `list_disks`, `list_firewall_rules`
|
|
525
77
|
|
|
526
|
-
|
|
78
|
+
`list_groups`, `list_ha_resources`, `list_ha_rules`, `list_metric_servers`, `list_node_services`
|
|
527
79
|
|
|
528
|
-
|
|
80
|
+
`list_pool_resources`, `list_pools`, `list_replication`, `list_roles`, `list_sdn_vnets`
|
|
529
81
|
|
|
530
|
-
|
|
82
|
+
`list_sdn_zones`, `list_snapshots`, `list_storage`, `list_storage_config`, `list_storage_content`
|
|
531
83
|
|
|
532
|
-
|
|
84
|
+
`list_templates`, `list_tfa`, `list_tokens`, `list_unprotected_guests`, `list_updates`
|
|
533
85
|
|
|
534
|
-
|
|
86
|
+
`list_users`, `list_vms`, `next_vmid`, `node_journal`, `recent_tasks`
|
|
535
87
|
|
|
536
|
-
|
|
88
|
+
`resource_usage`, `status`, `validate_qemu_smoke_source`, `wait_task`
|
|
537
89
|
|
|
538
|
-
|
|
90
|
+
</details>
|
|
539
91
|
|
|
540
|
-
|
|
92
|
+
<details>
|
|
93
|
+
<summary>Guest reads with confirmation</summary>
|
|
541
94
|
|
|
542
|
-
|
|
543
|
-
PROXMOX_ENABLE_LIVE_SMOKE=1 npm run smoke:live
|
|
544
|
-
```
|
|
95
|
+
`list_directory`, `read_file`, `service_status`, `stat_path`
|
|
545
96
|
|
|
546
|
-
|
|
97
|
+
</details>
|
|
547
98
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
PROXMOX_SMOKE_CREATE=1 \
|
|
551
|
-
PROXMOX_ENABLE_DESTRUCTIVE=1 \
|
|
552
|
-
npm run smoke:live
|
|
553
|
-
```
|
|
99
|
+
<details>
|
|
100
|
+
<summary>Other tools with confirmation</summary>
|
|
554
101
|
|
|
555
|
-
|
|
102
|
+
`add_firewall_rule`, `add_ha_resource`, `cancel_task`, `clone_resource`, `convert_to_template`
|
|
556
103
|
|
|
557
|
-
|
|
558
|
-
PROXMOX_ENABLE_LIVE_SMOKE=1 \
|
|
559
|
-
PROXMOX_SMOKE_CREATE=1 \
|
|
560
|
-
PROXMOX_SMOKE_BACKUP=1 \
|
|
561
|
-
PROXMOX_SMOKE_BACKUP_STORAGE=local \
|
|
562
|
-
PROXMOX_SMOKE_SNAPSHOT_ROLLBACK=1 \
|
|
563
|
-
PROXMOX_ENABLE_DESTRUCTIVE=1 \
|
|
564
|
-
npm run smoke:live
|
|
565
|
-
```
|
|
104
|
+
`create_backup_job`, `create_container`, `create_pool`, `create_replication`, `create_storage`
|
|
566
105
|
|
|
567
|
-
|
|
106
|
+
`create_token`, `create_vm`, `delete_backup_job`, `delete_firewall_rule`, `delete_ha_resource`
|
|
568
107
|
|
|
569
|
-
|
|
570
|
-
PROXMOX_CREATE_SMOKE_TOKEN=1 bash scripts/create-smoke-token.sh
|
|
571
|
-
```
|
|
108
|
+
`delete_pool`, `delete_replication`, `delete_token`, `download_url`, `exec`
|
|
572
109
|
|
|
573
|
-
|
|
110
|
+
`migrate_resource`, `move_disk`, `reboot_resource`, `reset_resource`, `resize_disk`
|
|
574
111
|
|
|
575
|
-
|
|
112
|
+
`resume_resource`, `run_backup`, `service_restart`, `service_start`, `service_stop`
|
|
576
113
|
|
|
577
|
-
|
|
578
|
-
PROXMOX_CREATE_SMOKE_TOKEN=1 PROXMOX_SMOKE_VMID_GRANT=102 bash scripts/create-smoke-token.sh
|
|
579
|
-
```
|
|
114
|
+
`set_acl`, `set_firewall_enabled`, `snapshot_resource`, `start_resource`, `stop_resource`
|
|
580
115
|
|
|
581
|
-
`
|
|
116
|
+
`suspend_resource`, `update_container_config`, `update_pool`, `update_vm_config`, `write_file`
|
|
582
117
|
|
|
583
|
-
|
|
118
|
+
</details>
|
|
584
119
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
PROXMOX_ENABLE_DESTRUCTIVE=1 \
|
|
588
|
-
PROXMOX_SMOKE_QEMU_SOURCE_VMID=9000 \
|
|
589
|
-
npm run smoke:live
|
|
590
|
-
```
|
|
120
|
+
<details>
|
|
121
|
+
<summary>Destructive tier</summary>
|
|
591
122
|
|
|
592
|
-
|
|
123
|
+
`cleanup_smoke_resources`, `delete_snapshot`, `delete_storage`, `delete_volume`, `destroy_resource`
|
|
593
124
|
|
|
594
|
-
|
|
125
|
+
`force_stop_resource`, `node_power`, `restore_backup`, `rollback_snapshot`
|
|
595
126
|
|
|
596
|
-
|
|
597
|
-
# tool: proxmox_validate_qemu_smoke_source { "vmid": 9000 }
|
|
598
|
-
```
|
|
127
|
+
</details>
|
|
599
128
|
|
|
600
|
-
|
|
129
|
+
Set `PROXMOX_DEFERRED_TOOLS=1` to start an MCP session with only `proxmox_search_tools` visible. Search adds matching tools to that session's list. A direct call by name also works and adds the called tool to the list. The search tool is outside the default count. [Deferred loading](src/deferred.ts) · [MCP listing and dispatch](src/server.ts)
|
|
601
130
|
|
|
602
|
-
|
|
603
|
-
# tool: proxmox_audit_permissions {
|
|
604
|
-
# "userid": "mcp-smoke@pve!live-smoke",
|
|
605
|
-
# "source_vmid": 103,
|
|
606
|
-
# "target_vmid": 102
|
|
607
|
-
# }
|
|
608
|
-
```
|
|
131
|
+
The bundled OpenClaw plugin registers the same 102 tools in full registration mode. Deferred search is specific to the stdio and HTTP MCP transports. [OpenClaw registration](index.ts)
|
|
609
132
|
|
|
610
|
-
|
|
133
|
+
## Safety
|
|
611
134
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
npm run smoke:live
|
|
617
|
-
```
|
|
135
|
+
- The 49 read tools take no confirmation flag. The four guest reads require `confirm: true` even though MCP marks them with `readOnlyHint: true`.
|
|
136
|
+
- The other 40 tools in the confirmation tier also require `confirm: true`. That includes guest command execution and changes to services, guest configuration, and permissions.
|
|
137
|
+
- Destructive actions require `confirm: true`, `destructive: true`, and `PROXMOX_ENABLE_DESTRUCTIVE=1` on the server. `proxmox_cleanup_smoke_resources` previews by default and requires the destructive gates for deletion. `proxmox_restore_backup` requires confirmation to restore to a new VMID. Overwriting an existing VMID also requires `force: true` and the destructive gates.
|
|
138
|
+
- MCP annotations help clients present calls for approval. The tool handlers enforce the gates. Use a read-only Proxmox token to limit API permissions and scope any SSH credentials separately.
|
|
618
139
|
|
|
619
|
-
|
|
140
|
+
[Gate functions](src/gates.ts) · [MCP annotations](src/registry.ts) · [Smoke cleanup](src/tools/proxmox_cleanup_smoke_resources.ts) · [Backup restore](src/tools/proxmox_restore_backup.ts) · [Security guidance](SECURITY.md)
|
|
620
141
|
|
|
621
|
-
|
|
142
|
+
## Why not `pvesh`, Ansible, or ungated Proxmox MCP servers?
|
|
622
143
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
144
|
+
| Tool | Scope | Write safety for AI agents | Local CLI included |
|
|
145
|
+
| --- | --- | --- | --- |
|
|
146
|
+
| **proxmox-mcp** | VMs, LXC containers, storage, nodes, backups, and cluster status over Proxmox API | Every write and destructive action gated before the API sees it | Yes (`proxmoxctl` / `proxops`) |
|
|
147
|
+
| `pvesh` / `qm` / `pct` | Full local node admin over SSH | No agent guardrails | Node-local CLI only |
|
|
148
|
+
| Ansible / Terraform | Declarative provisioning and IaC | Explicit plan/apply workflow | CLI only, no interactive MCP |
|
|
149
|
+
| Minimal Proxmox MCP wrappers | Thin API pass-throughs | Often expose stop/delete without confirmation tiers | Usually no |
|
|
626
150
|
|
|
627
|
-
|
|
628
|
-
# tool: proxmox_cleanup_smoke_resources {}
|
|
151
|
+
Keep Terraform or Ansible for reproducible infrastructure provisioning. Use `proxmox-mcp` when you want an AI client or operator shell (`proxmoxctl`) to inspect cluster health, check storage, and run guarded VM or LXC operations without risking an accidental destroy call.
|
|
629
152
|
|
|
630
|
-
|
|
631
|
-
# tool: proxmox_cleanup_smoke_resources { "dry_run": false, "confirm": true, "destructive": true }
|
|
632
|
-
```
|
|
153
|
+
## FAQ
|
|
633
154
|
|
|
634
|
-
|
|
155
|
+
**Can an AI agent delete a VM or container by mistake?**
|
|
156
|
+
No. Mutating and destructive verbs are gated behind explicit environment policy and confirmation checks before any Proxmox API write runs.
|
|
635
157
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
- **A general "run any HTTP request" MCP tool** gives a model unbounded access to the Proxmox API with no guardrails. proxmox-mcp is the opposite: a fixed, named tool surface where every state change is gated and every destructive op needs an explicit process-level env flag.
|
|
639
|
-
- **Terraform / Ansible / `pct` + `qm`** are the right tools for declarative, reviewed, repeatable infrastructure. proxmox-mcp is for interactive, agent-driven inspection and operation, not for codifying your cluster.
|
|
158
|
+
**Does `proxmox-mcp` require SSH root access to my Proxmox host?**
|
|
159
|
+
No. It authenticates over HTTPS to the Proxmox VE API using a scoped API token (`PROXMOX_TOKEN_ID` and `PROXMOX_TOKEN_SECRET`).
|
|
640
160
|
|
|
641
|
-
|
|
161
|
+
**How do I handle Proxmox's default self-signed TLS certificate?**
|
|
162
|
+
Supply your cluster CA bundle via the TLS CA configuration, or opt in explicitly for isolated lab setups as documented in the configuration section.
|
|
642
163
|
|
|
643
|
-
|
|
644
|
-
- It is **not a Proxmox cluster manager or orchestrator.** It does not schedule cluster work. HTTP mode keeps MCP session state in memory. It translates MCP tool calls into Proxmox API calls and SSH commands, and that is all.
|
|
645
|
-
- It is **not a substitute for least-privilege tokens.** The write gate is a guardrail against a misbehaving model, not a substitute for a properly scoped Proxmox API token. Start read-only and grade up. See [SECURITY.md](SECURITY.md).
|
|
646
|
-
- It is **not stable yet.** It is WIP, pre-1.0, and the tool surface can change between minor versions.
|
|
164
|
+
## Part of Lidless Labs
|
|
647
165
|
|
|
648
|
-
|
|
166
|
+
`proxmox-mcp` is maintained by [Lidless Labs](https://lidless.dev) ([GitHub](https://github.com/lidless-labs)). Related Proxmox and homelab tools:
|
|
649
167
|
|
|
650
|
-
|
|
168
|
+
- [proxguard](https://github.com/lidless-labs/proxguard) - Proxmox VE security auditor with CIS benchmarks and remediation scripts
|
|
169
|
+
- [lidless-proxmox](https://github.com/lidless-labs/lidless-proxmox) - one-command Proxmox LXC installers with post-install verification
|
|
170
|
+
- [soc-stack](https://github.com/lidless-labs/soc-stack) - one-command self-hosted SOC lab for Proxmox VE
|
|
171
|
+
- [watchtower](https://github.com/lidless-labs/watchtower) - self-hosted NOC dashboard for LibreNMS and Proxmox VE
|
|
172
|
+
- [adguardctrl](https://github.com/lidless-labs/adguardctrl) - AdGuard Home CLI and MCP server with confirm-gated writes
|
|
651
173
|
|
|
652
|
-
##
|
|
174
|
+
## Development
|
|
653
175
|
|
|
654
|
-
|
|
176
|
+
The following commands run from a source checkout. `./scripts/verify` runs type checking, the test suite, the build, and a packaged stdio smoke check. The tests use a fake Proxmox instance. `npm run dev` starts the stdio server from TypeScript and uses the configuration above. [Verification script](scripts/verify) · [Package smoke check](scripts/verify-package.mjs) · [Development commands](package.json)
|
|
655
177
|
|
|
656
|
-
|
|
178
|
+
```sh
|
|
179
|
+
npm ci
|
|
180
|
+
./scripts/verify
|
|
181
|
+
```
|
|
657
182
|
|
|
658
|
-
|
|
183
|
+
### Live smoke testing
|
|
659
184
|
|
|
660
|
-
|
|
185
|
+
The separate source command `npm run smoke:live` requires `PROXMOX_ENABLE_LIVE_SMOKE=1` and Proxmox credentials. Scratch container lifecycle testing also requires `PROXMOX_SMOKE_CREATE=1` and `PROXMOX_ENABLE_DESTRUCTIVE=1`. Use a scoped smoke token and the dedicated `mcp-smoke` pool. [Live smoke script](scripts/live-smoke.ts) · [Smoke token script](scripts/create-smoke-token.sh)
|
|
661
186
|
|
|
662
|
-
|
|
187
|
+
### Publishing
|
|
663
188
|
|
|
664
|
-
|
|
189
|
+
The npm workflow runs on a push of a `v*.*.*` tag or on manual dispatch. It uses Node.js 22 and npm 11, runs type checking, tests, a build, a production dependency audit, and a package dry run before publishing. When `NPM_TOKEN` is unset, it uses npm trusted publishing through GitHub Actions OIDC. When the workflow has that secret, it uses token authentication. Both routes run `npm publish --provenance --access public`. [Publish workflow](.github/workflows/publish.yml)
|
|
665
190
|
|
|
666
|
-
|
|
191
|
+
[Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md) · [MIT License](LICENSE)
|
package/dist/cli.js
CHANGED
|
@@ -479,7 +479,7 @@ function finalizeToolResult(result, maxBytes = resolveMaxResultBytes()) {
|
|
|
479
479
|
// package.json
|
|
480
480
|
var package_default = {
|
|
481
481
|
name: "@solomonneas/proxmox-mcp",
|
|
482
|
-
version: "0.13.
|
|
482
|
+
version: "0.13.2",
|
|
483
483
|
description: "MCP server exposing Proxmox VE read + safe-write tools (incl. in-container exec)",
|
|
484
484
|
type: "module",
|
|
485
485
|
openclaw: {
|
|
@@ -557,7 +557,24 @@ var package_default = {
|
|
|
557
557
|
undici: "8.14.0",
|
|
558
558
|
zod: "4.6.7"
|
|
559
559
|
}
|
|
560
|
-
}
|
|
560
|
+
},
|
|
561
|
+
mcpName: "io.github.lidless-labs/proxmox-mcp",
|
|
562
|
+
keywords: [
|
|
563
|
+
"proxmox",
|
|
564
|
+
"proxmox-ve",
|
|
565
|
+
"proxmox-mcp",
|
|
566
|
+
"homelab",
|
|
567
|
+
"virtualization",
|
|
568
|
+
"lxc",
|
|
569
|
+
"self-hosted",
|
|
570
|
+
"cli",
|
|
571
|
+
"mcp",
|
|
572
|
+
"mcp-server",
|
|
573
|
+
"model-context-protocol",
|
|
574
|
+
"claude-code",
|
|
575
|
+
"cursor",
|
|
576
|
+
"lidless-labs"
|
|
577
|
+
]
|
|
561
578
|
};
|
|
562
579
|
|
|
563
580
|
// src/server.ts
|
package/dist/mcp-bin.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@solomonneas/proxmox-mcp",
|
|
6
|
-
version: "0.13.
|
|
6
|
+
version: "0.13.2",
|
|
7
7
|
description: "MCP server exposing Proxmox VE read + safe-write tools (incl. in-container exec)",
|
|
8
8
|
type: "module",
|
|
9
9
|
openclaw: {
|
|
@@ -81,7 +81,24 @@ var package_default = {
|
|
|
81
81
|
undici: "8.14.0",
|
|
82
82
|
zod: "4.6.7"
|
|
83
83
|
}
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
|
+
mcpName: "io.github.lidless-labs/proxmox-mcp",
|
|
86
|
+
keywords: [
|
|
87
|
+
"proxmox",
|
|
88
|
+
"proxmox-ve",
|
|
89
|
+
"proxmox-mcp",
|
|
90
|
+
"homelab",
|
|
91
|
+
"virtualization",
|
|
92
|
+
"lxc",
|
|
93
|
+
"self-hosted",
|
|
94
|
+
"cli",
|
|
95
|
+
"mcp",
|
|
96
|
+
"mcp-server",
|
|
97
|
+
"model-context-protocol",
|
|
98
|
+
"claude-code",
|
|
99
|
+
"cursor",
|
|
100
|
+
"lidless-labs"
|
|
101
|
+
]
|
|
85
102
|
};
|
|
86
103
|
|
|
87
104
|
// src/server.ts
|
package/dist/mcp-server.js
CHANGED
|
@@ -7,7 +7,7 @@ import { pathToFileURL } from "url";
|
|
|
7
7
|
// package.json
|
|
8
8
|
var package_default = {
|
|
9
9
|
name: "@solomonneas/proxmox-mcp",
|
|
10
|
-
version: "0.13.
|
|
10
|
+
version: "0.13.2",
|
|
11
11
|
description: "MCP server exposing Proxmox VE read + safe-write tools (incl. in-container exec)",
|
|
12
12
|
type: "module",
|
|
13
13
|
openclaw: {
|
|
@@ -85,7 +85,24 @@ var package_default = {
|
|
|
85
85
|
undici: "8.14.0",
|
|
86
86
|
zod: "4.6.7"
|
|
87
87
|
}
|
|
88
|
-
}
|
|
88
|
+
},
|
|
89
|
+
mcpName: "io.github.lidless-labs/proxmox-mcp",
|
|
90
|
+
keywords: [
|
|
91
|
+
"proxmox",
|
|
92
|
+
"proxmox-ve",
|
|
93
|
+
"proxmox-mcp",
|
|
94
|
+
"homelab",
|
|
95
|
+
"virtualization",
|
|
96
|
+
"lxc",
|
|
97
|
+
"self-hosted",
|
|
98
|
+
"cli",
|
|
99
|
+
"mcp",
|
|
100
|
+
"mcp-server",
|
|
101
|
+
"model-context-protocol",
|
|
102
|
+
"claude-code",
|
|
103
|
+
"cursor",
|
|
104
|
+
"lidless-labs"
|
|
105
|
+
]
|
|
89
106
|
};
|
|
90
107
|
|
|
91
108
|
// src/server.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solomonneas/proxmox-mcp",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "MCP server exposing Proxmox VE read + safe-write tools (incl. in-container exec)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"openclaw": {
|
|
@@ -78,5 +78,22 @@
|
|
|
78
78
|
"undici": "8.14.0",
|
|
79
79
|
"zod": "4.6.7"
|
|
80
80
|
}
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
|
+
"mcpName": "io.github.lidless-labs/proxmox-mcp",
|
|
83
|
+
"keywords": [
|
|
84
|
+
"proxmox",
|
|
85
|
+
"proxmox-ve",
|
|
86
|
+
"proxmox-mcp",
|
|
87
|
+
"homelab",
|
|
88
|
+
"virtualization",
|
|
89
|
+
"lxc",
|
|
90
|
+
"self-hosted",
|
|
91
|
+
"cli",
|
|
92
|
+
"mcp",
|
|
93
|
+
"mcp-server",
|
|
94
|
+
"model-context-protocol",
|
|
95
|
+
"claude-code",
|
|
96
|
+
"cursor",
|
|
97
|
+
"lidless-labs"
|
|
98
|
+
]
|
|
82
99
|
}
|