MCP server for managing Proxmox VE infrastructure
Project description
Proxmox MCP
An MCP (Model Context Protocol) server for managing Proxmox VE infrastructure through AI agents. Control your virtual machines, containers, storage, and snapshots via natural language.
WARNING: This project is under active development and is NOT intended for production use. This MCP server can perform destructive operations on your Proxmox infrastructure, including deleting virtual machines and containers. Data loss is possible. Use at your own risk. Always test in a non-production environment first.
Features
Discovery
list_nodes— Cluster node overviewlist_vms/list_lxc_containers— Instance inventory per nodelist_storage/list_storage_content— Storage pools, ISOs, and templatesget_instance_config— Full guest configurationget_lxc_interfaces— Container network interfacesget_resource_usage— Performance metrics (CPU, memory, network, disk)
Management
power_control— Start, stop, shutdown, reboot VMs and containerscreate_lxc/create_vm— Provision new infrastructureexecute_lxc_command— Run shell commands inside containersset_vm_cloudinit— Configure cloud-init (user, SSH keys, network)
Protection
create_snapshot/rollback_snapshot/list_snapshots— Snapshot managementdelete_instance— Permanently delete a VM or container (disabled by default, requires double confirmation)get_task_status/get_task_log— Monitor background operationsget_mcp_logs— Server-side log inspection
Quick Start
# 1. Clone and set up
git clone https://github.com/josky-com/proxmox-mcp.git
cd proxmox-mcp
./setup.sh
# 2. Configure credentials
cp .env.example .env
nano .env # Set your Proxmox URL, token name, and token value
# 3. Test connectivity
python scripts/test_connection.py
Environment Variables
| Variable | Description | Default |
|---|---|---|
PROXMOX_URL |
Proxmox API base URL (e.g., https://192.168.1.100:8006/api2/json) |
— |
PROXMOX_TOKEN_NAME |
API token ID (e.g., root@pam!mcp-token) |
— |
PROXMOX_TOKEN_VALUE |
API token secret | — |
PROXMOX_VERIFY_SSL |
Verify SSL certificates | true |
PROXMOX_ALLOW_DANGER |
Enable critical/destructive tools like delete_instance |
false |
AI Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"proxmox": {
"command": "/absolute/path/to/proxmox-mcp/.venv/bin/python3",
"args": ["-m", "proxmox_mcp"]
}
}
}
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"proxmox": {
"command": "/absolute/path/to/proxmox-mcp/.venv/bin/python3",
"args": ["-m", "proxmox_mcp"]
}
}
}
Security
Safety Tiers
All tools are classified into safety tiers:
| Tier | Behavior | Examples |
|---|---|---|
| Safe | Executes without confirmation | list_nodes, list_vms, get_instance_config |
| Restricted | Requires explicit user confirmation (confirmed=true) |
power_control, create_lxc, create_vm, execute_lxc_command |
| Critical | Blocked unless PROXMOX_ALLOW_DANGER=true + confirmation |
delete_instance |
Contract Validation
Every Proxmox API response is validated against Pydantic schemas. If the Proxmox API returns unexpected data (e.g., after a version upgrade), the server returns an API_CONTRACT_DIVERGENCE error instead of silently passing bad data.
Input Sanitization
All identifiers (node names, storage names, snapshot names) are validated against strict patterns. VMIDs must be positive integers. Shell commands are parsed through shlex to prevent injection.
Project Structure
proxmox-mcp/
├── src/proxmox_mcp/
│ ├── __main__.py # Entry point (python -m proxmox_mcp)
│ ├── server.py # FastMCP instance and tool registration
│ ├── config.py # Environment variables, client init
│ ├── models.py # Pydantic response schemas
│ ├── api/
│ │ ├── client.py # Async HTTP client for Proxmox API
│ │ └── permissions.py # Permission mapping for 403 diagnostics
│ ├── core/
│ │ ├── logger.py # Rotating file logger with redaction
│ │ ├── safety.py # Safety policy enforcement
│ │ └── sanitization.py # Input validation
│ └── tools/
│ ├── __init__.py # safety_checked decorator, shared helpers
│ ├── discovery.py # 10 tools: nodes, VMs, containers, storage, config, logs
│ ├── lifecycle.py # 4 tools: power, create LXC/VM, delete
│ ├── snapshots.py # 3 tools: list, create, rollback
│ ├── cloudinit.py # 1 tool: cloud-init configuration
│ ├── exec.py # 1 tool: execute commands in containers
│ └── metrics.py # 1 tool: resource usage metrics
├── docs/
│ ├── api_manifest.md # API contract registry (20 tools)
│ ├── architecture.md # System design overview
│ └── requirements.md # Functional requirements
├── scripts/
│ ├── test_connection.py # Manual connectivity testing
│ └── admin_dashboard.py # Live infrastructure overview
├── tests/ # pytest suite (sanitization, safety)
├── pyproject.toml # Build config and dependencies
├── setup.sh # Automated setup script
└── .env.example # Credential template
Tech Stack
- Python 3.10+
- MCP SDK (
mcp) — FastMCP server framework - Pydantic — Response validation and contract enforcement
- httpx — Async HTTP client
- Transport — stdio (JSON-RPC)
Trademark Notice
"Proxmox" and the Proxmox logo are registered trademarks of Proxmox Server Solutions GmbH (Vienna, Austria). This project is not affiliated with, endorsed by, or sponsored by Proxmox Server Solutions GmbH. This is an independent, third-party tool that integrates with the Proxmox VE API.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proxmox_mcp-0.1.0.tar.gz.
File metadata
- Download URL: proxmox_mcp-0.1.0.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a32560309715c2dbf3c11e6c82cad9f3421920173b342a8ba84baeffe04813c9
|
|
| MD5 |
df6c0667001ab4ad41040ada511883cc
|
|
| BLAKE2b-256 |
a9ec8166dc9e4f30f9b47f528a528d5859f3edc8df3cb0401f8a7a81f4a3f3cf
|
File details
Details for the file proxmox_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: proxmox_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c072e670b106401beee39f0841275e0c0c8cca218713c96ab4962aaab74f9b8
|
|
| MD5 |
a45b577d77940e3209ad270b486b6cef
|
|
| BLAKE2b-256 |
cf5deba4a69c4e6b0825d96fbcdcbd2620d59cd00557419a02a5755ebddea775
|