Skip to main content
Glama
README.md
# Proxmox MCP

Proxmox MCP is a read-only Model Context Protocol server for Proxmox VE. It gives administrators and homelab operators a way to inspect inventory, investigate resource pressure, review configured network and firewall layers, and compare backup evidence from an MCP client.

The server exposes [25 tools](docs/tools.md) over STDIO. The MCP client starts a local Node.js process, which validates arguments with Zod, issues allowlisted HTTPS GET requests to one Proxmox VE API origin, and returns structured projections of the results. Proxmox enforces the token's permissions. See the [security model](SECURITY.md) for the trust boundaries.

## Requirements and tested versions

- Node.js 22.x with npm and a non-root account. The release was tested with Node.js 22.23.5.
- Network access from the MCP process to your Proxmox VE HTTPS API and a certificate trusted by Node.js.
- A dedicated read-only Proxmox API token.
- Codex CLI or a client that can launch an MCP STDIO server. The live setup was verified with Codex CLI and Proxmox VE 9.2.6. The automated suite also exercises STDIO with fixtures. Compatibility with other clients or Proxmox versions has not been verified.

## Install from GitHub

```sh
git clone https://github.com/fdelpup/proxmox-mcp.git
cd proxmox-mcp
npm ci
npm run build
```

The entry point is `dist/index.js`. Installation, compilation and automated tests require no Proxmox credentials.

## Configure and connect

1. Create a dedicated Proxmox user and an API token with **Privilege Separation** enabled. Assign the built-in read-only `PVEAuditor` role to both the user and the token at the ACL paths needed for your tools.
2. Keep the API origin, token ID and token secret in a mode-600 file outside the checkout. The process reads `PROXMOX_URL`, `PROXMOX_TOKEN_ID` and `PROXMOX_TOKEN_SECRET` from its environment. Use a certificate trusted by Node.js or set `NODE_EXTRA_CA_CERTS` to your internal CA bundle.
3. Register the compiled entry point with your MCP client. For Codex CLI, substitute the absolute paths to Node.js, your private environment file and the checkout.

```sh
codex mcp add proxmox -- /path/to/node \
  --env-file=/path/to/private/proxmox.env \
  /path/to/proxmox-mcp/dist/index.js
codex mcp list
```

The [configuration guide](docs/configuration.md) covers effective ACLs, TLS, all environment settings and generic STDIO client configuration.

## What you can ask

- List visible nodes and guests, then summarize current resource usage for `pve-demo`.
- Compare CPU and memory for QEMU guest `101` across two halves of the last week. Include sample coverage and any gaps.
- Review configured firewall layers for `pve-demo`. Show which rules and settings support each finding and which sections were incomplete.
- Compare scheduled backup policies, recent executions and visible artifacts for `pve-demo`. Identify where recovery evidence is missing.

Start with a narrow query. The defaults allow 4 concurrent API requests, 5 requests per second, 150 upstream attempts per tool call, and a 2 MiB MCP response. Request budgets, pagination and ACLs can limit results. Check section errors, truncation and operation metadata before drawing conclusions. The [tool reference](docs/tools.md) gives arguments and approximate request costs.

The tools report API-visible configuration, counters and history. Firewall rules and configured guest addresses require separate live checks for effective filtering, isolation and connectivity. Backup schedules, task results and backup files are separate evidence from a tested restore. Use a monitoring system for continuous collection and alerting.

## Development and troubleshooting

```sh
npm ci
npm test
```

`npm test` runs the strict TypeScript build followed by Node.js tests, including a fixture-backed MCP STDIO transport. Rebuild after editing `src/`. To run the server manually with a private environment file, use `node --env-file=/path/to/private/proxmox.env dist/index.js` from the checkout.

| Symptom | Check |
| --- | --- |
| Server exits at startup | Use Node.js 22 as a non-root user, build first, and check the required settings named on stderr. |
| TLS or connection error | Verify the API host, port, hostname on the certificate and the Node.js trust chain from the client machine. |
| `unauthorized` (401) | Verify the token ID format, secret and expiry. |
| `forbidden` (403) | Check the effective ACLs for both the user and the token, including the resource path in the API viewer. |
| `not_found` or `not_implemented` | Confirm the resource and route are supported by your Proxmox version and storage backend. |
| Partial results, `busy` or `response_too_large` | Request fewer sections or rows, use summary mode and inspect the reported limits. |

## License

[MIT](LICENSE).