Complete guide for integrating Proxmox MCP Enhanced with Claude Code CLI to manage Proxmox infrastructure.
Successfully integrated Proxmox MCP Enhanced v1.0.0 with Claude Code, providing 119 specialized tools for managing Proxmox VE infrastructure including VMs, containers, storage, networking, and more.
Initially faced issues loading the Proxmox MCP server in Claude Code:
- ✗ Project
.mcp.json
files require UI approval in Claude Code - ✗
proxmox-mcp
command wrapper had initialization issues - ✗ Claude Desktop config (
claude_desktop_config.json
) doesn't apply to Claude Code CLI
# Clone the repository
git clone https://github.com/jmanhype/proxmox-mcp-enhanced.git
cd proxmox-mcp-enhanced
# Install in development mode
pip install -e .
# Verify installation
pip show proxmox-mcp-enhanced
Use the Claude Code CLI to add the server with proper configuration:
# Add the server (basic)
claude mcp add -s user proxmox python -m proxmox_mcp.server
The claude mcp add
command doesn't support environment variables directly, so we need to edit the config file:
# Edit ~/.claude.json and add environment variables to the proxmox server section
Or use this Python script to automate it:
import json
# Read Claude Code config
with open('/Users/YOUR_USERNAME/.claude.json', 'r') as f:
config = json.load(f)
# Update proxmox server with environment variables
if 'mcpServers' in config and 'proxmox' in config['mcpServers']:
config['mcpServers']['proxmox']['command'] = 'python'
config['mcpServers']['proxmox']['args'] = ['-m', 'proxmox_mcp.server']
config['mcpServers']['proxmox']['env'] = {
"PROXMOX_HOST": "YOUR_PROXMOX_IP",
"PROXMOX_USER": "root@pam",
"PROXMOX_TOKEN_NAME": "YOUR_TOKEN_NAME",
"PROXMOX_TOKEN_VALUE": "YOUR_TOKEN_VALUE",
"PROXMOX_VERIFY_SSL": "false" # Set to "true" if using valid SSL cert
}
# Save config
with open('/Users/YOUR_USERNAME/.claude.json', 'w') as f:
json.dump(config, f, indent=2)
print("✓ Proxmox MCP server configured successfully")
After configuration changes:
# Restart Claude Code completely
# The server will auto-load on next startup
# List all MCP servers
claude mcp list
# Look for:
# proxmox: python -m proxmox_mcp.server - ✓ Connected
Final configuration in ~/.claude.json
:
{
"mcpServers": {
"proxmox": {
"type": "stdio",
"command": "python",
"args": ["-m", "proxmox_mcp.server"],
"env": {
"PROXMOX_HOST": "192.168.1.123",
"PROXMOX_USER": "root@pam",
"PROXMOX_TOKEN_NAME": "mcp-server",
"PROXMOX_TOKEN_VALUE": "your-token-here",
"PROXMOX_VERIFY_SSL": "false"
}
}
}
}
- Log into Proxmox web interface
- Navigate to Datacenter → Permissions → API Tokens
- Click Add
- Set:
- User:
root@pam
- Token ID:
mcp-server
(or your choice) - Privilege Separation: Uncheck (for full access)
- User:
- Copy the generated token value (only shown once!)
curl -k -s -H "Authorization: PVEAPIToken=root@pam!mcp-server=YOUR_TOKEN" \
https://YOUR_PROXMOX_IP:8006/api2/json/version
Expected output:
{
"data": {
"version": "8.4.1",
"release": "8.4",
"repoid": "..."
}
}
vm_list
- List all VMs with statusvm_create
- Create new VMvm_start
- Start VMvm_stop
- Stop VMvm_restart
- Restart VMvm_suspend
- Suspend VM to RAMvm_resume
- Resume suspended VMvm_clone
- Clone VMvm_delete
- Delete VM
container_list
- List all LXC containerscontainer_create
- Create new containercontainer_start
- Start containercontainer_stop
- Stop containercontainer_restart
- Restart containercontainer_suspend
- Suspend containercontainer_resume
- Resume containercontainer_migrate
- Migrate containercontainer_delete
- Delete container
container_exec
- Execute command in container via SSHvm_exec
- Execute command in VM (requires qemu-guest-agent)container_push_file
- Upload file to containercontainer_pull_file
- Download file from container
storage_list
- List all storagestorage_create
- Create storagestorage_update
- Update storage configstorage_delete
- Delete storagestorage_content_list
- List storage contentstorage_upload
- Upload to storagestorage_download
- Download from storage- And more...
- Cluster Management (8 tools)
- Monitoring (2 tools)
- Backup & Recovery (8 tools)
- Networking (6 tools)
- High Availability (6 tools)
- Firewall (5 tools)
- User Management (3 tools)
- Templates (4 tools)
- Migration (3 tools)
- Snapshots (4 tools)
- Replication (3 tools)
- Ceph Storage (5 tools)
- ZFS Storage (4 tools)
- SDN/VXLAN (4 tools)
- Automation (3 tools)
- Reporting (3 tools)
- ISO Management (4 tools)
Ask Claude Code:
"List all my Proxmox containers with their status"
Claude will use the container_list
tool automatically.
Ask Claude Code:
"Run 'df -h' in container CT 103"
Claude will use the container_exec
tool.
Ask Claude Code:
"Increase CT 103 CPU cores from 1 to 4"
Claude will:
- Stop the container (if running)
- Update CPU configuration
- Start the container
Ask Claude Code:
"Create a new Ubuntu 22.04 container with 2 CPUs and 2GB RAM"
Check the MCP server status:
claude mcp list
Look for ✓ Connected
next to proxmox.
export PROXMOX_HOST="192.168.1.123"
export PROXMOX_USER="root@pam"
export PROXMOX_TOKEN_NAME="mcp-server"
export PROXMOX_TOKEN_VALUE="your-token"
export PROXMOX_VERIFY_SSL="false"
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | python -m proxmox_mcp.server
Should output:
Starting Proxmox MCP Enhanced Server v1.0.0
Registered tools: 119
{"jsonrpc":"2.0","id":1,"result":{...}}
Verify they're set in the config:
grep -A 10 '"proxmox"' ~/.claude.json
Ensure API token has proper permissions:
- Token should be created for
root@pam
- Privilege Separation should be disabled for full access
- Or assign specific PVE permissions to the token
Feature | Claude Desktop | Claude Code (CLI) |
---|---|---|
Config File | ~/Library/Application Support/Claude/claude_desktop_config.json |
~/.claude.json |
Project MCP | .mcp.json requires UI approval |
.mcp.json requires UI approval |
Add Server Command | Manual JSON editing | claude mcp add command |
Scope | Global only | Local, User, or Project |
Auto-load | Yes | Yes (user/local scope) |
The proxmox-mcp
command wrapper had initialization issues:
- ✗ Timed out during MCP handshake
- ✗ Didn't properly initialize async event loop
- ✓
python -m proxmox_mcp.server
works reliably
- SSL Verification: Set
PROXMOX_VERIFY_SSL=true
if using valid SSL certificates - API Token Scope: Consider creating a dedicated token with limited permissions
- Token Storage: The token is stored in plain text in
~/.claude.json
- Network Access: Ensure Proxmox API (port 8006) is accessible from Claude Code
- Proxmox MCP Enhanced: https://github.com/jmanhype/proxmox-mcp-enhanced
- Proxmox VE API Documentation: https://pve.proxmox.com/pve-docs/api-viewer/
- Claude Code Documentation: https://docs.claude.com/en/docs/claude-code
- MCP Protocol: https://modelcontextprotocol.io/
- Server: Proxmox MCP Enhanced v1.0.0
- Developer: jmanhype
- Protocol: Model Context Protocol (MCP)
- AI Assistant: Claude Code by Anthropic
Status: ✅ WORKING - 119 tools successfully integrated with Claude Code
Last Updated: 2025-10-09