vcenter-mcp
This server acts as an MCP server for VMware vCenter and ESXi, enabling VM lifecycle management via the following tools:
list_vms: Retrieve all VMs on a target (vCenter datacenter or standalone ESXi host), grouped by host. Returns details including name, moref ID, UUID, power state, guest OS, CPU/memory, storage, IP addresses, NICs, and disks.create_vm: Provision a new VM that network-boots first, using a named template (e.g.,esxi,ubuntu,rhel) with options to override CPU, RAM, disk size, disk provisioning (thin/thick), and network profile.power_on_vm: Start a VM identified by its display name or moref ID (e.g.,vm-42).power_off_vm: Hard power off a VM identified by its display name or moref ID.delete_vm: Permanently remove a VM by display name or moref ID — automatically powers it off first if running, then deletes it from disk.
Provides tools for managing VMware vCenter and ESXi VM lifecycle, including listing VMs, creating VMs, powering on/off, and deleting VMs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vcenter-mcplist all VMs in lab-vcenter"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vcenter-mcp
A Model Context Protocol server that exposes VMware vCenter / ESXi VM lifecycle tools to Claude Code and other MCP clients. Built on pyVmomi.
What it does
List VMs on a vCenter datacenter (grouped by host) or on a standalone ESXi host
Create a VM (network-boot first; thin or thick provisioning; nested-virt option for ESXi targets)
Power VMs on and off
Delete VMs (powers off first if running, then destroys from disk)
Lookups accept either a display name or a moref ID (e.g. vm-42) — the moref path skips the inventory scan and is faster on large environments.
Related MCP server: VMWare MCP
Prerequisites
Python 3.10 or newer
A vCenter Server or standalone ESXi host you can reach over the network
A vSphere account with the privileges needed for whatever you plan to do (read-only is enough for
list_vms; create / delete need the corresponding VM and resource-pool privileges)
Install
Install into a project-local virtualenv. Using a venv keeps vcenter-mcp and its dependencies (notably pyVmomi) isolated from your system Python.
From a clone of this repository:
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -e .For development (also installs pytest):
.venv/bin/pip install -e ".[dev]"Throughout this README, commands use
.venv/bin/.... You can insteadsource .venv/bin/activateonce per shell and drop the prefix — same result.
Configure a target
Run the interactive setup using the venv's Python:
.venv/bin/python -m vcenter_mcp setupYou'll be prompted for:
A target name (e.g.
lab-vcenter) — used to refer to this target laterHost or IP of the vCenter / ESXi
Username and password
Target type:
vcenteroresxi(vCenter only) Datacenter and cluster names
Datastore name
One or more network profiles, each a name plus one or more portgroup names
The setup writes a config to ~/.config/vcenter-mcp/config.json (mode 0600). Re-run it any time to add another target or update an existing one.
Config file shape
{
"default_target": "lab-vcenter",
"targets": {
"lab-vcenter": {
"host": "vcenter.lab.example.com",
"user": "admin@vsphere.local",
"password": "...",
"type": "vcenter",
"datacenter": "Lab DC",
"cluster": "Lab Cluster",
"datastore": "datastore1",
"networks": {
"standard": ["VM Network"],
"secure-boot": ["pg-secure-1", "pg-secure-2"]
},
"default_network": "standard"
}
},
"templates": {
"esxi": { "cpu": 4, "ram_mb": 16384, "disk_gb": 100, "disk_provisioning": "thin", "guest_id": "vmkernel7Guest", "vhv": true },
"ubuntu": { "cpu": 2, "ram_mb": 4096, "disk_gb": 40, "disk_provisioning": "thin", "guest_id": "ubuntu64Guest", "vhv": false },
"rhel": { "cpu": 2, "ram_mb": 4096, "disk_gb": 40, "disk_provisioning": "thin", "guest_id": "rhel9_64Guest", "vhv": false }
}
}A network profile is a list of portgroups; the first entry becomes the boot NIC. To add your own VM types, add entries to templates — vm_type strings passed to create_vm are matched against this dict.
Register with Claude Code
Register the MCP server using the venv's Python by absolute path. Claude Code launches the server in a fresh shell that does not inherit your activated venv, so the absolute path is required — pointing at a bare python here will fail to import vcenter_mcp.
VCENTER_MCP_DIR="$(pwd)" # run this from the repo root, after install
claude mcp add --scope user vcenter -- "$VCENTER_MCP_DIR/.venv/bin/python" -m vcenter_mcpOr just inline the absolute path you want:
claude mcp add --scope user vcenter -- /absolute/path/to/vcenter-mcp/.venv/bin/python -m vcenter_mcpRead tools (list_vms) are safe to allow without prompting. Add it to permissions.allow in ~/.claude/settings.json:
{
"permissions": {
"allow": [
"mcp__vcenter__list_vms"
]
}
}The destructive tools (create_vm, power_on_vm, power_off_vm, delete_vm) are intentionally not in the default allow-list — Claude will prompt you per call.
Tools
list_vms
List VMs on a target using a single PropertyCollector RPC (no per-VM round trips).
Parameter | Type | Description |
| string (optional) | Target name from config. Defaults to |
| string (optional) | vCenter only — datacenter to list. Defaults to the target's configured datacenter. |
Each VM in the returned list includes:
Field | Description |
| Display name |
| Managed object reference ID (e.g. |
| BIOS UUID |
|
|
| Guest OS identifier (e.g. |
| Full guest OS name |
| Number of vCPUs |
| Memory in MB |
| Committed storage in bytes |
| Primary guest IP (requires VMware Tools) |
| List of NICs — each with |
| List of virtual disks — each with |
On error, returns a single dict with an error key.
create_vm
Create a VM that network-boots first.
Parameter | Type | Description |
| string | Display name for the new VM |
| string | Template name from config (e.g. |
| string (optional) | Target name from config. Defaults to |
| string (optional) | Named network profile from target config (e.g. |
| int (optional) | Override template CPU count |
| int (optional) | Override template memory in MB |
| int (optional) | Override template disk size in GB |
| string (optional) |
|
power_on_vm
Power on a VM by display name or moref ID (e.g. vm-42).
Parameter | Type | Description |
| string | Display name or moref ID |
| string (optional) | Target name from config. Defaults to |
power_off_vm
Hard power off a VM by display name or moref ID (e.g. vm-42).
Parameter | Type | Description |
| string | Display name or moref ID |
| string (optional) | Target name from config. Defaults to |
delete_vm
Permanently delete a VM (powers off first if running, then destroys from disk).
Parameter | Type | Description |
| string | Display name or moref ID |
| string (optional) | Target name from config. Defaults to |
Connection management
vcenter-mcp maintains a shared ServiceInstance per user@host combination for the lifetime of the MCP server process rather than opening and closing a new connection on every tool call.
Session lifecycle:
Created on the first tool call for a given target
Reused on all subsequent calls with the same credentials
Reconnected automatically if a liveness ping (
currentSession) detects the session has expiredDisconnected explicitly when a session is replaced (ping failure) or invalidated (
NotAuthenticated/SecurityErrorfault)
Session sharing rules:
Scenario | Result |
Same user, same vCenter | Single shared session |
Different user, same vCenter | Separate session per user |
Same user, different vCenter | Separate session per host |
Concurrent tool calls are safe — a threading.Lock guards all cache reads and writes.
Notes on TLS
vcenter-mcp connects with an unverified SSL context, which is the same default that govc and most pyVmomi sample code use because lab vCenters very commonly have self-signed certs. If your target uses a properly-signed certificate and you'd prefer real verification, swap _ssl_context() in src/vcenter_mcp/client.py.
Development
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytestTests run on Python 3.10, 3.11, and 3.12 in CI (see .github/workflows/test.yml).
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables AI agents to manage VMware vSphere virtual infrastructure through comprehensive operations including VM power control, snapshot management, resource monitoring, performance analytics, and bulk operations with built-in safety confirmations for destructive actions.Last updated
- Alicense-qualityDmaintenanceEnables AI agents to manage VMware vSphere infrastructure through 55 typed tools built on the govc CLI. It supports comprehensive operations including VM lifecycle management, snapshot control, datastore navigation, and networking configuration.Last updated172MIT
- AlicenseAqualityAmaintenanceAI-powered VMware vCenter/ESXi monitoring and operations. 20 MCP tools for inventory queries, health monitoring, VM lifecycle management, fast provisioning (Linked Clone, OVA, template deploy), snapshot management, and datastore browsing. Supports vSphere 6.5–8.0. Works with local models via Ollama/LM Studio.Last updated4464MIT
- Alicense-qualityDmaintenanceEnables management of VMware vCenter and ESXi environments, including VM operations, resource management, and automation with Ollama AI and n8n workflows.Last updated4MIT
Related MCP Connectors
Manage projects, tasks, time tracking, and team collaboration through natural language.
Massed Compute MCP — GPU inventory, VM lifecycle, billing, SSH keys, and setup recipes.
Operate your Linux servers from your LLM. Every action runs through an auditable allowlist.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/michaelrice/vcenter-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server