@solomonneas/proxmox-mcp 0.3.0 → 0.5.1

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 CHANGED
@@ -1,8 +1,58 @@
1
- # proxmox-mcp
1
+ <p align="center">
2
+ <img src="docs/assets/proxmox-mcp-social-preview.jpg" alt="proxmox-mcp banner" width="900">
3
+ </p>
2
4
 
3
- MCP server exposing Proxmox VE read + safe-write + destructive tools via API token auth. Three-tier write gating: reads are open, writes require `confirm: true`, destructive ops require `confirm: true` + `destructive: true` + a process-level `PROXMOX_ENABLE_DESTRUCTIVE=1` env flag.
5
+ <h1 align="center">proxmox-mcp</h1>
4
6
 
5
- ## Tools
7
+ <p align="center">
8
+ <strong>A Proxmox VE operator CLI and MCP adapter for reading and safely operating clusters, VMs, containers, and nodes over plain API-token auth.</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ 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 and the latest published release is <code>0.3.0</code>.
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://lidless.dev/proxmox-mcp"><strong>Website &amp; docs &rarr; lidless.dev/proxmox-mcp</strong></a>
17
+ </p>
18
+
19
+ <p align="center">
20
+ <img src="https://shieldcn.dev/github/ci/lidless-labs/proxmox-mcp.svg?branch=master&workflow=ci.yml" alt="CI status">
21
+ <img src="https://shieldcn.dev/npm/@solomonneas/proxmox-mcp.svg" alt="npm version">
22
+ <img src="https://shieldcn.dev/badge/MCP-server-8A2BE2.svg" alt="MCP server">
23
+ <img src="https://shieldcn.dev/badge/license-MIT-green.svg" alt="MIT license">
24
+ </p>
25
+
26
+ ## What it does
27
+
28
+ proxmoxctrl is an open-source operator CLI for [Proxmox VE](https://www.proxmox.com/en/proxmox-virtual-environment/overview), the open-source virtualization platform. The same package ships `proxmox-mcp`, a [Model Context Protocol](https://modelcontextprotocol.io) adapter for AI clients (Claude Desktop, Claude Code, OpenClaw, Codex CLI, or any MCP host). Together they provide 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.
29
+
30
+ 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: 42 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.
31
+
32
+ ## Proof
33
+
34
+ A real MCP client config. Drop this into Claude Desktop (`claude_desktop_config.json`) and the 42 tools appear in the client. Reads work immediately; the destructive env gate stays off until you opt in.
35
+
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "proxmox": {
40
+ "command": "npx",
41
+ "args": ["-y", "@solomonneas/proxmox-mcp"],
42
+ "env": {
43
+ "PROXMOX_URL": "https://192.0.2.10:8006",
44
+ "PROXMOX_TOKEN_ID": "pve-admin@pam!api-token-1",
45
+ "PROXMOX_TOKEN_SECRET": "00000000-0000-0000-0000-000000000000",
46
+ "PROXMOX_TLS_INSECURE": "false"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ### Tool list (42 tools, verified against source)
54
+
55
+ 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.
6
56
 
7
57
  | Tool | Tier | Notes |
8
58
  | --- | --- | --- |
@@ -10,34 +60,91 @@ MCP server exposing Proxmox VE read + safe-write + destructive tools via API tok
10
60
  | `proxmox_list_containers` | 1 read | LXC inventory across all nodes. |
11
61
  | `proxmox_list_vms` | 1 read | QEMU inventory across all nodes. |
12
62
  | `proxmox_get_resource` | 1 read | Single container or VM config + status by vmid. |
63
+ | `proxmox_get_vm_config` | 1 read | QEMU VM config by vmid. |
64
+ | `proxmox_get_container_config` | 1 read | LXC container config by vmid. |
65
+ | `proxmox_validate_qemu_smoke_source` | 1 read | Preflight a QEMU VM before live smoke cloning. |
66
+ | `proxmox_audit_permissions` | 1 read | Inspect effective permissions across smoke-relevant paths. |
13
67
  | `proxmox_recent_tasks` | 1 read | Recent UPID task list per node. |
14
68
  | `proxmox_list_backups` | 1 read | Backup inventory by storage. |
15
69
  | `proxmox_resource_usage` | 1 read | CPU/mem/disk RRD metrics. |
16
70
  | `proxmox_list_templates` | 1 read | LXC + VM templates available for cloning + container creation. |
17
- | `proxmox_start_resource` | 2 safe-write | Boot container or VM. |
18
- | `proxmox_stop_resource` | 2 safe-write | Graceful shutdown. |
19
- | `proxmox_reboot_resource` | 2 safe-write | Reboot in place. |
20
- | `proxmox_snapshot_resource` | 2 safe-write | Create named snapshot. |
21
- | `proxmox_run_backup` | 2 safe-write | Trigger vzdump for a vmid. |
22
- | `proxmox_create_container` | 2 safe-write | Provision new LXC from template (`POST /nodes/{node}/lxc`). |
23
- | `proxmox_create_vm` | 2 safe-write | Provision new QEMU VM (`POST /nodes/{node}/qemu`). |
24
- | `proxmox_clone_resource` | 2 safe-write | Clone existing container or VM into a fresh vmid. |
71
+ | `proxmox_list_storage` | 1 read | Storage status on one node or all nodes. |
72
+ | `proxmox_list_snapshots` | 1 read | Snapshot inventory for one LXC or VM. |
73
+ | `proxmox_guest_network` | 1 read | Guest network interfaces and usable IPv4 addresses. |
74
+ | `proxmox_wait_task` | 1 read | Poll a UPID until stopped or timeout. |
75
+ | `proxmox_next_vmid` | 1 read | Get the next available VMID for provisioning. |
76
+ | `proxmox_list_pool_resources` | 1 read | Inspect resources assigned to a Proxmox pool, defaulting to `mcp-smoke`. |
77
+ | `proxmox_get_task_status` | 1 read | Single UPID status lookup. |
78
+ | `proxmox_get_task_log` | 1 read | Task log tail for a UPID. |
79
+ | `proxmox_read_file` | 2 gated guest read | Read a file from inside an LXC or QEMU VM (SSH + `cat`). Requires `confirm: true`. |
80
+ | `proxmox_stat_path` | 2 gated guest read | Inspect guest path metadata. Requires `confirm: true`. |
81
+ | `proxmox_list_directory` | 2 gated guest read | List one guest directory. Requires `confirm: true`. |
82
+ | `proxmox_service_status` | 2 gated guest read | Read systemd service state inside a guest. Requires `confirm: true`. |
83
+ | `proxmox_start_resource` | 2 safe-write | Boot container or VM. Requires `confirm: true`. |
84
+ | `proxmox_stop_resource` | 2 safe-write | Graceful shutdown. Requires `confirm: true`. |
85
+ | `proxmox_reboot_resource` | 2 safe-write | Reboot in place. Requires `confirm: true`. |
86
+ | `proxmox_snapshot_resource` | 2 safe-write | Create named snapshot. Requires `confirm: true`. |
87
+ | `proxmox_run_backup` | 2 safe-write | Trigger vzdump for a vmid. Requires `confirm: true`. |
88
+ | `proxmox_create_container` | 2 safe-write | Provision new LXC from template (`POST /nodes/{node}/lxc`). Requires `confirm: true`. |
89
+ | `proxmox_create_vm` | 2 safe-write | Provision new QEMU VM (`POST /nodes/{node}/qemu`). Requires `confirm: true`. |
90
+ | `proxmox_clone_resource` | 2 safe-write | Clone existing container or VM into a fresh vmid. Requires `confirm: true`. |
91
+ | `proxmox_exec` | 2 safe-write | Run a shell command inside an LXC or QEMU VM. Returns stdout/stderr/exit_code. Requires `confirm: true`. |
92
+ | `proxmox_write_file` | 2 safe-write | Write a text file (with parent dirs) inside an LXC or QEMU VM. Requires `confirm: true`. |
93
+ | `proxmox_service_start` | 2 safe-write | Start a systemd service inside a guest. Requires `confirm: true`. |
94
+ | `proxmox_service_stop` | 2 safe-write | Stop a systemd service inside a guest. Requires `confirm: true`. |
95
+ | `proxmox_service_restart` | 2 safe-write | Restart a systemd service inside a guest. Requires `confirm: true`. |
96
+ | `proxmox_rollback_snapshot` | 3 destructive | Roll back a resource to a named snapshot. |
25
97
  | `proxmox_destroy_resource` | 3 destructive | Permanently delete an LXC or VM (`DELETE /nodes/{node}/{type}/{vmid}`). |
98
+ | `proxmox_cleanup_smoke_resources` | 3 destructive | Dry-run or destroy smoke-prefixed LXC/QEMU guests from a smoke pool. |
26
99
  | `proxmox_delete_snapshot` | 3 destructive | Delete a named snapshot. |
27
100
  | `proxmox_force_stop_resource` | 3 destructive | Non-graceful hard stop of a running container or VM. |
28
- | `proxmox_get_task_status` | 1 read | Single UPID status lookup. |
29
- | `proxmox_get_task_log` | 1 read | Task log tail for a UPID. |
30
101
 
31
- **Reads (10):** open; no flags required.
32
- **Safe writes (8):** require `confirm: true`. Schema documents the gate on every tool. `WriteGateError` fires before any HTTP call.
33
- **Destructive (3):** require `confirm: true` + `destructive: true` + env `PROXMOX_ENABLE_DESTRUCTIVE=1`. All three gates must be satisfied; any one missing throws `WriteGateError` before resolving the resource.
102
+ **Reads (20):** open; no flags required.
103
+ **Gated guest reads (4):** guest file/path/directory/service inspection tools require `confirm: true` because they expose in-guest state through host-backed SSH.
104
+ **Safe writes (13):** require `confirm: true`. The schema documents the gate on every tool. `WriteGateError` fires before any HTTP call.
105
+ **Destructive (5):** 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.
106
+
107
+ > Five tools are destructive and can delete or hard-stop guests: `proxmox_destroy_resource`, `proxmox_cleanup_smoke_resources`, `proxmox_rollback_snapshot`, `proxmox_delete_snapshot`, and `proxmox_force_stop_resource`. They are gated behind the `PROXMOX_ENABLE_DESTRUCTIVE=1` process env flag and stay inert until you set it. See [SECURITY.md](SECURITY.md) and the [Safety](#safety) section.
108
+
109
+ ## Quickstart
110
+
111
+ Install globally or run on demand with `npx`:
112
+
113
+ ```bash
114
+ npm install -g @solomonneas/proxmox-mcp
115
+ # or, no install:
116
+ npx -y @solomonneas/proxmox-mcp
117
+ ```
118
+
119
+ Set the three required credential env vars (scrub real hosts and IPs out of any shared config):
120
+
121
+ ```bash
122
+ export PROXMOX_URL=https://192.0.2.10:8006
123
+ export PROXMOX_TOKEN_ID=pve-admin@pam!api-token-1
124
+ export PROXMOX_TOKEN_SECRET=00000000-0000-0000-0000-000000000000
125
+
126
+ # Optional: skip TLS cert validation for homelab self-signed certs.
127
+ # Accepts true/1/yes (case-insensitive). Defaults to false.
128
+ export PROXMOX_TLS_INSECURE=false
129
+ ```
130
+
131
+ Wire it into your MCP client (full per-client config in [Setup](#setup)):
132
+
133
+ ```bash
134
+ # Claude Code
135
+ claude mcp add proxmox -s user -- npx -y @solomonneas/proxmox-mcp
136
+ ```
137
+
138
+ 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.
139
+
140
+ > Note: the latest version published to npm is `0.3.0`. This repository tracks ahead of npm; install pins the published release.
34
141
 
35
142
  ## Configuration
36
143
 
37
144
  Set the following env vars. All three credential vars are required.
38
145
 
39
146
  ```
40
- PROXMOX_URL=https://pve.example.local:8006
147
+ PROXMOX_URL=https://192.0.2.10:8006
41
148
  PROXMOX_TOKEN_ID=pve-admin@pam!api-token-1
42
149
  PROXMOX_TOKEN_SECRET=00000000-0000-0000-0000-000000000000
43
150
 
@@ -48,18 +155,54 @@ PROXMOX_TLS_INSECURE=false
48
155
 
49
156
  Trailing slashes on `PROXMOX_URL` are stripped. The token secret is registered with the redactor on startup and masked from all log + error output.
50
157
 
51
- ## Install
158
+ ### In-container exec env vars
52
159
 
53
- ```
54
- npm install -g @solomonneas/proxmox-mcp
55
- ```
160
+ 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`.
56
161
 
57
- Or run via npx:
162
+ | Env var | Default | Purpose |
163
+ | --- | --- | --- |
164
+ | `PROXMOX_SSH_HOST` | hostname from `PROXMOX_URL` | Proxmox host for `pct exec` |
165
+ | `PROXMOX_SSH_PORT` | `22` | SSH port |
166
+ | `PROXMOX_SSH_USER` | `root` | SSH user on Proxmox host |
167
+ | `PROXMOX_SSH_KEY` | `~/.ssh/id_ed25519` | Key path for Proxmox host SSH |
168
+ | `PROXMOX_VM_SSH_USER` | falls through to `PROXMOX_SSH_USER` | Default user for direct VM SSH |
169
+ | `PROXMOX_VM_SSH_KEY` | falls through to `PROXMOX_SSH_KEY` | Default key for direct VM SSH |
170
+ | `PROXMOX_SSH_MAX_OUTPUT_BYTES` | `1048576` | Max stdout bytes and max stderr bytes captured per SSH command |
58
171
 
59
- ```
60
- npx -y @solomonneas/proxmox-mcp
172
+ Per-VM overrides (read at execute time, no MCP restart needed):
173
+
174
+ - `PROXMOX_VM_<vmid>_SSH_HOST` - pin a VM's IP (bypasses guest agent)
175
+ - `PROXMOX_VM_<vmid>_SSH_USER` - per-VM user override
176
+ - `PROXMOX_VM_<vmid>_SSH_KEY` - per-VM key override
177
+
178
+ 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.
179
+
180
+ ## CLI
181
+
182
+ The same package ships a read-only **control CLI**, `proxmoxctrl`, for shells, cron, and CI. Compatibility aliases `proxmoxctl` and `proxops` still point at the same binary. It shares the `ProxmoxClient` core with the MCP adapter and reads the same env config (`PROXMOX_URL`, `PROXMOX_TOKEN_ID`, `PROXMOX_TOKEN_SECRET`, `PROXMOX_TLS_INSECURE`). It exposes only read/inventory/audit operations; every lifecycle, snapshot, backup, and exec action stays in the MCP/plugin surface behind the safety gates.
183
+
184
+ ```bash
185
+ npx @solomonneas/proxmox-mcp@latest status
186
+ # or, installed globally:
187
+ proxmoxctrl status # PVE version + per-node status (exit 1 if a node is offline)
188
+ proxmoxctrl vms list
189
+ proxmoxctrl containers list
190
+ proxmoxctrl vm config 100
191
+ proxmoxctrl storage list --node pve
192
+ proxmoxctrl backups list --vmid 100
193
+ proxmoxctrl snapshots list 100
194
+ proxmoxctrl audit-permissions
195
+ proxmoxctrl recent-tasks --limit 20
196
+ proxmoxctrl task status UPID:pve:...
197
+ proxmoxctrl vms list --json # raw JSON for piping
61
198
  ```
62
199
 
200
+ Run `proxmoxctrl help` for the full command list. `--json` emits raw JSON instead of the concise summary. Exit codes: `0` success, `1` runtime error (backend unreachable / call failed, and `status` when a node is offline), `2` usage error (unknown command/flag or bad value).
201
+
202
+ ### Starting the MCP server
203
+
204
+ `proxmoxctrl 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.
205
+
63
206
  ## Setup
64
207
 
65
208
  ### Claude Desktop
@@ -73,7 +216,7 @@ npx -y @solomonneas/proxmox-mcp
73
216
  "command": "npx",
74
217
  "args": ["-y", "@solomonneas/proxmox-mcp"],
75
218
  "env": {
76
- "PROXMOX_URL": "https://pve.example.local:8006",
219
+ "PROXMOX_URL": "https://192.0.2.10:8006",
77
220
  "PROXMOX_TOKEN_ID": "pve-admin@pam!api-token-1",
78
221
  "PROXMOX_TOKEN_SECRET": "00000000-0000-0000-0000-000000000000",
79
222
  "PROXMOX_TLS_INSECURE": "false"
@@ -110,22 +253,6 @@ Plugin loads automatically once installed. Config goes in your `~/.openclaw/open
110
253
 
111
254
  Env vars from `~/.openclaw/workspace/.env` are inherited by the plugin.
112
255
 
113
- ### Hermes Agent
114
-
115
- Add to `~/.config/hermes/agents.yaml`:
116
-
117
- ```yaml
118
- mcp_servers:
119
- proxmox:
120
- command: npx
121
- args: ["-y", "@solomonneas/proxmox-mcp"]
122
- env:
123
- PROXMOX_URL: https://pve.example.local:8006
124
- PROXMOX_TOKEN_ID: pve-admin@pam!api-token-1
125
- PROXMOX_TOKEN_SECRET: 00000000-0000-0000-0000-000000000000
126
- PROXMOX_TLS_INSECURE: "false"
127
- ```
128
-
129
256
  ### Codex CLI
130
257
 
131
258
  `~/.codex/config.toml`:
@@ -136,7 +263,7 @@ command = "npx"
136
263
  args = ["-y", "@solomonneas/proxmox-mcp"]
137
264
 
138
265
  [mcp_servers.proxmox.env]
139
- PROXMOX_URL = "https://pve.example.local:8006"
266
+ PROXMOX_URL = "https://192.0.2.10:8006"
140
267
  PROXMOX_TOKEN_ID = "pve-admin@pam!api-token-1"
141
268
  PROXMOX_TOKEN_SECRET = "00000000-0000-0000-0000-000000000000"
142
269
  PROXMOX_TLS_INSECURE = "false"
@@ -144,22 +271,142 @@ PROXMOX_TLS_INSECURE = "false"
144
271
 
145
272
  ## Safety
146
273
 
147
- This MCP uses the same three-tier write-gating pattern as the rest of the `solomonneas/*-mcp` family:
274
+ This MCP uses a three-tier write-gating model. The tier is enforced in code, not just documented.
148
275
 
149
- - **Tier 1 (reads):** open. No confirm flag needed. Status, listings, usage, recent tasks, backup inventory, template inventory.
150
- - **Tier 2 (safe writes):** require an explicit `confirm: true` arg. The JSON schema documents this on every write tool. Start, stop, reboot, snapshot create, run backup, create container, create VM, clone live here. A hallucinated tool call without the confirm flag throws `WriteGateError` before any HTTP traffic.
151
- - **Tier 3 (destructive):** require `confirm: true` + `destructive: true` + the env flag `PROXMOX_ENABLE_DESTRUCTIVE=1` on the MCP process. Permanent resource deletion, snapshot deletion, and non-graceful force-stop live here.
276
+ - **Tier 1 (reads):** open. No confirm flag needed. Status, listings, config inspection, QEMU smoke-source validation, permission audit, usage, recent tasks, backup inventory, template inventory, storage inventory, snapshot inventory, guest network lookup, task wait, next-VMID lookup, task status/log, and pool resource audit live here.
277
+ - **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, 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.
278
+ - **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, and non-graceful force-stop live here.
152
279
 
153
280
  ### Destructive operations env gate
154
281
 
155
- Tier 3 destructive tools (`proxmox_destroy_resource`, `proxmox_delete_snapshot`, `proxmox_force_stop_resource`) require an additional safety gate beyond the per-tool `confirm: true` + `destructive: true` args: the env var `PROXMOX_ENABLE_DESTRUCTIVE=1` must be set on the MCP process. Without it, the tools throw `WriteGateError` before any HTTP call is made.
282
+ Tier 3 destructive tools (`proxmox_destroy_resource`, `proxmox_cleanup_smoke_resources`, `proxmox_rollback_snapshot`, `proxmox_delete_snapshot`, `proxmox_force_stop_resource`) require an additional safety gate beyond the per-tool `confirm: true` + `destructive: true` args: the env var `PROXMOX_ENABLE_DESTRUCTIVE=1` must be set on the MCP process. Without it, the tools throw `WriteGateError` before any HTTP call is made. `proxmox_cleanup_smoke_resources` defaults to `dry_run: true`, which previews targets without the destructive env gate.
156
283
 
157
- This is intentional: destructive ops are rare. The env flag is a coarse "I am actively doing smoke-test cycles" toggle. Leave it unset day-to-day; flip it only when actively destroying resources is part of the workflow.
284
+ This is intentional: destructive ops are rare. The env flag is a coarse "I am actively doing smoke-test cycles" toggle. Leave it unset day to day; flip it only when actively destroying resources is part of the workflow.
158
285
 
159
- **API token scope recommendation:** start with a read-only token (PVE Datastore.Audit + VM.Audit + Sys.Audit) and verify the read tools work end-to-end. Grade up to write privileges (VM.PowerMgmt, VM.Snapshot, VM.Backup) only after you've confirmed the redactor is masking your secret in your transcripts and that the model is honoring the confirm gate. Tokens are tied to a PVE user and can be revoked instantly from the Datacenter > Permissions > API Tokens UI.
286
+ **API token scope recommendation:** start with a read-only token (PVE `Datastore.Audit` + `VM.Audit` + `Sys.Audit`) and verify the read tools work end to end. Grade up to write privileges (`VM.PowerMgmt`, `VM.Snapshot`, `VM.Backup`) only after you have confirmed the redactor is masking your secret in your transcripts and that the model is honoring the confirm gate. Tokens are tied to a PVE user and can be revoked instantly from Datacenter > Permissions > API Tokens.
160
287
 
161
288
  The `PROXMOX_TLS_INSECURE=true` toggle exists for homelab self-signed certs. Leave it `false` in any environment with a real CA-signed cert.
162
289
 
290
+ Full security policy, reporting, and in-scope/out-of-scope detail in [SECURITY.md](SECURITY.md).
291
+
292
+ ## Live smoke testing
293
+
294
+ Read-only live smoke:
295
+
296
+ ```bash
297
+ PROXMOX_ENABLE_LIVE_SMOKE=1 npm run smoke:live
298
+ ```
299
+
300
+ Full scratch CT lifecycle smoke requires a token that can create, start, stop, inspect, and destroy resources in the `mcp-smoke` pool:
301
+
302
+ ```bash
303
+ PROXMOX_ENABLE_LIVE_SMOKE=1 \
304
+ PROXMOX_SMOKE_CREATE=1 \
305
+ PROXMOX_ENABLE_DESTRUCTIVE=1 \
306
+ npm run smoke:live
307
+ ```
308
+
309
+ Optional scratch CT backup and snapshot rollback smoke:
310
+
311
+ ```bash
312
+ PROXMOX_ENABLE_LIVE_SMOKE=1 \
313
+ PROXMOX_SMOKE_CREATE=1 \
314
+ PROXMOX_SMOKE_BACKUP=1 \
315
+ PROXMOX_SMOKE_BACKUP_STORAGE=local \
316
+ PROXMOX_SMOKE_SNAPSHOT_ROLLBACK=1 \
317
+ PROXMOX_ENABLE_DESTRUCTIVE=1 \
318
+ npm run smoke:live
319
+ ```
320
+
321
+ Create a scoped smoke-test role/user/token on the Proxmox host:
322
+
323
+ ```bash
324
+ PROXMOX_CREATE_SMOKE_TOKEN=1 bash scripts/create-smoke-token.sh
325
+ ```
326
+
327
+ The script creates or updates role `McpSmokeRole`, pool `mcp-smoke`, user `mcp-smoke@pve`, token `mcp-smoke@pve!live-smoke`, and ACLs for the smoke pool plus `local` and `local-lvm` storage. Proxmox prints the token secret once; store it in your private environment and do not commit it.
328
+
329
+ Proxmox also checks `/vms/<vmid>` before creating a new CT/VM. For one-off smoke tests, grant the exact next VMID before running the lifecycle smoke:
330
+
331
+ ```bash
332
+ PROXMOX_CREATE_SMOKE_TOKEN=1 PROXMOX_SMOKE_VMID_GRANT=102 bash scripts/create-smoke-token.sh
333
+ ```
334
+
335
+ `npm run smoke:live` now attempts that exact VMID grant automatically before creating a scratch CT or QEMU clone when `PROXMOX_SSH_HOST`, `PROXMOX_SSH_USER`, and `PROXMOX_SSH_KEY` are available. Set `PROXMOX_SMOKE_SKIP_AUTO_GRANT=1` to disable it.
336
+
337
+ Optional QEMU clone smoke:
338
+
339
+ ```bash
340
+ PROXMOX_ENABLE_LIVE_SMOKE=1 \
341
+ PROXMOX_ENABLE_DESTRUCTIVE=1 \
342
+ PROXMOX_SMOKE_QEMU_SOURCE_VMID=9000 \
343
+ npm run smoke:live
344
+ ```
345
+
346
+ This validates the source, full-clones it to a scratch VMID, starts it, waits for guest-agent network data, stops it, and destroys it. Use `PROXMOX_SMOKE_QEMU_TARGET_VMID` or `PROXMOX_SMOKE_QEMU_NAME` to override the generated target.
347
+
348
+ The QEMU source should be a small stopped VM or template with `agent: enabled=1`, DHCP networking, no PCI/USB passthrough, no raw `args`, and a modest disk size. Check it first:
349
+
350
+ ```bash
351
+ # tool: proxmox_validate_qemu_smoke_source { "vmid": 9000 }
352
+ ```
353
+
354
+ Audit smoke-token permissions:
355
+
356
+ ```bash
357
+ # tool: proxmox_audit_permissions {
358
+ # "userid": "mcp-smoke@pve!live-smoke",
359
+ # "source_vmid": 103,
360
+ # "target_vmid": 102
361
+ # }
362
+ ```
363
+
364
+ Optional systemd service smoke:
365
+
366
+ ```bash
367
+ PROXMOX_ENABLE_LIVE_SMOKE=1 \
368
+ PROXMOX_SMOKE_SYSTEMD_VMID=100 \
369
+ PROXMOX_SMOKE_SERVICE=basic.target \
370
+ npm run smoke:live
371
+ ```
372
+
373
+ To run a live service action as well as status, add `PROXMOX_SMOKE_SERVICE_ACTION=start|stop|restart` and `PROXMOX_SMOKE_SERVICE_ACTION_CONFIRM=1`.
374
+
375
+ Audit or clean leftover smoke resources:
376
+
377
+ ```bash
378
+ # Read-only pool audit
379
+ # tool: proxmox_list_pool_resources { "pool": "mcp-smoke" }
380
+
381
+ # Dry-run cleanup, only resources named mcp-smoke-* in the pool are targeted
382
+ # tool: proxmox_cleanup_smoke_resources {}
383
+
384
+ # Actual cleanup waits for delete tasks and skips running guests unless force:true
385
+ # tool: proxmox_cleanup_smoke_resources { "dry_run": false, "confirm": true, "destructive": true }
386
+ ```
387
+
388
+ ## Why not the alternatives?
389
+
390
+ - **The Proxmox web UI** is the canonical control plane and you should keep it. proxmox-mcp is not a replacement; it is the agent-facing read/operate surface so an AI client can inventory, trace, and operate the cluster in the same loop it is already running, without you driving a browser.
391
+ - **Hand-rolling Proxmox API calls in your agent** works, but the agent has to manage token auth, the redactor, retry, task polling, and (critically) safety on its own. proxmox-mcp ships the token redactor, structured MCP error payloads, and the three-tier write gate so a careless or hallucinated call fails closed instead of deleting a guest.
392
+ - **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.
393
+ - **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.
394
+
395
+ ## What proxmox-mcp is not
396
+
397
+ - It is **not a tool for blind automation of destructive operations.** The destructive tier exists for deliberate, supervised work (smoke-test cycles, intentional teardown), not for unattended agents. The `PROXMOX_ENABLE_DESTRUCTIVE=1` flag is a coarse "I am actively doing this right now" toggle; leave it unset day to day.
398
+ - It is **not a Proxmox cluster manager or orchestrator.** It does not schedule, it does not run in the background, and it holds no state of its own. It translates MCP tool calls into Proxmox API calls and SSH commands, and that is all.
399
+ - 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).
400
+ - It is **not stable yet.** It is WIP, pre-1.0, and the tool surface can change between minor versions.
401
+
402
+ ## Contributing
403
+
404
+ Bug reports and patches are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for what lands easily, local dev, and the safety rules every change must keep. By participating you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).
405
+
406
+ ## Changelog
407
+
408
+ See [CHANGELOG.md](CHANGELOG.md) for the release history.
409
+
163
410
  ## License
164
411
 
165
- MIT
412
+ MIT. See [LICENSE](LICENSE).