
MCP Proxmox 服务器
概览
Python的高级Proxmox模型上下文协议(MCP)服务器,展示了丰富的Proxmox工具,用于发现、生命周期、网络、快照/备份、指标、资源池/权限和编排。 - 指南参考:MCP 快速入门(Python)- 结构镜像:bsahane/mcp-ansible - 将 .env.example 复制到 .env 并编辑值: 注意:- 使用带有适当ACL的API令牌;在发现时,PVEAuditor在/的位置就足够了;生命周期中,在池中授予更窄的角色(例如PVEVMAdmin)。- 使用.env可以避免zsh历史扩展问题,因为!在令牌ID中。 编辑 ~/.cursor/mcp.json(便携示例): 添加到 ~/Library/Application Support/Claude/claude_desktop_config.json: 所有工具都可以通过MCP获得。破坏性工具接受确认,大多数写操作支持dry_run、等待、超时poll_interval。 以下按工具格式:- 描述 - 示例问题 → 可能答案(形状)
概述(AI 翻译)
Python的高级Proxmox模型上下文协议(MCP)服务器,展示了丰富的Proxmox工具,用于发现、生命周期、网络、快照/备份、指标、资源池/权限和编排。
- 指南参考:MCP 快速入门(Python)
- 结构镜:
bsahane/mcp-ansible
快速开始
.env 配置
- 将
.env.example复制到.env并编辑数值:
.env 按键:
注释:
- 使用带有适当ACL的API令牌;在发现时,
PVEAuditor在/就足够了;生命周期中,在池中授予更窄的角色(例如PVEVMAdmin)。 - 使用
.env避免了!在令牌 ID 中出现 zsh 历史扩展的问题。
运行MCP服务器(stdio)
优选(模块形式):
或者安装控制台脚本:
在光标中配置
编辑 ~/.cursor/mcp.json(便携示例):
在Claude中配置桌面版
添加到~/Library/Application Support/Claude/claude_desktop_config.json:
工具参考
所有工具都可以通过MCP获得。破坏性工具接受confirm,大多数写操作支持dry_run、wait、timeout、poll_interval。
以下按工具格式排列:
- 描述
- 示例问题→可能答案(形状)
核心发现
proxmox-list-nodes
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Proxmox Server
Advanced Proxmox Model Context Protocol (MCP) server in Python exposing rich Proxmox utilities for discovery, lifecycle, networking, snapshots/backups, metrics, pools/permissions, and orchestration.
- Guide reference: MCP Quickstart (Python)
- Structure mirrors:
bsahane/mcp-ansible
Quick start
git clone https://github.com/bsahane/mcp-proxmox.git
cd mcp-proxmox
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
pip install -r requirements.txt
# (Optional) install the package locally
pip install -e .
.env configuration
- Copy
.env.exampleto.envand edit values:
cp .env.example .env
.env keys:
PROXMOX_API_URL="https://proxmox.example.com:8006"
PROXMOX_TOKEN_ID="root@pam!mcp-proxmox"
PROXMOX_TOKEN_SECRET=""
PROXMOX_VERIFY="true"
PROXMOX_DEFAULT_NODE="pve"
PROXMOX_DEFAULT_STORAGE="local-lvm"
PROXMOX_DEFAULT_BRIDGE="vmbr0"
Notes:
- Use an API token with appropriate ACLs; for discovery,
PVEAuditorat/is sufficient; for lifecycle, grant narrower roles (e.g.,PVEVMAdmin) on a pool. - Using
.envavoids zsh history expansion issues with!in token IDs.
Run the MCP server (stdio)
Preferred (module form):
source .venv/bin/activate
python -m proxmox_mcp.server
Or installed console script:
source .venv/bin/activate
proxmox-mcp
Configure in Cursor
Edit ~/.cursor/mcp.json (portable example):
{
"mcpServers": {
"proxmox-mcp": {
"command": "python",
"args": ["-m", "proxmox_mcp.server"]
}
}
}
Configure in Claude for Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"proxmox-mcp": {
"command": "python",
"args": ["-m", "proxmox_mcp.server"]
}
}
}
Tools reference
All tools are available via MCP. Destructive tools accept confirm, and most write operations support dry_run, wait, timeout, poll_interval.
Format below per tool:
- Description
- Example question → Possible answer (shape)
Core discovery
proxmox-list-nodes- List cluster nodes (name, status, CPU/RAM/disk summary)
- Example: “List cluster nodes”
- Answer:
[ { "node": "pve", "status": "online", ... } ]
proxmox-node-status- Detailed node health (load, uptime, versions)
- Example:
{ "node": "pve" } - Answer:
{ "kversion": "...", "uptime": 123456, ... }
proxmox-list-vms- List VMs (filter by node, status, name substring)
- Example:
{ "node": "pve", "status": "running" } - Answer:
[ { "vmid": 100, "name": "web01", ... } ]
proxmox-vm-info- Get VM details by
vmidorname(+optional node), includes config - Example:
{ "name": "web01" } - Answer:
{ "selector": {...}, "config": {...} }
- Get VM details by
proxmox-list-lxc
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"proxmox-mcp": {
"command": "python",
"args": ["-m", "proxmox_mcp.server"]
}
}
}