mcp-xcpng
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-xcpng
A Model Context Protocol (MCP) server for XCP-ng / Xen Orchestra, providing AI assistants with full access to VM, host, storage, and snapshot management through the Xen Orchestra REST API.
Features
17 tools across four categories:
Virtual Machine Management
Tool | Description |
| List all VMs with name, power state, memory, CPU count, and host placement |
| Get detailed VM information by UUID or XO object ID |
| Start a halted or suspended VM |
| Clean or forced shutdown of a running VM |
| Suspend a VM (saves memory state to disk) |
| Resume a suspended VM |
| Clean or forced reboot of a running VM |
Host Management
Tool | Description |
| List all XCP-ng hypervisor hosts with CPU, memory, and version info |
| Get detailed host information by UUID or XO object ID |
| Get CPU and memory usage statistics with configurable time granularity |
Storage Management
Tool | Description |
| List all Storage Repositories with type, total, used, and free space |
| Get detailed SR info including free/total space and utilization percentage |
| List Virtual Disk Images in a Storage Repository |
Snapshot Management
Tool | Description |
| List VM snapshots, optionally filtered by VM |
| Create a VM snapshot |
| Delete a snapshot (irreversible) |
| Revert a VM to a previous snapshot state |
Related MCP server: oVirt MCP Server
Installation
git clone git@github.com:fredriksknese/mcp-xcpng.git
cd mcp-xcpng
npm install
npm run buildConfiguration
The server is configured via environment variables:
Variable | Required | Default | Description |
| Yes | — | Xen Orchestra server hostname or IP |
| Yes | — | Xen Orchestra username |
| Yes | — | Xen Orchestra password |
| No |
| Accept self-signed SSL certificates |
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"xcpng": {
"command": "node",
"args": ["/absolute/path/to/mcp-xcpng/dist/index.js"],
"env": {
"XO_HOST": "your-xen-orchestra.example.com",
"XO_USERNAME": "admin@admin.net",
"XO_PASSWORD": "your-password"
}
}
}
}Usage with Claude Code
claude mcp add xcpng -- node /absolute/path/to/mcp-xcpng/dist/index.jsSet the required environment variables before running, or configure them in your MCP settings.
Example Prompts
Once connected, you can ask your AI assistant things like:
"Show me all running VMs on the cluster"
"What is the memory usage on host xcp-01?"
"Create a snapshot of vm-web-01 called 'pre-upgrade'"
"List all storage repositories and their free space"
"Stop the VM named 'test-server' cleanly"
"Show me all snapshots for VM abc-1234"
"What are the CPU stats for host xcp-node-02 over the last week?"
"Delete the snapshot named 'old-backup' from VM prod-db"
"List all VMs that are currently halted"
"How much free space is left on the NFS storage repository?"
API
This server targets the Xen Orchestra REST API (/rest/v0/), which is available in Xen Orchestra Community Edition (XO-CE) and the commercial Xen Orchestra appliance (XOA).
Authentication uses the session cookie mechanism: a POST /rest/v0/session with credentials returns a cookie that is used for all subsequent requests.
Note: The Xen API (XAPI) XML-RPC interface is available directly on XCP-ng hosts at
https://{host}/RPC2and usesSession.login_with_passwordfor authentication. This server targets XO as the management layer instead, which provides a unified API across all hosts in a pool.
Development
npm run dev # Run with tsx (auto-reloads)
npm run build # Compile TypeScript to dist/
npm start # Run compiled outputArchitecture
src/
├── index.ts # Entry point — creates MCP server + STDIO transport
├── xcpng-client.ts # HTTP client wrapping the Xen Orchestra REST API
└── tools/
├── vms.ts # VM lifecycle management (7 tools)
├── hosts.ts # Host info and statistics (3 tools)
├── storage.ts # Storage repositories and VDIs (3 tools)
└── snapshots.ts # Snapshot CRUD and revert (4 tools)Requirements
Node.js 18+
Xen Orchestra (XOA or XO-CE) with REST API enabled
XCP-ng hypervisor hosts managed by Xen Orchestra
License
SEE LICENSE IN LICENSE
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Vozora VPS servers, SSH keys, firewalls, DNS and usage from an AI agent.
Manage HepCloud (Turkish cloud) servers and managed PostgreSQL from your AI assistant. OAuth 2.1.
Manage Rackspace Spot Kubernetes Cloudspaces, node pools, and VMs from your AI assistant.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables management of Xen Orchestra (XOA) via its REST API, including listing VMs, backup jobs, logs, and repositories.2-
- FlicenseNot gradedqualityDmaintenanceEnables management of oVirt / Red Hat Virtualization environments via AI assistants, supporting VM lifecycle, power operations, snapshots, and infrastructure queries.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Proxmox VE infrastructure, including VMs, containers, storage, and cluster operations via natural language.MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to manage Proxmox VE infrastructure, including VMs, containers, storage, network, high availability, replication, SDN, and node administration.10015 npmMIT