GM

gilby125/mcp-proxmox

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

56 stars 18 forks 质量 85 趋势 14MIT

gilby125/mcp-proxmox 是从 https://github.com/gilby125/mcp-proxmox. 导入的 MCP 服务器候选

概览

gilby125/mcp-proxmox 是从 https://github.com/gilby125/mcp-proxmox. 导入的 MCP 服务器候选

概述(AI 翻译)

基于Node.js的模型上下文协议(MCP)服务器用于管理 Proxmox VE 虚拟机监控程序:节点、QEMU 虚拟机和 LXC 容器,具备可配置权限等级和 Terraform/OpenTofu 导出功能。

制作人员

基于 canvrno/ProxmoxMCP 的原始 Python 实现。该Node.js版本保留了相同的核心功能,同时增加了可配置权限管理和 Terraform/OpenTofu 生成功能。

特色

  • 两种权限等级:默认只读;破坏性操作需要明确选择加入([PROXMOX_ALLOW_ELEVATED=true)
  • 节点、虚拟机和容器管理:状态、生命周期(启动/停止/重启/关闭/暂停)、创建、克隆、调整大小、删除、迁移、转换为模板
  • 任务跟踪:通过UPID读取(并可选等待)任何任务,以便变异操作确认它们确实完成了
  • 访客代理集成:执行命令并读取其标准输出/退出代码,并发现运行中的虚拟机的真实IP地址
  • 快照和备份:创建、列出、回滚、删除
  • 磁盘和网络配置:添加、调整大小、移动和移除磁盘、挂载点和网络接口

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Proxmox MCP Server (Node.js Edition)

A Node.js-based Model Context Protocol (MCP) server for managing Proxmox VE hypervisors: nodes, QEMU VMs, and LXC containers, with configurable permission levels and Terraform/OpenTofu export.

Credits

Based on the original Python implementation by canvrno/ProxmoxMCP. This Node.js version keeps the same core functionality while adding configurable permission management and Terraform/OpenTofu generation.

Features

  • Two permission levels: read-only by default; destructive operations require an explicit opt-in (PROXMOX_ALLOW_ELEVATED=true)
  • Node, VM, and container management: status, lifecycle (start/stop/reboot/shutdown/pause), create, clone, resize, delete, migrate, convert-to-template
  • Task tracking: read (and optionally wait on) any task by UPID so mutating operations can confirm they actually finished
  • Guest agent integration: run commands and read their stdout/exit code, and discover a running VM’s real IP addresses
  • Snapshots and backups: create, list, rollback, delete
  • Disk and network configuration: add, resize, move, and remove disks, mount points, and network interfaces
  • Cloud-init, historical metrics (RRD), and read-only observability of pools, HA resources, and firewall rules
  • Terraform/OpenTofu export: generate HCL (with import blocks) from existing VMs and containers to adopt them into IaC without recreation
  • Structured output: tools return machine-readable structuredContent alongside the Markdown text, so agents can chain on the data
  • MCP Resources (proxmox://nodes, proxmox://vms, proxmox://storage) and Prompts (provisioning, health check, permission diagnosis)
  • Safety rails: optional TLS verification, node/VMID allowlists, and a protection-flag check that blocks deleting protected guests
  • Built on the official MCP SDK

Quick navigation

Installation

Prerequisites

Setup

Clone and install:

git clone https://github.com/gilby125/mcp-proxmox.git
cd mcp-proxmox
npm install

Or run without cloning via npx:

PROXMOX_HOST=your-proxmox-ip PROXMOX_TOKEN_VALUE=your-token-secret npx mcp-proxmox

Or with Docker (MCP speaks over stdio, so run attached with -i):

docker build -t mcp-proxmox .
docker run -i --rm \
  -e PROXMOX_HOST=your-proxmox-ip \
  -e PROXMOX_TOKEN_VALUE=your-token-secret \
  mcp-proxmox

Configuration

The server is configured through environment variables. The only required

在 GitHub 查看完整 README

安装

docker run -i --rm \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "proxmox": { "command": "node", "args": ["/absolute/path/to/mcp-proxmox/index.js"], "env": { "PROXMOX_HOST": "your-proxmox-ip", "PROXMOX_USER": "root@pam", "PROXMOX_TOKEN_NAME": "mcp-server", "PROXMOX_TOKEN_VALUE": "your-token-secret", "PROXMOX_ALLOW_ELEVATED": "false" } } } }