proxmox-mcp
# proxmox-mcp
## What it is
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.
## Install
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)
```sh
npm install --global @solomonneas/proxmox-mcp@0.13.1
```
Set the variables below, then run `proxmox-mcp` to start the stdio server. To run that version without a global install:
```sh
npm exec --yes --package=@solomonneas/proxmox-mcp@0.13.1 -- proxmox-mcp
```
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)
## Configure
Set these variables in the server process environment. The values below are placeholders.
```sh
export PROXMOX_URL='https://pve.example.com:8006'
export PROXMOX_TOKEN_ID='operator@pve!mcp'
export PROXMOX_TOKEN_SECRET='replace-with-api-token-secret'
```
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)
### Transports
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)
For calls backed by the Proxmox API, the client and server use these connections:
```mermaid
flowchart LR
Client[MCP client] -->|stdio| Server[proxmox-mcp]
Client -->|HTTP with bearer token| Server
Server -->|Proxmox API token| API[Proxmox VE API]
```
### Guest access
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.
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)
## Tools
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)
| Group | Count | Examples |
| --- | ---: | --- |
| Reads | 49 | `proxmox_list_vms`, `proxmox_list_unprotected_guests`, `proxmox_node_journal`, `proxmox_firewall_log` |
| Guest reads with confirmation | 4 | `proxmox_list_directory`, `proxmox_read_file`, `proxmox_service_status`, `proxmox_stat_path` |
| Other tools with confirmation | 40 | `proxmox_start_resource`, `proxmox_snapshot_resource`, `proxmox_exec`, `proxmox_set_acl` |
| Destructive tier | 9 | `proxmox_destroy_resource`, `proxmox_node_power`, `proxmox_restore_backup` |
The full inventory is below. Each name starts with `proxmox_`.
<details>
<summary>Reads</summary>
`audit_permissions`, `cluster_log`, `cluster_status`, `firewall_log`, `get_cluster_options`
`get_container_config`, `get_firewall_options`, `get_resource`, `get_task_log`, `get_task_status`
`get_vm_config`, `guest_network`, `ha_status`, `list_acl`, `list_auth_domains`
`list_backup_jobs`, `list_backups`, `list_containers`, `list_disks`, `list_firewall_rules`
`list_groups`, `list_ha_resources`, `list_ha_rules`, `list_metric_servers`, `list_node_services`
`list_pool_resources`, `list_pools`, `list_replication`, `list_roles`, `list_sdn_vnets`
`list_sdn_zones`, `list_snapshots`, `list_storage`, `list_storage_config`, `list_storage_content`
`list_templates`, `list_tfa`, `list_tokens`, `list_unprotected_guests`, `list_updates`
`list_users`, `list_vms`, `next_vmid`, `node_journal`, `recent_tasks`
`resource_usage`, `status`, `validate_qemu_smoke_source`, `wait_task`
</details>
<details>
<summary>Guest reads with confirmation</summary>
`list_directory`, `read_file`, `service_status`, `stat_path`
</details>
<details>
<summary>Other tools with confirmation</summary>
`add_firewall_rule`, `add_ha_resource`, `cancel_task`, `clone_resource`, `convert_to_template`
`create_backup_job`, `create_container`, `create_pool`, `create_replication`, `create_storage`
`create_token`, `create_vm`, `delete_backup_job`, `delete_firewall_rule`, `delete_ha_resource`
`delete_pool`, `delete_replication`, `delete_token`, `download_url`, `exec`
`migrate_resource`, `move_disk`, `reboot_resource`, `reset_resource`, `resize_disk`
`resume_resource`, `run_backup`, `service_restart`, `service_start`, `service_stop`
`set_acl`, `set_firewall_enabled`, `snapshot_resource`, `start_resource`, `stop_resource`
`suspend_resource`, `update_container_config`, `update_pool`, `update_vm_config`, `write_file`
</details>
<details>
<summary>Destructive tier</summary>
`cleanup_smoke_resources`, `delete_snapshot`, `delete_storage`, `delete_volume`, `destroy_resource`
`force_stop_resource`, `node_power`, `restore_backup`, `rollback_snapshot`
</details>
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)
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)
## Safety
- The 49 read tools take no confirmation flag. The four guest reads require `confirm: true` even though MCP marks them with `readOnlyHint: true`.
- 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.
- 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.
- 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.
[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)
## Why not `pvesh`, Ansible, or ungated Proxmox MCP servers?
| Tool | Scope | Write safety for AI agents | Local CLI included |
| --- | --- | --- | --- |
| **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`) |
| `pvesh` / `qm` / `pct` | Full local node admin over SSH | No agent guardrails | Node-local CLI only |
| Ansible / Terraform | Declarative provisioning and IaC | Explicit plan/apply workflow | CLI only, no interactive MCP |
| Minimal Proxmox MCP wrappers | Thin API pass-throughs | Often expose stop/delete without confirmation tiers | Usually no |
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.
## FAQ
**Can an AI agent delete a VM or container by mistake?**
No. Mutating and destructive verbs are gated behind explicit environment policy and confirmation checks before any Proxmox API write runs.
**Does `proxmox-mcp` require SSH root access to my Proxmox host?**
No. It authenticates over HTTPS to the Proxmox VE API using a scoped API token (`PROXMOX_TOKEN_ID` and `PROXMOX_TOKEN_SECRET`).
**How do I handle Proxmox's default self-signed TLS certificate?**
Supply your cluster CA bundle via the TLS CA configuration, or opt in explicitly for isolated lab setups as documented in the configuration section.
## Part of Lidless Labs
`proxmox-mcp` is maintained by [Lidless Labs](https://lidless.dev) ([GitHub](https://github.com/lidless-labs)). Related Proxmox and homelab tools:
- [proxguard](https://github.com/lidless-labs/proxguard) - Proxmox VE security auditor with CIS benchmarks and remediation scripts
- [lidless-proxmox](https://github.com/lidless-labs/lidless-proxmox) - one-command Proxmox LXC installers with post-install verification
- [soc-stack](https://github.com/lidless-labs/soc-stack) - one-command self-hosted SOC lab for Proxmox VE
- [watchtower](https://github.com/lidless-labs/watchtower) - self-hosted NOC dashboard for LibreNMS and Proxmox VE
- [adguardctrl](https://github.com/lidless-labs/adguardctrl) - AdGuard Home CLI and MCP server with confirm-gated writes
## Development
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)
```sh
npm ci
./scripts/verify
```
### Live smoke testing
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)
### Publishing
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)
[Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md) · [MIT License](LICENSE)
TDQS
Scored across 102 tools
Most tools pair a distinct resource with a distinct action, and the descriptions clarify similar-sounding reads. There is still some friction among the many status/list reads (e.g. proxmox_status vs proxmox_cluster_status vs proxmox_ha_status, and proxmox_list_storage vs proxmox_list_storage_config vs proxmox_list_storage_content), but few true collisions.
Names consistently use a proxmox_ prefix and snake_case, mostly following verb_noun (list_*, get_*, create_*, delete_*, update_*). A few are noun-style (proxmox_cluster_log, proxmox_node_journal, proxmox_firewall_log, proxmox_status), but the convention is still predictable overall.
102 tools is far beyond the appropriate range for a single server surface and creates a large selection burden. Even for a broad domain like Proxmox, this many tools should be split or hidden behind higher-level workflows.
Coverage is very broad: guest lifecycle, config, snapshots, backups, storage, firewall, HA, replication, tasks, pools, and guest exec/file operations are all represented. Some gaps remain in write operations for SDN zones/vnets, users/groups/roles, metric servers, and HA rules, but core workflows are largely covered.