vcenter-mcp
vcenter-mcp
Ein Model Context Protocol-Server, der VMware vCenter / ESXi VM-Lebenszyklus-Werkzeuge für Claude Code und andere MCP-Clients bereitstellt. Basiert auf pyVmomi.
Was es tut
VMs auf einem vCenter-Datencenter (gruppiert nach Host) oder auf einem eigenständigen ESXi-Host auflisten
Eine VM erstellen (zuerst Netzwerk-Boot; Thin- oder Thick-Provisioning; Nested-Virt-Option für ESXi-Ziele)
VMs ein- und ausschalten
VMs löschen (schaltet sie zuerst aus, falls sie laufen, und löscht sie dann von der Festplatte)
Suchanfragen akzeptieren entweder einen Anzeigenamen oder eine moref-ID (z. B. vm-42) — der moref-Pfad überspringt den Inventar-Scan und ist in großen Umgebungen schneller.
Related MCP server: VMWare MCP
Voraussetzungen
Python 3.10 oder neuer
Ein vCenter Server oder eigenständiger ESXi-Host, den Sie über das Netzwerk erreichen können
Ein vSphere-Konto mit den Berechtigungen, die für Ihre geplanten Aktionen erforderlich sind (schreibgeschützt reicht für
list_vms; Erstellen / Löschen erfordert die entsprechenden VM- und Ressourcen-Pool-Berechtigungen)
Installation
Installieren Sie es in ein projektlokales Virtualenv. Die Verwendung eines venv hält vcenter-mcp und seine Abhängigkeiten (insbesondere pyVmomi) von Ihrem System-Python isoliert.
Von einem Klon dieses Repositorys:
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -e .Für die Entwicklung (installiert auch pytest):
.venv/bin/pip install -e ".[dev]"In dieser README verwenden Befehle
.venv/bin/.... Sie können stattdessen einmal pro Shellsource .venv/bin/activateausführen und das Präfix weglassen — das Ergebnis ist dasselbe.
Ein Ziel konfigurieren
Führen Sie die interaktive Einrichtung mit dem Python des venv aus:
.venv/bin/python -m vcenter_mcp setupSie werden nach Folgendem gefragt:
Ein Zielname (z. B.
lab-vcenter) — wird verwendet, um später auf dieses Ziel zu verweisenHost oder IP des vCenter / ESXi
Benutzername und Passwort
Zieltyp:
vcenteroderesxi(Nur vCenter) Datencenter- und Cluster-Namen
Datastore-Name
Ein oder mehrere Netzwerkprofile, jeweils ein Name plus ein oder mehrere Portgruppen-Namen
Das Setup schreibt eine Konfiguration nach ~/.config/vcenter-mcp/config.json (Modus 0600). Führen Sie es jederzeit erneut aus, um ein weiteres Ziel hinzuzufügen oder ein bestehendes zu aktualisieren.
Struktur der Konfigurationsdatei
{
"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 }
}
}Ein Netzwerkprofil ist eine Liste von Portgruppen; der erste Eintrag wird zur Boot-NIC. Um Ihre eigenen VM-Typen hinzuzufügen, fügen Sie Einträge zu templates hinzu — vm_type-Strings, die an create_vm übergeben werden, werden mit diesem Dictionary abgeglichen.
Registrierung bei Claude Code
Registrieren Sie den MCP-Server mit dem Python des venv über den absoluten Pfad. Claude Code startet den Server in einer neuen Shell, die Ihr aktiviertes venv nicht erbt, daher ist der absolute Pfad erforderlich — ein Verweis auf ein bloßes python hier führt dazu, dass vcenter_mcp nicht importiert werden kann.
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_mcpOder geben Sie einfach den absoluten Pfad direkt an:
claude mcp add --scope user vcenter -- /absolute/path/to/vcenter-mcp/.venv/bin/python -m vcenter_mcpLese-Werkzeuge (list_vms) können sicher ohne Nachfrage zugelassen werden. Fügen Sie sie zu permissions.allow in ~/.claude/settings.json hinzu:
{
"permissions": {
"allow": [
"mcp__vcenter__list_vms"
]
}
}Die destruktiven Werkzeuge (create_vm, power_on_vm, power_off_vm, delete_vm) sind absichtlich nicht in der Standard-Allow-Liste enthalten — Claude wird Sie bei jedem Aufruf um Bestätigung bitten.
Werkzeuge
Werkzeug | Was es tut |
| Listet VMs auf einem Ziel auf. vCenter-Ziele gruppieren nach Host innerhalb eines Datacenters; ESXi-Ziele listen alles auf dem Host auf. |
| Erstellt eine VM, die zuerst per Netzwerk bootet. Wählen Sie einen |
| Schaltet eine VM anhand des Anzeigenamens oder der moref-ID ein. |
| Schaltet eine VM hart aus (anhand des Anzeigenamens oder der moref-ID). |
| Löscht eine VM dauerhaft (schaltet sie zuerst aus, falls sie läuft, und löscht sie dann von der Festplatte). |
Hinweise zu TLS
vcenter-mcp verbindet sich mit einem nicht verifizierten SSL-Kontext. Dies ist der gleiche Standard, den govc und die meisten pyVmomi-Beispielcodes verwenden, da Labor-vCenter sehr häufig selbstsignierte Zertifikate haben. Wenn Ihr Ziel ein ordnungsgemäß signiertes Zertifikat verwendet und Sie eine echte Verifizierung bevorzugen, tauschen Sie _ssl_context() in src/vcenter_mcp/client.py aus.
Entwicklung
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytestTests laufen in der CI auf Python 3.10, 3.11 und 3.12 (siehe .github/workflows/test.yml).
Lizenz
Available Tools
5 toolscreate_vmA
Create a VM that network boots first. vm_type: esxi, ubuntu, rhel (or any type defined in config templates). disk_provisioning: thin (default) or thick. network_profile: named profile from target config (e.g. standard, secure-boot).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| vm_type | Yes | ||
| target | No | ||
| network_profile | No | ||
| cpu | No | ||
| ram_mb | No | ||
| disk_gb | No | ||
| disk_provisioning | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden but only mentions 'network boots first' as a behavioral trait. It does not disclose whether the operation is idempotent, requires authentication, or what happens on conflict.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise, using four short lines with no unnecessary words. Each sentence adds value and is front-loaded with the primary purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 8 parameters and no output schema details, the description is incomplete: it omits required fields, resource constraints, and 5 parameters entirely. An output schema exists but does not compensate for missing parameter explanations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description only explains three parameters (vm_type, disk_provisioning, network_profile) out of eight. Critical parameters like name, cpu, ram_mb, and disk_gb are left undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Create' and the resource 'VM', and adds specificity with 'network boots first'. Sibling tools are management operations, so there is no confusion with alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives examples for vm_type and disk_provisioning defaults, but does not provide explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or constraints.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_vmA
Permanently delete a VM (power off if running, then destroy from disk). Accepts display name or moref ID (e.g. 'vm-42').
| Name | Required | Description | Default |
|---|---|---|---|
| name_or_id | Yes | ||
| target | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description shoulders full transparency. It discloses the irreversible destructive action, the pre-step (power off), and the input format. Missing details like permission requirements or error behavior, but core behavioral traits are present.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no extraneous information. Action and input format are front-loaded, making it efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the action and key parameter but lacks explanation for the optional 'target' parameter and does not mention output schema or return behavior, leaving gaps for a complete understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must explain all parameters. It clarifies that name_or_id accepts a display name or moref ID, but completely omits the 'target' parameter, leaving users without guidance on its purpose or usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Permanently delete a VM' and details the process ('power off if running, then destroy from disk'), clearly differentiating it from sibling tools like list_vms or power_on_vm.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains how to identify the VM (name or moref ID) but does not provide explicit guidance on when to use this tool versus alternatives, such as powering off or creating a snapshot.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_vmsA
List VMs on a target.
Standalone ESXi: lists all VMs on the host.
vCenter: groups VMs by host within the specified datacenter (defaults to the target's configured datacenter).
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| datacenter | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses significant behavioral differences between standalone ESXi and vCenter, including optional datacenter grouping. Without annotations, it carries the full burden and does so well. It implies read-only operation (list) but does not explicitly state lack of side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two bullet points, front-loading the main action. Every sentence provides value, no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the tool's core behavior and parameter roles. With an output schema present (context signal), return values need not be described. It is fairly complete for a list tool, though explicit mention of read-only nature would strengthen it further.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate. It explains the 'datacenter' parameter defaults to the target's configured datacenter but lacks detail on the 'target' parameter (e.g., format, valid values). Some meaning added, but insufficient given the gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists VMs on a target, with specific behavior for standalone ESXi vs vCenter. It uniquely identifies the resource (VMs) and action (list), distinguishing it from sibling tools like create_vm, delete_vm, etc.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool (listing VMs on a target) and mentions key parameters (target, datacenter). However, it does not explicitly state when not to use or suggest alternative tools, though siblings are distinct actions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
power_off_vmB
Hard power off a VM by display name or moref ID (e.g. 'vm-42').
| Name | Required | Description | Default |
|---|---|---|---|
| name_or_id | Yes | ||
| target | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose more behavioral details. It states 'hard power off' implying forceful shutdown but does not mention risks (data loss), prerequisites, or behavior if VM is already off or not found.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no wasted words, but lacks structure such as separate sections for usage or parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with an output schema, the description is adequate for the core action, but fails to explain the optional parameter and lacks behavioral context, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain parameters. It explains name_or_id (display name or moref ID) but completely ignores the 'target' parameter, leaving its purpose unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (hard power off) and the resource (VM), and specifies the identification methods (display name or moref ID), distinguishing it from siblings like power_on_vm or delete_vm.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (to hard power off a VM) but provides no explicit guidance on when not to use, such as preferring a soft shutdown or prerequisites like the VM being powered on.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
power_on_vmA
Power on a VM by display name or moref ID (e.g. 'vm-42').
| Name | Required | Description | Default |
|---|---|---|---|
| name_or_id | Yes | ||
| target | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description only states the action without disclosing side effects (e.g., idempotency), required permissions, or error conditions. With no annotations, the agent lacks critical behavioral context for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no wasted words. Every piece of information earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two parameters and an output schema, the description covers the primary parameter but misses behavioral details (e.g., what happens if VM is already on) and the purpose of the 'target' parameter. Adequate but with clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains that name_or_id accepts a display name or moref ID, adding value beyond the schema structure. However, the optional 'target' parameter is not explained, and schema coverage is 0%, so the description only partially compensates.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Power on a VM') and the resource identifiers ('by display name or moref ID'), which distinguishes it from siblings like power_off_vm.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description specifies how to identify the VM (name or moref ID) with an example, but does not provide guidance on when to choose one identifier over the other or mention when not to use the tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
create_vm - First observed
delete_vm - First observed
list_vms - First observed
power_off_vm - First observed
power_on_vm
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: create, delete, list, power on, power off. No overlap in functionality.
All tools follow a consistent verb_noun pattern in snake_case (create_vm, delete_vm, list_vms, power_off_vm, power_on_vm). Minor plural variation for list_vms is acceptable.
5 tools cover the essential VM lifecycle operations without being excessive or insufficient for a vCenter MCP server.
Missing common operations like get single VM details, update VM configuration, clone, or snapshot management. Basic CRUD and power actions are present but gaps exist for full lifecycle management.
Maintenance
Related MCP Connectors
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Interact with the Stitch API using natural language commands.
Manage Rackspace Spot Kubernetes Cloudspaces, node pools, and VMs from your AI assistant.
Interact with your Google Cloud Firestore resources using natural language commands.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables 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.-
- AlicenseNot gradedqualityDmaintenanceEnables 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.21 npm3MIT
- 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.44980 PyPI74MIT
- AlicenseNot gradedqualityCmaintenanceEnables natural language interaction with VMware SDDC Manager and vCenter APIs through MCP tools, allowing users to query workload domains, VMs, clusters, and more.MIT