Skip to main content
Glama
gneely74

PVE MCP Server

by gneely74
README.md
# PVE MCP Server

A Model Context Protocol (MCP) server for managing Proxmox Virtual Environment (PVE).

## Features

- **Cluster**: View cluster status and resources
- **Nodes**: List nodes, get detailed node status
- **QEMU VMs**: List, status, config, start, stop, shutdown, reboot, suspend, resume
- **LXC Containers**: List, status, config, start, stop, shutdown, reboot
- **Storage**: List storage pools, browse storage content
- **Tasks**: View recent tasks and task status
- **Version**: Get PVE version info

## Setup

### 1. Create a PVE API Token

In the Proxmox web UI:
1. Go to **Datacenter** → **Permissions** → **API Tokens**
2. Click **Add**
3. Select a user (e.g. `root@pam`), give the token a name (e.g. `mcp`)
4. Uncheck "Privilege Separation" if you want the token to inherit the user's permissions
5. Copy the token ID and secret value

### 2. Install

```bash
cd pve-mcp
python3 -m venv venv
venv/bin/pip install -e .
```

### 3. Configure Environment Variables

```bash
export PVE_HOST="your-proxmox-host"
export PVE_USER="root@pam"
export PVE_TOKEN_NAME="mcp"
export PVE_TOKEN_VALUE="your-token-secret"
# Optional:
export PVE_PORT="8006"         # default: 8006
export PVE_VERIFY_SSL="false"  # default: false
```

### 4. Run

```bash
python run_mcp_server.py
```

### 5. Add to Warp

In Warp Settings → MCP Servers, add a new server with:

```json
{
  "pve": {
    "command": "python",
    "args": ["/Users/gneely/git/pve-mcp/run_mcp_server.py"],
    "env": {
      "PVE_HOST": "your-proxmox-host",
      "PVE_USER": "root@pam",
      "PVE_TOKEN_NAME": "mcp",
      "PVE_TOKEN_VALUE": "your-token-secret"
    }
  }
}
```

## Available Tools

| Tool | Description |
|------|-------------|
| `get_cluster_status` | Cluster status and quorum info |
| `get_cluster_resources` | All resources across the cluster |
| `get_nodes` | List all nodes |
| `get_node_status` | Detailed node status |
| `list_vms` | List QEMU VMs |
| `get_vm_status` | VM current status |
| `get_vm_config` | VM configuration |
| `start_vm` | Start a VM |
| `stop_vm` | Hard stop a VM |
| `shutdown_vm` | Graceful shutdown |
| `reboot_vm` | Reboot a VM |
| `suspend_vm` | Suspend a VM |
| `resume_vm` | Resume a VM |
| `list_containers` | List LXC containers |
| `get_container_status` | Container status |
| `get_container_config` | Container configuration |
| `start_container` | Start a container |
| `stop_container` | Stop a container |
| `shutdown_container` | Graceful shutdown |
| `reboot_container` | Reboot a container |
| `get_storage` | List storage pools |
| `get_storage_content` | Browse storage content |
| `get_tasks` | Recent tasks |
| `get_task_status` | Task status by UPID |
| `get_version` | PVE version info |