Get the FREE Ultimate OpenClaw Setup Guide →

vSphere -Pro

VMware vCenter MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio warezloder-vsphere-mcp-pro python -m vsphere_mcp_pro.server \
  --env INSECURE="false to enable SSL verification bypass, true to disable" \
  --env MCP_PATH="MCP endpoint path (default: /mcp)" \
  --env RATE_LIMIT="Enable rate limiting (true or false, default: true)" \
  --env SERVER_HOST="Server bind address (default: 0.0.0.0)" \
  --env SERVER_PORT="Server port (default: 8000)" \
  --env AUTH_ENFORCE="Enforce RBAC (true or false, default: true)" \
  --env VCENTER_HOST="vCenter hostname or IP" \
  --env VCENTER_USER="vCenter username" \
  --env AUDIT_LOG_PATH="Path to audit log file (blank = stdout)" \
  --env RATE_LIMIT_RPS="Requests per second (default: 5)" \
  --env ROLES_TO_TOOLS="JSON map of role -> allowed tools, e.g. {"read": ["list_vms"], "ops": ["power_on_vm", "power_off_vm"]}" \
  --env TOKENS_TO_ROLES="JSON map of token -> role, e.g. {"token1": "read", "token2": "admin"}" \
  --env VCENTER_BACKOFF="Retry backoff factor (default: 0.5)" \
  --env VCENTER_RETRIES="Retry attempts (default: 3)" \
  --env RATE_LIMIT_BURST="Burst allowance (default: 10)" \
  --env VCENTER_PASSWORD="vCenter password" \
  --env VSPHERE_API_MODE="api or rest (default: api)" \
  --env VCENTER_CA_BUNDLE="Path to custom CA bundle (optional)" \
  --env VCENTER_TIMEOUT_S="Request timeout in seconds (default: 20)" \
  --env ALLOWED_VCENTER_HOSTS="Optional comma-separated list of allowed vCenter hosts"

How to use

This MCP server exposes VMware vCenter operations through a secure, RBAC-enabled interface. It supports VM lifecycle actions, snapshot operations, inventory discovery, and more, all wrapped with audit logging and rate limiting. To use it, configure environment variables to point at your vCenter instance and define your access tokens and role mappings. Start the server using the standard Python module invocation, then connect to the MCP endpoint (default /mcp) with an MCP client or tooling that speaks the MCP protocol. Tools are organized by capability, including VM discovery (list_vms, get_vm_details), inventory discovery (list_hosts, list_datastores, etc.), power operations (power_on_vm, power_off_vm, restart_vm), and snapshot operations. Access control is enforced via roles and tokens, and destructive actions require explicit confirmation.

How to install

Prerequisites:

  • Python 3.10+
  • VMware vCenter 8.0+ and valid API credentials

Install from source (recommended):

git clone https://github.com/Warezloder/vSphere-MCP-Pro
cd vSphere-MCP-Pro
pip install -e .

Run the server locally (from repository root):

export VCENTER_HOST=vcenter.example.com
export VCENTER_USER=administrator@vsphere.local
export VCENTER_PASSWORD=s3cret
export TOKENS_TO_ROLES='{"token1":"read","token2":"admin"}'
export ROLES_TO_TOOLS='{"read":["list_vms","get_vm_details"],"admin":["list_vms","get_vm_details","power_on_vm","power_off_vm","restart_vm","delete_vm"]}'
python -m vsphere_mcp_pro.server

Alternatively, run via the exact mcp_config structure (see the JSON example in this README) by exporting the necessary environment variables and using your preferred orchestration method.

Additional notes

Tips and considerations:

  • Ensure SSL verification and CA bundles are correctly configured in production to protect against man-in-the-middle attacks.
  • Use ALLOWED_VCENTER_HOSTS to prevent accidental cross-cluster operations in multi-vCenter environments.
  • The server uses a session pool to minimize authentication overhead; monitor pool sizes and timeouts via VCENTER_TIMEOUT_S and related settings.
  • Audit logs (JSONL) provide traceability for operations; route them to a centralized log system if needed.
  • If you enable REST mode (VSPHERE_API_MODE=rest), ensure your vCenter supports the REST API and that credentials have appropriate permissions.
  • Destructive operations require confirm=True (enforced by the server) to avoid accidental data loss.
  • For local development, you can run with SERVER_PORT and MCP_PATH overridden via environment variables.

Related MCP Servers

Sponsor this space

Reach thousands of developers